Specifying dataInput for sendTask

9 views
Skip to first unread message

Farrukh Najmi

unread,
Sep 16, 2010, 11:16:29 AM9/16/10
to BPMN Users Group

Dear colleagues,

Thank you for your help in my recent inquiries. Based on your input I
am no longer considering using gloablTask / callActivity for commonly
occuring reusable tasks in my process.

Instead I am thinking of using sendTask / receiveTask.

In my process I will have multiple instances of sendTask where each
sendTask sends a different instance of a message of the same type.
Reading the spec, I am still quite unclear on how to specify the
dataInput for each sendTask.

Does any one have any simple examples that might help my
understanding?

Below is the BPMN2 (beta2) file for a simplified process with 2
sendTasks. Both sendTasks refer to their own respective messages,
where each message references their own respective itemDefinitions and
both itemDefinitions reference the same structure
(rim:WorkflowActionType). Each task needs to use a separate
WorkflowActionType instance where the only difference is in their "id"
attribute value and their "action" attribute value. One has action =
"RequestForReview" while other has action = "Withdraw".

Do I have the BPMN right so far?

How to I specify the two tasks to use a different input (of type
rim:WorkflowActionType)?

Thanks for your help and patience with my questions.

[code]
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="defaultChangeReviewProcess" typeLanguage="http://
www.w3.org/2001/XMLSchema"
expressionLanguage="http://www.w3.org/1999/XPath"
targetNamespace="http://www.omg.org/bpmn20"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:4.0"
xmlns:act="urn:oasis:names:tc:ebxml-regrep:xsd:rs:4.0:actions"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:roles="urn:acme:roles"
xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL
http://www.omg.org/spec/BPMN/2.0/20100501/BPMN20.xsd
urn:oasis:names:tc:ebxml-regrep:xsd:rim:4.0 http://www.wellfleetsoftware.com/files//rim.xsd">
<!--xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL
http://www.omg.org/spec/BPMN/2.0/20100501/BPMN20.xsd
urn:oasis:names:tc:ebxml-regrep:xsd:rim:4.0 ../xsd/rim.xsd"-->

<itemDefinition id="requestForReviewItemDefinition"
structureRef="rim:WorkflowActionType" />
<message id="requestForReviewMessage" name="RequestForReview"
itemRef="requestForReviewItemDefinition" />

<itemDefinition id="withdrawItemDefinition"
structureRef="rim:WorkflowActionType" />
<message id="withdrawMessage" name="Withdraw"
itemRef="withdrawItemDefinition" />

<process id="submitterProcess" name="Submitter Process">
<laneSet name="Submitter Pool" id="submitterPool">
<lane name="Submitter" id="submitterLane">
<flowNodeRef>start</flowNodeRef>
<flowNodeRef>requestForReviewDoWorkflowAction</
flowNodeRef>
<flowNodeRef>withdrawDoWorkflowAction</flowNodeRef>
<flowNodeRef>end</flowNodeRef>
</lane>
</laneSet>

<!-- Submitter lane flowNodes -->
<startEvent id="start"/>
<sequenceFlow sourceRef="start"
targetRef="requestForReviewDoWorkflowAction"></sequenceFlow>
<sendTask id="requestForReviewDoWorkflowAction"
messageRef="requestForReviewMessage" implementation="##unspecified">
</sendTask>
<sequenceFlow sourceRef="requestForReviewDoWorkflowAction"
targetRef="withdrawDoWorkflowAction"></sequenceFlow>
<sendTask id="withdrawDoWorkflowAction"
messageRef="withdrawMessage" implementation="##unspecified">
</sendTask>
<sequenceFlow sourceRef="withdrawDoWorkflowAction"
targetRef="end"></sequenceFlow>
<endEvent id="end"/>
</process>

</definitions>

[/code]



Antoine Toulme

unread,
Sep 16, 2010, 11:39:30 AM9/16/10
to bpmn-use...@googlegroups.com
I think the FTF published examples:

That should help.




--
You received this message because you are subscribed to the Google Groups "BPMN Users Group" group.
To post to this group, send email to bpmn-use...@googlegroups.com.
To unsubscribe from this group, send email to bpmn-users-gro...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bpmn-users-group?hl=en.


Farrukh Najmi

unread,
Sep 20, 2010, 12:16:05 PM9/20/10
to BPMN Users Group

The "examples" link was a goldmine that had escaped my attention.
Thanks Antoine!

Looking at the examples, I see two flavors of sendTask usage

1. Where <ioSpecification> and <dataInputAssociation> is specified
within the sendTask

<!-- From Incident Management(Process Engine Executable).bpmn-->
<sendTask name="Send mail to account manager"
messageRef="tns:AnswerMessage"
operationRef="tns:sendMailToIssueReporterOperation" id="_1-150">
<ioSpecification>
<dataInput itemSubjectRef="tns:AnswerItem"
id="AnswerDataInputOfSendTask" />
<inputSet>
<dataInputRefs>AnswerDataInputOfSendTask</dataInputRefs>
</inputSet>
<outputSet />
</ioSpecification>
<dataInputAssociation>
<sourceRef>TicketDataObject</sourceRef>
<targetRef>AnswerDataInputOfSendTask</targetRef>
<assignment>
<from>${getDataObject("TicketDataObject").reporter}</from>
<to>${getDataInput("AnswerDataInputOfSendTask").recipient</
to>
</assignment>
<assignment>
<from>
A ticket has been created for your issue, which is now in
status ${getDataObject("TicketDataObject").status}.
</from>
<to>${getDataInput("AnswerDataInputOfSendTask").body}</to>
</assignment>
</dataInputAssociation>
</sendTask>

2. Where <ioSpecification> and <dataInputAssociation> is NOT specified
within the sendTask

<!-- From CorrelationExampleSeller.bpmn-->
<sendTask id="sendQuote" name="Send Quote"
messageRef="tns:msgQuote"
operationRef="tns:requestQuoteOp"/>

Can anyone tell me when is <ioSpecification> and
<dataInputAssociation> needed and when it is not for a serviceTask.
Why does the CorrelationExampleSeller.bpmn not define it? Thanks.

On Sep 16, 11:39 am, Antoine Toulme <anto...@toulme.name> wrote:
> I think the FTF published examples:http://www.omgwiki.org/bpmn2.0-ftf/doku.php?id=public:sub-teams:examples
>
>  <http://www.omgwiki.org/bpmn2.0-ftf/doku.php?id=public:sub-teams:examples>That
> should help.
>
> > bpmn-users-gro...@googlegroups.com<bpmn-users-group%2Bunsu...@googlegroups.com>
> > .
Reply all
Reply to author
Forward
0 new messages