06-25-2014 10:11 AM - edited 06-25-2014 10:12 AM
Hi all,
At execution time I need to detect when a step is skipped (for sequence analysis purpose and progression % calculus). This detection should be trapped for any sequence running my personnalized processModel.
In my case a step can only be skipped because its precondition failed.
I noticed that neither ProcessModelPostStep or ProcessModelPreStep callbacks are NOT fired for skipped steps... So do you have any idea to detect these skipped steps ?
Thanks.
06-25-2014 01:40 PM
This is an interesting question. You can look at the status of any step by using:
Step.Result.Status
Knowing this we could in essense use a SequenceFilePreStep callback and check the status of the previous step.
Runstate.Caller.Sequence.GetStep(runstate.CallingStep.StepIndex - 1, RunState.CallingStep.StepGroup).ResultStatus
Something like that? You may have to use some sort of logic to determine if the step wasn't the first one in the step group?
Just a thought
06-26-2014 02:41 AM
Hi Jiggawax,
Thank you for your answer.
I guess I'll have to check if the step associated to the callback trigger is the first non-skipped step in my sequence and update my actions according to this result...Not really efficient !
Moreover, doing some actions when a skipped steps is 'executed' could be necessary. I would have been great to have something like a 'ProcessModelCallback SkippedStep' or even better an option to allow 'ProcessModelCallback Pre/PostStep' to be fired or not for skipped steps.