Menu ▾ ▴

#8 Transition is not made when <n> activities end in parallel.

open
nobody
None
5
2005-07-01
2005-07-01
No

There is a problem when an activity relies on two
successors joined by AND which complete simultaniously.

Example:
B depends on A1 AND A2

If A1 and A2 finish in the same (milli)second, B won't
start because both execution threads look at the other
activity which is still OPEN and will not execute the
transition to B.

Solution:
A lock, which forces the lookups to be serialized.
Change the cursor ancestor_cursor in procedure
acin_complete to:
CURSOR ancestor_cursor(
prce_id_in IN wf_processes.id%TYPE
, acti_id_in IN wf_activities.id%TYPE
, prin_id_in IN wf_process_instances.id%TYPE
)
IS
SELECT i.id AS acin_id
FROM wf_activity_instances i
WHERE i.acti_prce_id = prce_id_in
AND i.acti_id = acti_id_in
AND i.state IN ( 'NOTRUNNING', 'RUNNING',
'SUSPENDED' )
AND i.prin_id = prin_id_in
FOR UPDATE OF I.STATE;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Discussion


Log in to post a comment.