|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (19)
View Page Historyh4. Identifying operations
The mapping between operations of the WSDL and operations supported by the BPMN 2.0 embedded in the SE BPMN2 is declared using a dedicated binding. The binding "BPMN2" is done adding the element {{\{http://petals.ow2.org/se/bpmn2.0/1.0}operation}} to the element operation of the binding. Its attribute *{{bpmnAction}}* *{{action}}* defines the operation that will be executed on the process engine according to the following values:
|| value of {{bpmnAction}} || operation executed on the process engine ||
|| Value of {{action}} || Operation executed on the process engine ||
| {{startEvent}} | Create a new instance of the process. See [Associating an operation to the creation of an process definition instance|#associating_startEvent] for more information on this operation. |
| {{userTask}} | Complete a user task. See [Associating an operation to the completion of a process instance task|#associating_userTask] for more information on this operation. |
| {{userTask}} | Complete a user task. See [Associating an operation to the completion of a process instance task|#associating_userTask] for more information on this operation. |
Expected input parameters are declared using dedicated annotation according to the operation:
|| value of {{bpmnAction}} || operation executed on the process engine ||
|| Value of {{bpmn:operation[action}]} || Operation executed on the process engine ||
| {{startEvent}} | Only one Expected input parameter is expected: parameters are: the process identifier and the user identifier. See [Associating an operation to the creation of an process definition instance|#associating_startEvent] for more information on the declaration of this parameter. |
| {{userTask}} | Expected input parameters are: the process instance identifier and the user identifier. See [Associating an operation to the completion of a process instance task|#associating_userTask] for more information on the declaration of these parameters. |
h4. Associating an operation to the creation of an process definition instance
The operation creating instances of process definition is identified by the value *{{startEvent}}* set on the attribute {{bpmnAction}} {{action}} of the annotation {{\{http://petals.ow2.org/se/bpmn2.0/1.0}operation}}. As your service unit can include several process definition, you need to clarify the process definition to use to create the process instance using the attribute *{{processDefinitionId}}*. As a process definition can include several start events, the right start event to use to create the new process instance is clarified with the attribute *{{id}}*.
This operation accepts variables and requires the following input parameters:
<wsdl:binding name="Order" xmlns:bpmn="http://petals.ow2.org/se/bpmn2.0/1.0">
<wsdl:operation name="newOrder" type="...">
<wsdl:operation name="newOrder" type="...">
<bpmn:operation bpmnAction="startEvent" id="default"/> processDefinitionId="order" action="startEvent" id="newOrder"/>
<bpmn:userId>/*[local-name()='newOrderRequest']/*[local-name()='userName']</bpmn:userId>
<bpmn:variable name="address" value="/newOrderRequest/address" />
<bpmn:variable name="address" value="/newOrderRequest/address" />
h4. Associating an operation to the completion of a process instance task
The operation completing a task of a process instance is identified by the value *{{userTask}}* set on the attribute {{bpmnAction}} {{action}} of the annotation {{\{http://petals.ow2.org/se/bpmn2.0/1.0}operation}}. To guarantee that the expect user task is the right one, the identifier of the expected user task is clarified with the attribute *{{id}}*.
This operation accepts variables and requires the following input parameters:
<wsdl:binding name="Order" xmlns:bpmn="http://petals.ow2.org/se/bpmn2.0/1.0" >
<wsdl:operation name="validOrder">
<wsdl:operation name="validOrder">
<bpmn:operation bpmnAction="userTask" processDefinitionId="order" action="userTask" id="validOrder"/>
<bpmn:processId>/*[local-name()='validOrderRequest']/*[local-name()='orderId']</bpmn:processId>
<bpmn:userId>/*[local-name()='validOrderRequest']/*[local-name()='userName']</bpmn:userId>
<bpmn:userId>/*[local-name()='validOrderRequest']/*[local-name()='userName']</bpmn:userId>
h4. Associating an operation to retrieve process instances
The operation retrieving process instances is identified by the value *{{retrieveProcInst}}* set on the attribute {{bpmnAction}}: {{action}}:
{code}
<wsdl:binding name="Order" xmlns:bpmn="http://petals.ow2.org/se/bpmn2.0/1.0">
<wsdl:operation name="searchOrder" type="...">
<wsdl:binding name="Order" xmlns:bpmn="http://petals.ow2.org/se/bpmn2.0/1.0">
<wsdl:operation name="searchOrder" type="...">
<bpmn:operation bpmnAction="retrieveProcInst" action="retrieveProcInst" />
<bpmn:input-parameter name="isActive" value="/searchOrderRequest/isInProgress" />
<bpmn:input-parameter name="responsibleUser" value="/searchOrderRequest/responsibleUser" />
<bpmn:input-parameter name="responsibleUser" value="/searchOrderRequest/responsibleUser" />
<wsdl:binding name="OrderBinding" type="tns:Order">
<wsdl:operation name="newOrder">
<wsdl:operation name="newOrder">
<bpmn:operation bpmnAction="startEvent" />
<bpmn:input-parameter name="processId" value="newOrder" />
<bpmn:input-parameter name="startEvent" value="default" />
<bpmn:input-parameter name="processId" value="newOrder" />
<bpmn:input-parameter name="startEvent" value="default" />
<bpmn:operation processDefinitionId="order" action="startEvent" id="newOrder"/>
<bpmn:userId>/*[local-name()='newOrderRequest']/*[local-name()='userName']</bpmn:userId>
<bpmn:userId>/*[local-name()='newOrderRequest']/*[local-name()='userName']</bpmn:userId>
<bpmn:variable name="customerName" value="/newOrderRequest/customerName" />
<bpmn:variable name="address" value="/newOrderRequest/address" />
<bpmn:variable name="address" value="/newOrderRequest/address" />
</wsdl:operation>
<wsdl:operation name="validOrder">
<wsdl:operation name="validOrder">
<bpmn:operation bpmnAction="completeTaskOp" />
<bpmn:input-parameter name="processInstanceId" value="/validOrderRequest/orderId" />
<bpmn:input-parameter name="taskDefinitionKey" value="validOrder" />
<bpmn:input-parameter name="processInstanceId" value="/validOrderRequest/orderId" />
<bpmn:input-parameter name="taskDefinitionKey" value="validOrder" />
<bpmn:operation processDefinitionId="order" action="userTask" id="validOrder"/>
<bpmn:processId>/*[local-name()='validOrderRequest']/*[local-name()='orderId']</bpmn:processId>
<bpmn:userId>/*[local-name()='validOrderRequest']/*[local-name()='userName']</bpmn:userId>
<bpmn:processId>/*[local-name()='validOrderRequest']/*[local-name()='orderId']</bpmn:processId>
<bpmn:userId>/*[local-name()='validOrderRequest']/*[local-name()='userName']</bpmn:userId>
<bpmn:variable name="validationApproved" value="/validOrderRequest/isValidated" />
<bpmn:variable name="creditCardNumber" value="/validOrderRequest/creditCardNumber" />
<bpmn:variable name="creditCardNumber" value="/validOrderRequest/creditCardNumber" />
</wsdl:operation>
<wsdl:operation name="searchOrder">
<wsdl:operation name="searchOrder">
<bpmn:operation bpmnAction="retrieveProcInst" action="retrieveProcInst" />
<bpmn:input-parameter name="processInstanceId" value="/searchOrderRequest/orderId" />
<bpmn:input-parameter name="isActive" value="/searchOrderRequest/isInProgress" />
<bpmn:input-parameter name="responsibleUser" value="/searchOrderRequest/responsibleUser" />
<bpmn:input-parameter name="responsibleGroup" value="/searchOrderRequest/responsibleGroup" />
<bpmn:output xsl="searchOrderOutput.xsl" />
<bpmn:input-parameter name="isActive" value="/searchOrderRequest/isInProgress" />
<bpmn:input-parameter name="responsibleUser" value="/searchOrderRequest/responsibleUser" />
<bpmn:input-parameter name="responsibleGroup" value="/searchOrderRequest/responsibleGroup" />
<bpmn:output xsl="searchOrderOutput.xsl" />
<bpmn:input-parameter name="processInstanceId" value="/searchOrderRequest/orderId" />
<bpmn:input-parameter name="isActive" value="/searchOrderRequest/isInProgress" />
<bpmn:input-parameter name="responsibleUser" value="/searchOrderRequest/responsibleUser" />
<bpmn:input-parameter name="responsibleGroup" value="/searchOrderRequest/responsibleGroup" />
<bpmn:output xsl="searchOrderOutput.xsl" />
<bpmn:input-parameter name="isActive" value="/searchOrderRequest/isInProgress" />
<bpmn:input-parameter name="responsibleUser" value="/searchOrderRequest/responsibleUser" />
<bpmn:input-parameter name="responsibleGroup" value="/searchOrderRequest/responsibleGroup" />
<bpmn:output xsl="searchOrderOutput.xsl" />
<wsdl:input />
<wsdl:output />
<wsdl:output />