This project is read-only.

How to invoke a Non-Starting Event Activities?

Topics: Core, Customizing Orchard, Writing modules
Dec 18, 2014 at 9:38 AM
Edited Dec 18, 2014 at 9:39 AM
In order to trigger Event Activity, I need to set CanExecuteWorkflow property to true and set activity as starting activity, otherwise this event won't trigger. Where as, the UserTaskActivty is not a starting activity, still it can be invoked from outside the workflow. Why is that?

Dec 18, 2014 at 10:30 AM
The UserTaskActivity will only execute if the workflow execution state was halted on that activity, and then the "UserTask" event is triggered.
So, if for example you have a ContentCreated activity and a UserTaskActivity, and you trigger the "UserTask" event, that activity won't execute, since execution hasn't even reached that activity yet (not until a content item was created). Makes sense?
Marked as answer by cloudsurfer on 12/18/2014 at 3:37 AM
Dec 18, 2014 at 11:37 AM
Yes, it makes perfect sense. Thank you spike.