views:

47

answers:

0

An example: a permit must be examined by two lawyers and one engineer. If any of those three reject it, the process enters a "rejected" end state. If all three grant the permit, it enters a "granted" end state. All three examiners may examine simultaneously, or in any order.

Once one engineer has granted it, it shouldn't be available to be examined by an engineer; once two lawyers have examined it, it shouldn't be available to lawyers; once one engineer and two lawyers have examined it should go to the granted end state.

My initial thinking is that either I have a overly complicated state transition diagram, with "the same" intermediate states multiply repeated, or I carry (external) state with the process { bool rejected; int engineerSignoffId; int lawyer1SignoffId; int lawyer2SignoffId}.

Or something like this? If so, how does the engineer's rejection terminate the subprocess that is in "Lawyers"?

START->FORK->Engineer->Granted?---------------->Y->JOIN-->Granted
          |->Lawyers-->Granted?->by 2 lawyers?->Y---^
                  ^                          |
                  |--------------------------N 

What's the canonical jBPM answer to this? Can you point me to examples or documentation of such answers?

Thanks.