Database Reference
In-Depth Information
ling it. The right lane is for the standard task; it also updates the task execution history, but
only the ones that are related to tasks such as status , isRolbackRequired , and
currentTaskcounter , which are essential for traversing and looping. The left lane is
responsible for executing the compensation task when the response from the actor is neg-
ative; it's possible only if current and compensative tasks are included in EP in relation to
the primary task.
Using the While looping is quite easy; with the following code, we just simplified the
condition for the sake of demonstration:
<while name="WhileNotFinalTask">
<condition>
(... ($finalizeTask_counter <=
$finalizeTask_total )...)
</condition>
<scope name="ExecuteTask" exitOnStandardFault="no">
There are many ways in which you can loop over XML nodes in Oracle BPEL. All of
them involve the Assign element, counting the number of XML nodes using the count
function in XPath and XPath's position[] function. The one we can use in this case
was extracted in the previous step where the execution plan was stored in a global vari-
able, which is common for all BPEL scopes. In the ForEachTsk scope, to the single EP
task element that currently exists in the universal Message Container (Process Header)
part, we assign the value of the task node from the global variable with the position that is
equal to the current task counter. The task counter is incremented after each task is in-
voked, and we will perform a reassignment in every loop.
This is probably not the fastest technique, but it works; additionally, we have advantages
in terms of memory utilization, keeping only one node at a time in the Process Header
within the message container.
Search WWH ::




Custom Search