-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conditional Events #299
Comments
parser does not break in example model. So we can add the conditions from the gateway to the event.... |
Great!
Didn't you mean the way around from the event to the gateway? And maybe the condition can only look like this? |
Yes I think so, some refactoring is necessary but it looks good.... |
@chrisw14 can you please verify the latest snapshot release 4.2.0-SNAPSHOT. This version should work with conditional events. |
Oh great, that was fast :-) But if I use the format mentioned above (without if and return) I got the following exception. The same with your format with if and return:
Maybe it's only a small issue because the processid 3 would be the right process :-) See here: 14245d3#diff-4ac9d1ea072a9a3767b7925c3484ed5cR425 imixs-workflow/imixs-workflow-core/src/main/java/org/imixs/workflow/WorkflowKernel.java Line 425 in 14245d3
PS: But in my model the new processid will always be 3. What is the right condition notation? And how can I set a condition to default? |
Please take a look at this example model (it is part of the junit tests) a condition should look like this:
The expression is simply evaluated to an boolean. |
maybe you can share your model? It would be easier to discuss... |
You were right, I fixed this bug. Now it should work. |
I updated the docu too: |
Great! It works fine, thank you very much! |
In order to avoid the fact that behind each gateway output an event must be defined, ' conditional events ' will be introduced in the future.
Problem
To compute the next Task in a processing life cycle the WorkflowKernel expects either an attribute 'numnextprocessid' or the attributes 'keyFollowUp=1' and 'numNextActivityID' pointing to another Event to be processed next.
This behavior makes it necessary that an Event unambiguous points to only one Task or Event.
As a result conditional gateways could not be modeled without additional Events at the output of the gateway.
Solution
The idea is to support Models like this one:
In this model the output of the Event is a Gateway defining Flow-Conditions.
The Imixs-Workflow Engine should be aware of this Eventtype (which can be called 'conditional event') and evaluate the conditions during processing to determine the next output Task or Event.
Implementation:
Currently I expect that the BPMN Parser is throwing an exception for the model example above, because the output is not unique.
We can extend the parser in a way where we analyse if a Conditional-Gateway is the next output. If so, the conditions can be added into the Event which now becomes a 'Conditional-Event'. We can add an attribute 'txtconditions' containing a list of conditions like:
With this information the WorkflowKernel now can evaluate the conditions of a 'Conditional-Event' to determine the next output Task/Event.
The text was updated successfully, but these errors were encountered: