问题
I have 40 activities that do not depend on each other. I want to model them in a such way, that execution engine processes them in multiple parallel flows in any order. Execution engine may optimize their execution order (for example take as first the activity, that took the most time at the previous run).
Is it possible with BPEL or BPMN 2.0? If yes - how?
With a Parallel Gateway I will have to draw 40 edges, as far as I understand. Is there any better way?
Thanks!
回答1:
Yes, both languages support parallel activities:
BPMN 2.0:
- The typical scenario is, like you said, to use a parallel gateway and connect all activities using sequence flows.
- What may work is to use an Adhoc Subprocess with no sequence flow and the
ordering
attribute set toparallel
. The tricky part is probably to define acompletionCondition
. The spec is somewhat unclear about this scenario, since it is more meant to support unstructured workflows with human interactions.
BPEL:
- This is an easy task for BPEL. Use the
<flow>
construct without any<link>
elements. All nested activities will be executed in parallel, no 'edges' are needed.
- This is an easy task for BPEL. Use the
来源:https://stackoverflow.com/questions/9770299/how-can-i-model-many-parallel-activities-in-bpmn-2-0