Dashboard > PXE > ... > BPEL Management API > Scope Traverseral > View

Page Operations


Navigation


PXE Log In   View a printable version of the current page.
Scope Traverseral
Added by Maciej Szefler, last edited by Maciej Szefler on Jan 12, 2006

The BPEL Management API API may be used to traverse the [scope tree] of a BPEL process instance. The nodes in the scope tree are runtime incarnations of the scopes appearing in the BPEL process definition and provide access to variables, correlation sets, and partner link values.

The [scope tree] will include explicit scopes (<scope> elements) as well as implicit scopes automatically generated by the BPEL compiler.

To obtain information about the scopes of a running process instance, one must first obtain a pointer to the root instance scope, and then iteratively retrieve the ScopeInstanceDocument(s).

With Beanshell, this would look like:

bsh % importCommands("/bpel");
bsh % pxe = pxeGetBMF();
bsh % print(pxe.listInstances());
<pmap:instance-info-list xmlns:pmap="http://pxe.fivesight.com/schemas/2005/11/11/pmapi">
  <pmap:instance-info>
    <pmap:iid>1</pmap:iid>
    <pmap:pid>TaskManager.taskManager.BpelService</pmap:pid>
    <pmap:root-scope siid="1" status="ACTIVE" name="__PROCESS_SCOPE:TaskManager" modelId="30"/>
    <pmap:status>ACTIVE</pmap:status>
    <pmap:dt-started>2006-01-11T23:10:52.791-05:00</pmap:dt-started>
    <pmap:dt-last-active>2006-01-11T23:10:54.522-05:00</pmap:dt-last-active>
  </pmap:instance-info>
</pmap:instance-info-list>
bsh % print(pxe.getScopeInfo("1"));
<pmap:scope-info xmlns:pmap="http://pxe.fivesight.com/schemas/2005/11/11/pmapi">
  <pmap:siid>1</pmap:siid>
  <pmap:name>__PROCESS_SCOPE:TaskManager</pmap:name>
  <pmap:status>ACTIVE</pmap:status>
  <pmap:children>
    <pmap:child-ref siid="2" status="ACTIVE" name="CreateAndCompleteTask" modelId="57"/>
  </pmap:children>
</pmap:scope-info>
bsh % print(pxe.getScopeInfo("2"));
<pmap:scope-info xmlns:pmap="http://pxe.fivesight.com/schemas/2005/11/11/pmapi">
  <pmap:siid>2</pmap:siid>
  <pmap:name>CreateAndCompleteTask</pmap:name>
  <pmap:status>ACTIVE</pmap:status>
  <pmap:parent-scope-ref siid="1" status="ACTIVE" name="__PROCESS_SCOPE:TaskManager" modelId="30"/>
  <pmap:children/>
</pmap:scope-info>
bsh %


Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 1.4.1 Build:#212 Jun 02, 2005) - Bug/feature request - Contact Administrators