BPEL Syntax Reference

BPEL Syntax Reference

BPEL Syntax Reference This appendix provides a syntax reference for the Web Services Business Process Execution Language (WS-BPEL) version 2.0, OASIS Standard as defined in the specification dated April 11, 2007 available at the following URLs: http://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.html http://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.doc http://docs.oasis-open.org/wsbpel/2.0/wsbpel-v2.0.pdf Important BPEL activities and elements The following section covers important activity and element tags associated with BPEL processing. <assign>, <copy>, <from>, and <to> The <assign> activity is used to do the following: Copy data from one variable to another Construct and insert new data using expressions and literal values Copy partner link endpoint references The syntax is as follows: <assign validate="yes|no"? standard-attributes> standard-elements ( <copy keepSrcElementName="yes|no"? ignoreMissingFromData="yes|no"?> from-spec to-spec BPEL Syntax Reference </copy> | <extensionAssignOperation> assign-element-of-other-namespace </extensionAssignOperation> )+ </assign> The from-spec section can have the following forms: <from variable="BPELVariableName" part="NCName"?> <query queryLanguage="anyURI"?>? queryContent </query> </from> <from partnerLink="NCName" endpointReference="myRole|partnerRole" /> <from variable="BPELVariableName" property="QName" /> <from expressionLanguage="anyURI"?>expression</from> <from><literal>literal value</literal></from> <from/> The to-spec section can have the following forms: <to variable="BPELVariableName" part="NCName"?> <query queryLanguage="anyURI"?>? queryContent </query> </to> <to partnerLink="NCName" /> <to variable="BPELVariableName" property="QName" /> <to expressionLanguage="anyURI"?>expression</to> <to/> <catch> and <catchAll> The <catch> activity is specified within fault handlers to specify faults that are to be caught and handled. The <catchAll> activity is used to catch all faults. Within a fault handler, at least one <catch> activity needs to be specified. The optional<catchAll> activity can also be specified. In the designer mode it is displayed in the right-hand side of the BPEL process. The <catch> activity has four attributes that can be used to specify which fault to handle (at least one of them needs to be specified): faultName: This specifies the name of the fault to be handled faultVariable: This specifies the variable type used for fault data [ 352 ] Appendix B faultMessageType: This specifies the message type used for fault data faultElement: This specifies the element used for fault data The syntax is as follows: <faultHandlers>? <!-- Note: There must be at least one faultHandler --> <catch faultName="QName"? faultVariable="BPELVariableName"? ( faultMessageType="QName" | faultElement="QName" )? >* activity </catch> <catchAll>? activity </catchAll> </faultHandlers> <compensate> To start compensation on all inner scopes that have already completed successfully, in default order, you use the <compensate> activity. We can use this activity from within a fault handler, another compensation handler, or a termination handler only. The syntax is as follows: <compensate standard-attributes> standard-elements </compensate> <compensateScope> To start compensation on a specified inner scope that has already completed successfully, you use the <compensateScope> activity. The <compensateScope> activity has an optional target attribute that is used to specify the scope to be compensated. We can use this activity from within a fault handler, another compensation handler, or a termination handler only. The syntax is as follows: <compensateScope target="NCName" standard-attributes> standard-elements </compensateScope> [ 353 ] BPEL Syntax Reference <compensationHandler> Compensation handlers are used to define compensation activities. Compensation handlers gather all activities that have to be carried out to compensate another activity and can be defined for the whole process or scope, or can be inline for the<invoke> activity. The syntax is as follows: <compensationHandler> activity </compensationHandler> <correlations> and <correlation> The <correlation> element is used to associate a correlation set (a collection of key data fields) with an activity. Correlation can be used within the<receive> , <reply>, <invoke>, <onMessage>, and <onEvent> activities. The syntax is as follows: <correlations>? <correlation set="NCName" initiate="yes|join|no"? pattern="request|response|request-response"? />+ </correlations> <correlationSets> and <correlationSet> A correlation set is a set of properties shared by messages and used for correlation. It is used to associate a message with a business process instance. It is used primarily in asynchronous invocations. Each correlation set has a name attribute. The syntax is as follows: <correlationSets>? <correlationSet name="NCName" properties="QName-list" />+ </correlationSets> <empty> An activity that does nothing is defined by the<empty> tag. Another use of <empty> is to provide a synchronization point in <flow>. The syntax is as follows: <empty standard-attributes> standard-elements </empty> [ 354 ] Appendix B <eventHandlers> Event handlers react to events that occur while the business process is executing. When these events occur, the corresponding event handlers are invoked. Event handlers can be specified for the whole process as well as for each scope. The syntax is as follows: <eventHandlers>? <!-- Note: There must be at least one onEvent or onAlarm. --> <onEvent partnerLink="NCName" portType="QName"? operation="NCName" ( messageType="QName" | element="QName" )? variable="BPELVariableName"? messageExchange="NCName"?>* <correlations>? <correlation set="NCName" initiate="yes|join|no"? />+ </correlations> <fromParts>? <fromPart part="NCName" toVariable="BPELVariableName" />+ </fromParts> <scope ...>...</scope> </onEvent> <onAlarm>* <!-- Note: There must be at least one expression. --> ( <for expressionLanguage="anyURI"?>duration-expr</for> | <until expressionLanguage="anyURI"?>deadline-expr</until> )? <repeatEvery expressionLanguage="anyURI"?> duration-expr </repeatEvery>? <scope ...>...</scope> </onAlarm> </eventHandlers> <exit> The <exit> activity is used to immediately end a business process instance. The syntax is as follows: <exit standard-attributes> standard-elements </exit> [ 355 ] BPEL Syntax Reference <faultHandlers> and <faultHandler> Fault handlers are used to react to faults that occur while the business process activities are executing. They can be specified for the global process or each scope, or inline for<invoke> activities. Multiple <catch> activities can be specified within the fault handler for specific faults. You need to specify at least one <catch> activity. You can optionally specify the <catchAll> activity. The syntax and functionality of the <catch> activity is the same as that described in the earlier section on <catch> and <catchAll>. In the JDeveloper design view, the fault handlers are shown on the right-hand side of the process flow. The syntax is as follows: <faultHandlers>? <!-- Note: There must be at least one faultHandler --> <catch faultName="QName"? faultVariable="BPELVariableName"? ( faultMessageType="QName" | faultElement="QName" )? >* activity </catch> <catchAll>? activity </catchAll> </faultHandlers> <flow> The <flow> activity provides concurrent execution of enclosed activities and their synchronization. The syntax is as follows: <flow standard-attributes> standard-elements <links>? <link name="NCName" />+ </links> activity+ </flow> <forEach> A <forEach> activity iterates its child scope activity exactlyN+1 times whereN equals the <finalCounterValue> minus the <startCounterValue> value. The <forEach> branches can execute in parallel, if parallel="yes". A <completionCondition> tag may be used within <forEach> to allow the <forEach> activity to complete without executing or finishing all the branches specified. [ 356 ] Appendix B The syntax is as follows: <forEach counterName="BPELVariableName" parallel="yes|no" standard-attributes> standard-elements <startCounterValue expressionLanguage="anyURI"?> unsigned-integer-expression </startCounterValue> <finalCounterValue expressionLanguage="anyURI"?> unsigned-integer-expression </finalCounterValue> <completionCondition>? <branches expressionLanguage="anyURI"? successfulBranchesOnly="yes|no"?>? unsigned-integer-expression </branches> </completionCondition> <scope ...>...</scope> </forEach> <fromParts> and <fromPart> The <fromParts> activity is used to specify how to store the different message parts to BPEL variables. We can specify <fromParts> in the following BPEL activities that receive messages: <receive> <onMessage> (within <pick>) <onEvent> (within <eventHandlers>) <invoke> (for receiving the response in request/response operations) The syntax is as follows: <fromParts>? <fromPart part="NCName" toVariable="BPELVariableName" />+ </fromParts> <if>, <elseif>, and <else> To express conditional behavior, the <if> activity is used. It consists of one or more conditional branches defined by<elseif> elements, followed by an optional <else> element. [ 357 ] BPEL Syntax Reference The syntax is as follows: <if standard-attributes> standard-elements <condition expressionLanguage="anyURI"?>bool-expr</condition> activity <elseif>* <condition expressionLanguage="anyURI"?>bool-expr</condition> activity </elseif> <else>? activity </else> </if> <import> The <import> activity is used within a BPEL process to declare a dependency on external XML Schema or WSDL

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    22 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us