|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Workflow, fire a EventDrivenActivity from a StateInitializationActEventDrivenActivity that lives in that state? The goal is to automatically progressing from one state to the next without the actual events being pushed in from outside, if there is an error in the transactions a user would need to step in and manually kick off the workflow by firing an event on the ExternalDataExchange service (I kinda need an InternalDataExchange service :)). I thought a suitable place to make this happen would be within the StateInitializationActivity. For example, the initialization would just fire an event that’s picked up by an EventDrivenActivity that lives in the same state as the StateInitializationActivity. If it’s possible I believe the answer maybe somewhere in relation to posting a message to the workflows que for the given EventDrivenActivity, but can’t find much info on that. You might say use a sequential workflow, but we have decided a statemachine is more suitable. I can elaborate on this if required. Thanks for any help. I’ve somewhat got around this with a redesign of my workflow, basically now I
have a StateInitializationActivity that does the processing for that state and then transactions to the next state. If there is an error during the StateInitializationActivity a fault handler catches that and sets the state to ‘Error’. From the error state I have an EventDrivenActivity which can wait for events form the dataexchangeservice, the particular event will basically fire a flow that sets the state back to the state that previously errored, the StateInitializationActivity on that state then kicks back in off we go… Now the state machine will progress as needed (hopefully to the end) and if it blows up it will end up at the ‘error’ state. At that point a user can intervene and retry if desired. Show quote "_keith" wrote: > Full question: From within a StateInitializationActivity can I fire an > EventDrivenActivity that lives in that state? > > The goal is to automatically progressing from one state to the next without > the actual events being pushed in from outside, if there is an error in the > transactions a user would need to step in and manually kick off the workflow > by firing an event on the ExternalDataExchange service (I kinda need an > InternalDataExchange service :)). > > I thought a suitable place to make this happen would be within the > StateInitializationActivity. For example, the initialization would just fire > an event that’s picked up by an EventDrivenActivity that lives in the same > state as the StateInitializationActivity. If it’s possible I believe the > answer maybe somewhere in relation to posting a message to the workflows que > for the given EventDrivenActivity, but can’t find much info on that. > You might say use a sequential workflow, but we have decided a statemachine > is more suitable. I can elaborate on this if required. > > Thanks for any help. > |
|||||||||||||||||||||||