I am trying to implement an use case to cancel the current case flow. Simplified example can be described as: There are two activities 'A' immediately followed by 'B'. 'B' Activity involves human interaction (an entry in todo list) and can be postponed. The challenge is to 'restart' 'A' activity and perform some steps to cancel already started 'B' activity. With BPMN i would model 'B' activity with transactional subprocess and cancel event. Quick web searching for 'BPMN Cancel' leads to the usable examples. AFAIK there are no direct counterparts neither for BPMN 2.0 Transactional Subporcess nor for cancel event in xIvy.Designer. The questions are:
Best regards, Mikhail. |
I start with a short explanation of the default behavior in Ivy. On the process level everything what happens between two events is atomic. It means either the execution completes successfully or (if not) it is reset to the start (i.e. to the first event). So consider the following situation:
This is what we call a task in Ivy. A sequence of activities (and gateways) between two events (this is in fact a simplification but explains the principle). Note, that a task in BPMN is semantically something else. Now, if during the execution something in A or B fails, then the whole task is reset automatically by Ivy to the Start event. In case of user interactions this is also true if the session timeout is reached. On the other hand, if everything is working properly then the case has reached the next step and will be proceeded from the End event. 2. There is an API to find and cancel case. Can I set the case to the defined state, say a task? No, what you can do by API is reset a task. If you call this during the execution, then the task will be reset to its start (the Start event). 1. Is it possible to model it in Xpert.ivy or there are show stoppers? What you do not have in Ivy is the notion of compensation. There is no such thing as a compensation activity that is triggered in case of a rollback (or reset in Ivy terms). If you need this, then you must workaround through this. For example, your activities could create some sort of commands that have a compensation mechanisms that are put in a queue. Then the queue is processed at the end of the Ivy task in Java with a transaction framework or something like that. You are absolutely right. Tasks (or Activities) in BPMN semantically differ from the xIvy Tasks. Furthermore xIvy Activity B from your example is not semantically equivalent to the B Activity i meant, because the user can start and see the xIvy task in TODO only at Events (Start,Intermediate etc) or Task Gateway elements in process model. If right understood, there is no possibility to reset a task after it has reached End Task Switch gateway (you wrote 'during task execution' in your answer). Is that true? |
The following diagram shows the wrofklow task states and the possible state changes of a workflow task in an overview.
link
This answer is marked "community wiki".
|
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 10.07.2014 at 10:45
Seen: 4,656 times
Last updated: 14.04.2015 at 09:30