How to Invoke Signal Activity from Controller or Driver?

Topics: Core, Customizing Orchard, Writing modules
Dec 11, 2014 at 11:17 AM
I am trying to trigger a Signal Activity from Controller, but it does not work. The name of my signal activity is "MySignal".

Here is the code:
_workflowManager.TriggerEvent(SignalActivity.SignalEventName, contentItem, () =>
 {
      var dictionary = new Dictionary<string, object> 
      { { "Content", contentItem }, 
     { SignalActivity.SignalEventName, "MySignal" } };

      return dictionary;

        });
Thanks
Developer
Dec 11, 2014 at 11:36 AM
Edited Dec 11, 2014 at 11:36 AM
If this is the SignalActivity that comes with the Workflows module, then this won't work - you need to pass in a nonce.
Checkout the SignalController of the Workflows module to see how it works.