Discussion:
[jboss-user] [jBPM] - Reusable subprocess static value assignment to parameter is not working
mika1325
2012-10-12 07:05:20 UTC
Permalink
mika1325 [https://community.jboss.org/people/mika1325] created the discussion

"Reusable subprocess static value assignment to parameter is not working"

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

--------------------------------------------------------------
I invoking subprocess and try to pass static value to subprocess parameter. Is this feature not implemented in jbpm5.3 or am i doing something wrong?

In example below I set to parameters OrderNo and RejectStatus. OrderNo value is passed to subprocess, but RejectStatus value in subprocess is null.

<bpmn2:callActivity xmlns:bpmn2=" http://www.omg.org/spec/BPMN/20100524/MODEL http://www.omg.org/spec/BPMN/20100524/MODEL" id="_10" drools:selectable="true" xmlns:drools=" http://www.jboss.org/drools http://www.jboss.org/drools" drools:independent="false" drools:waitForCompletion="true" name="REJECT_ORDER" calledElement="REJECT_ORDER">
      <bpmn2:incoming>_14-_10</bpmn2:incoming>
      <bpmn2:outgoing>_10-_12</bpmn2:outgoing>
      <bpmn2:ioSpecification id="_b695KhQxEeKSq8i_spxl7Q">
        <bpmn2:dataInput id="_10_OrderNoInput" drools:dtype="String" itemSubjectRef="__10_OrderNoInputItem" name="OrderNo"/>
        <bpmn2:dataInput id="_10_RejectStatusInput" drools:dtype="String" itemSubjectRef="__10_RejectStatusInputItem" name="RejectStatus"/>
        <bpmn2:inputSet id="_b695KxQxEeKSq8i_spxl7Q">
          <bpmn2:dataInputRefs>_10_OrderNoInput</bpmn2:dataInputRefs>
          <bpmn2:dataInputRefs>_10_RejectStatusInput</bpmn2:dataInputRefs>
        </bpmn2:inputSet>
        <bpmn2:outputSet id="_b695LBQxEeKSq8i_spxl7Q"/>
      </bpmn2:ioSpecification>
      <bpmn2:dataInputAssociation id="_b695LRQxEeKSq8i_spxl7Q">
        <bpmn2:sourceRef>OrderNo</bpmn2:sourceRef>
        <bpmn2:targetRef>_10_OrderNoInput</bpmn2:targetRef>
      </bpmn2:dataInputAssociation>
      <bpmn2:dataInputAssociation id="_b695LxQxEeKSq8i_spxl7Q">
        <bpmn2:targetRef>_10_RejectStatusInput</bpmn2:targetRef>
        <bpmn2:assignment id="_b695MBQxEeKSq8i_spxl7Q">
          <bpmn2:from xsi:type="bpmn2:tFormalExpression" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance" id="_b695MRQxEeKSq8i_spxl7Q"><![CDATA[ATM]]></bpmn2:from>
          <bpmn2:to xsi:type="bpmn2:tFormalExpression" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance" id="_b695MhQxEeKSq8i_spxl7Q">_10_RejectStatusInput</bpmn2:to>
        </bpmn2:assignment>
      </bpmn2:dataInputAssociation>
    </bpmn2:callActivity>
--------------------------------------------------------------

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

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Artashes Aghajanyan
2013-03-09 02:14:21 UTC
Permalink
Artashes Aghajanyan [https://community.jboss.org/people/artash] created the discussion

"Re: Reusable subprocess static value assignment to parameter is not working"

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

--------------------------------------------------------------
I have faced the same issue, my workaround was to define a process variable and set the desired constant value to that process variable.

For example if you're using the eclipse editor you can define a process variable YourConstantVar in the bpmn and then assign a value to it in "On Entry Actions" of the subprocess:

kcontext.setVariable("YourConstantVar", "ATM");

Then map the subprocess input to YourConstantVar and it shall work.
--------------------------------------------------------------

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

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
mika1325
2013-03-09 09:19:12 UTC
Permalink
mika1325 [https://community.jboss.org/people/mika1325] created the discussion

"Re: Reusable subprocess static value assignment to parameter is not working"

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

--------------------------------------------------------------
Thanks for reply. I used the same method.
--------------------------------------------------------------

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

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