cancel
Showing results for 
Search instead for 
Did you mean: 

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

jugglingcats
Champ in-the-making
Champ in-the-making
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.
1 REPLY 1

trademak
Star Contributor
Star Contributor
Hi,

In Activiti we don't use data input and output definitions, since you can manipulate variables in the process and task context by using our API. So that would be the mean reason why this process definition is not working for you. The transition expression should refer to a transition variable you can set when starting the process instance for example.

Best regards,