Using event category and event type data in Action

Topics: Core, Customizing Orchard, Writing modules
Oct 18, 2011 at 1:27 PM

I'am developing a modul for logging activities in a database(for recent activity list).  I'am doing this through using of the Rules module. I've created new action provider. I've learned how to use tokens in my action parameters. But the tokens include only information about current User, Content etc. For logging purpose I need to include information about current executing event (category and type) also in tokens. How can I include information about current event (category and type) into tokens or what is the right way to get event description data in my action? 

Any ideas?


Oct 18, 2011 at 5:55 PM

When you call the action, you can pass other tokens of your choice. This also means you have to create a provider for those token types if they are not standard types like User, Content.

Oct 18, 2011 at 9:35 PM

Thanks for the quick response.

Yes, I know about token providers.

But to get this, I must change the RulesManager class.  By current implementation of RulesManager class, I don't get the category and type of event that triggerd action in  action itself (action context).

So I must change implementation od RulesManager and in TriggerEvent method I would pass the category and type of event in tokens of current executing action. 

But I don't want to change RulesManager, so my question is, if exist any better solution?