What's the current thinking in the community about implementing task
execution by multiple resources in the Petri Net implementation of the
workflow package? Also, the system doesn't seem to support AND splits
where multiple arcs lead away from a place to multiple transitions, and
each transition may execute. Unless I've missed something in the code,
that is.
I'm implementing a small workflow system for work and have been
struggling with these questions for a while now. Possibly this
discussion could help with future development of the workflow package,
as well as help me implement my system.
If place A is an input for N transitions each of which may execute, but
there is only one input to place A, with the current implementation only
one token will get delivered to place A. How do we decide that in
reality it needs N tokens? Look ahead at the kind of arcs leading away
from A, before depositing the token in A? Or attach a "throughput
capacity" to each outbound arc?
Another one is a execution of same task by multiple resources. Say I
have a request that must be approved by a number of Approvers. I create
a request, and in the next step, assign Approvers. I am not limited on
the number of Approvers by business logic. I was thinking that if the
"Assign Approvers" transition immediately precedes the "Apprvers
Approve" transition, I could dinamically deposit N number of tokens in
the input place for "Approvers Approve", upon completion of "Assign
Approvers". However, what if the "Assign Approvers" is separated from
"Approvers Approve" by a few transition in the workflow?
Even if I figure out how to properly populate the input place for
"Approvers Approve", what if there is an AND split from the input place
for the transition? How does one implement the "Approvers Approve" in
such a way that even after all approvers perform the task, there are
still enough tokens in the input place for the rest of the AND-split
transitions to use.
One way I thought of was to not complete the "Approvers Approve"
transition until an external counter is equal to the assigned number of
approvers, and only then move the token. But that kind of takes each
individual approval task out of the system, despite the fact that it's a
legitimate workflow task and we should be able to report on it and its
progress. Unless we are separating task from the token manipulation they
result in, that is, I guess.
Another one is not to allow dinamic allocations of Approvers and insist
on a static number. Still, when do you decide on how many tokens to use
in the input place for such a transition: when you execute tasks that
would populate that place with tokens, or when you execute the task
itself and either not consume a token or add input tokens then if needed?
To me it sound like the Petri Nets doesn't really provide an answer to
this. While I've seen multiple references to AND splits and even some
references to multi-execution transitions, I haven't seen anything that
suggests someone has figured out how to implement that model yet.
But I've got to be missing something so any input on this, and possibly
references to relevant documents would be greatly appreciated. Thanks.
Max Pakhutkin