[jboss-user] [jBPM] - dataInputAssociation <assignment> expressions

M Arnold do-not-reply at jboss.com
Fri Jan 20 13:09:30 EST 2012


M Arnold [https://community.jboss.org/people/marnold] created the discussion

"dataInputAssociation <assignment> expressions"

To view the discussion, visit: https://community.jboss.org/message/647913#647913

--------------------------------------------------------------
Hi,

I'm struggling to map input parameters to my task from process variables.  I can't find much documentation besides  http://docs.jboss.org/jbpm/v5.2/userguide/ch05.html#sec.data 5.8.1. Data, and the BPMN2 spec from OMG is cryptic.

I have a task something like this:

        <task id="_4" tns:taskName="Custom" name="sendCustom">
            <incoming>_2-_4</incoming>
            <outgoing>_4-_5</outgoing>
            <ioSpecification id="InputOutputSpecification_1">
                <dataInput id="_4_messageInInput" name="messageIn" />
                <dataOutput id="_4_messageOutOutput" name="messageOut" />
                <inputSet id="InputSet_1">
                    <dataInputRefs>_4_messageInInput</dataInputRefs>
                </inputSet>
                <outputSet id="OutputSet_1">
                    <dataOutputRefs>_4_messageOutOutput</dataOutputRefs>
                </outputSet>
            </ioSpecification>
            <dataInputAssociation id="DataInputAssociation_2">
                <sourceRef>event</sourceRef>
                <targetRef>_4_messageInInput</targetRef>
                <assignment id="Assignment_2">
                    <from xsi:type="tFormalExpression" id="FormalExpression_3">.</from>
                    <to xsi:type="tFormalExpression" id="FormalExpression_4">.</to>
                </assignment>
            </dataInputAssociation>
            <dataOutputAssociation id="DataOutputAssociation_1">
                <sourceRef>_4_messageOutOutput</sourceRef>
                <targetRef>resultMessage_4</targetRef>
            </dataOutputAssociation>

        </task>


Where 'event' is a process variable.  So what can I put in the <assignment><to> and <from>?  An XPath expression?  What if it's not XML?  When I can I use #{event}?  What are the valid values for from at xsi:type besides "tFormalExpression"?

When I execute this task as it is above, I get:

Caused by: java.lang.NullPointerException
        at org.jbpm.bpmn2.xpath.XPATHAssignmentAction.execute(XPATHAssignmentAction.java:91)
        at org.jbpm.workflow.instance.node.WorkItemNodeInstance.handleAssignment(WorkItemNodeInstance.java:193)
        ... 81 more


I'm sorry if this is a very basic or broad question.  I've scoured the web and really can't find many examples.

Thanks in advance for help.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/647913#647913]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120120/b0314ae7/attachment.html 


More information about the jboss-user mailing list