Technical data
64 BEA WebLogic Integration Release Notes
Time processing occurs in a separate execution thread from that of the workflow.
When a timer triggers, the TimeListener MDB attempts to resume processing of the
workflow in which the timer was scheduled. In certain situations, it is possible for the
timer to trigger prior to the workflow instance having been committed to the database,
resulting in a message similar to the following:
Workflow warning: com.bea.wlpi.common.WorkflowException:
The system could not find the specified workflow instance:IID
where IID is the instance ID of the workflow.
This only occurs in design patterns where a time-based action is performed in the first
transaction of the workflow, and when the timer is scheduled for a period of time
shorter than it takes the workflow to complete.
For example, consider a workflow template definition comprised of the following
nodes:
Start
→Task1→Task2→Event→Done
where:
Task1 performs a timed event action that sets the timer for 1 second
Task2 performs some simple processing
Event waits for a message and then processes it
Under normal circumstances, workflow processing starts and the timer is set in Task1
for (
current_time + 1 second). The workflow processor moves to Task2 and
executes its actions. The Event node is reached and the transaction is committed. The
workflow is now stored in the database. The timed-based action fires and resumes
processing the instance, performing those tasks in the overdue action list (canceling the
event, for example) if the workflow has not completed.
In this example there is a very high probability that, if the workflow is called
repeatedly, at one point the timer will fire early enough and the latency before the
transaction commits will be long enough that the timer processing begins before the
workflow instance has been committed to the database. In testing, we have found that
the situation occurred after 249, 750, and 1122 instance have processed normally.
Obviously, the probability of this occurrence increases as the time for the trigger
decreases and the amount of processing prior to the workflow instance being
committed to the database increases (more actions are performed prior to the first
quiescent point).