Question

My business process has to translate into Activiti BPM diagram, or other BPM engines. Here is my shorten business process: - user 1 creates the business transaction - then user 2 does his task to change transaction status. My problem is : after the business transaction is created, user 1 could delete the transaction, where by user 2 could not done his task (or his task is removed automatically by user 1). So how can I express that business using BPM diagram?, I'm confusing about using parallel gateway now?

Was it helpful?

Solution

The business process segment you indicate is actually quite a common practice. Often, an initiator is authorized to cancel a process or portion of a process which may have existing tasks.

The easiest way to handle this is:

  1. After initiation of the process, split the flow and send a "Status" task to user 1 and a "process transaction" task to user 2.
  2. Have the status task (user 1) provide a simply UI option to cancel the process which will send a terminate event (every thing gets shutdown immediately) or if cleanup is needed sends a signal event to shutown the process instance.
  3. The "Process Transaction" task will have an event listener that picks up the signal event which automatically closes the task and flows (via cleanup logic) to the end.

Note that if you use a terminate event step 3 is not required, but it is something of a "crowbar approach", in my experience, instance cleanup is always required (notify users of why their process task went away, undo DB or System of Record transactions, send messages to other systems).

As something of a separate note, BP-3 ( http://www.bp-3.com ) offers a full suite of Activiti services including:

  1. Migration support (To Activiti from other BPM systems)
  2. Pre production support for Activiti BPM engine
  3. BPM process design, development, review services
  4. Production support for Activiti BPM engine
  5. General consulting services

They may be able to assist you with a migration strategy.

OTHER TIPS

User 2's task which is something like (Update Transaction Status) should first check that the specific entity exists before updating the status, then probably place a logical/physical lock indicating that it is being work with if necessary. Similarly, in user 1's task, there should be a check before delete to see if the entity is held/locked by another user. So the step is not just 1 action.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top