Petals-SE-Activiti 1.0.1+

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (2)

View Page History
</definitions>
{code}
# The service to call is referenced through the definition of a BPMN interface:
{code:xml}
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" ...>
...
<process id="shifting-summary-sending" name="Shifting summary sending process" isExecutable="true">
...
<serviceTask id="getHRManagerEmail" name="Retrieve email of the human resource manager"
implementation="##WebService" operationRef="rldProcess:getHumanResourceManagerOp">
...
</serviceTask>
<interface name="User base service" implementationRef="userbaseService:userBase">
<operation id="getHumanResourceManagerOp" name="Get HR manager" implementationRef="userbaseService:humanResourceManager">
<inMessageRef>rldProcess:getHumanResourceManagerRequestMessage</inMessageRef>
<outMessageRef>rldProcess:getHumanResourceManagerResponseMessage</outMessageRef>
</operation>
</interface>
<message id="getHumanResourceManagerRequestMessage" itemRef="rldProcess:getHumanResourceManagerRequestItem" />
<message id="getHumanResourceManagerResponseMessage" itemRef="rldProcess:getHumanResourceManagerResponseItem" />
<itemDefinition id="getHumanResourceManagerRequestItem" structureRef="userbaseService:humanResourceManager" />
<itemDefinition id="getHumanResourceManagerResponseItem" structureRef="userbaseService:humanResourceManagerResponse" />
...
</process>
</definitions>
{code}
where '{{implementationRef}}' is the port name of the service, and '{{structureRef}}' is the type of messages exchanged with the service. These both references are defined in the imported WSDL.
# Next, define mapping of the service request and the service reply
{code:xml}
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" ...>
...
<process id="shifting-summary-sending" name="Shifting summary sending process" isExecutable="true">
...
<serviceTask id="getHRManagerEmail" name="Retrieve email of the human resource manager"
implementation="##WebService" operationRef="rldProcess:getHumanResourceManagerOp">
<ioSpecification>
<dataInput itemSubjectRef="rldProcess:getHumanResourceManagerRequestItem" id="getHRManagerEmailTaskInput" />
<dataOutput itemSubjectRef="rldProcess:getHumanResourceManagerResponseItem" id="getHRManagerEmailTaskOutput" />
<inputSet>
<dataInputRefs>getHRManagerEmailTaskInput</dataInputRefs>
</inputSet>
<outputSet>
<dataOutputRefs>getHRManagerEmailTaskOutput</dataOutputRefs>
</outputSet>
</ioSpecification>
<dataInputAssociation>
<targetRef>getHRManagerEmailTaskInput</targetRef>
<assignment>
<from>${employeeId}</from>
<to>${getHRManagerEmailTaskInput.userId}</to>
</assignment>
</dataInputAssociation>
<dataOutputAssociation>
<targetRef>hrManagerEmail</targetRef>
<transformation>${getHRManagerEmailTaskOutput.email}</transformation>
</dataOutputAssociation>
</serviceTask>
...
</process>
</definitions>
{code}

{tip}
Dash ('{{-}}') included in XML tag of service request/reply are removed. In BPMN assignment you must use the standard naming convention.
Example: the XML tag '{{user-id}}' must be used as '{{userId}' in assignments.
{tip}

h1. Using the mode "integration"