AnsweredAssumed Answered

'Unknown property used in expression': using dataOutputAssociation and process property

Question asked by jugglingcats on Aug 20, 2013
Latest reply on Aug 21, 2013 by trademak
Hi, I am fairly new to BPMN2 and have been doing some work with jBPM and Activiti to compare the two. I have a process that is working in jBPM and am trying to get it running in Activiti. I don't mind changing the BPMN2 to get it working, but need a little guidance!

In the jBPM working version my sequence flow looks like this:


    <bpmn2:sequenceFlow id="published..deleted" name="published..deleted" sourceRef="published..outgoing" targetRef="deleted..incoming">
      <bpmn2:conditionExpression>return "delete".equals(transition)</bpmn2:conditionExpression>
    </bpmn2:sequenceFlow>


Activiti complains about this not returning a boolean expression, so looking at some other examples, I tried this:


    <bpmn2:sequenceFlow id="published..deleted" name="published..deleted" sourceRef="published..outgoing" targetRef="deleted..incoming">
      <bpmn2:conditionExpression>${"delete".equals(transition)}</bpmn2:conditionExpression>
    </bpmn2:sequenceFlow>


But now Activiti complains that
Unknown property used in expression: ${"delete".equals(transition)}


My 'transition' property is declared at the top of the file, like so:

    <bpmn2:property id="transition"></bpmn2:property>


This is what my task looks like:

    <bpmn2:manualTask id="published" name="published">
      <bpmn2:ioSpecification>
        <bpmn2:dataOutput id="published..result" name="transition"></bpmn2:dataOutput>
        <bpmn2:inputSet></bpmn2:inputSet>
        <bpmn2:outputSet>
          <bpmn2:dataOutputRefs>published..result</bpmn2:dataOutputRefs>
        </bpmn2:outputSet>
      </bpmn2:ioSpecification>
      <bpmn2:dataOutputAssociation>
        <bpmn2:sourceRef>published..result</bpmn2:sourceRef>
        <bpmn2:targetRef>transition</bpmn2:targetRef>
      </bpmn2:dataOutputAssociation>
    </bpmn2:manualTask>


In the examples, I can only find ones using activiti extensions to do with forms, but I'd like to drive this process programatically.

Any tips appreciated, as am a bit stuck at this point!

Alfie.

Outcomes