AnsweredAssumed Answered

Variable name for custom outcomes?

Question asked by phillip.toone on Mar 22, 2018
Latest reply on Mar 22, 2018 by phillip.toone

I am new to Activiti so please excuse my ignorance.  I have installed activiti-app and I am trying to create a simple process with a simple flow condition.  I have created a process with a "Start Event" that references a form with nothing but "Possible Outcomes" of "Accept" and "Reject".  This event flows to a "User Task" assigned to myself and an "End Event".  The flow to the "End Event" is set up as the default flow.  I would like to modify the flow condition to the "User Task" to be conditional upon the custom outcomes from the form referenced by the "Start Event".  I would expect to be able to use something like "${status == "Accept"}" or "${status == 'Accept'}" or "${status == "Accept"}" or "${outcome == 'Accept'}" but the only thing that seems to keep from generating an error is "${1 == 1}"  I suspect that I am not using the right variable name associated with the custom outcomes of the form.  I have downloaded and included the xlm for my process here:


<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="" xmlns:xsi="" xmlns:xsd="" xmlns:activiti="" xmlns:bpmndi="" xmlns:omgdc="" xmlns:omgdi="" typeLanguage="" expressionLanguage="" targetNamespace="">
  <process id="ExampleProcess" name="Example Process" isExecutable="true">
    <startEvent id="startProcess" activiti:formKey="StartForm"></startEvent>
    <userTask id="nextStep" activiti:assignee="$INITIATOR">
        <modeler:activiti-idm-initiator xmlns:modeler=""><![CDATA[true]]></modeler:activiti-idm-initiator>
    <endEvent id="endProcess"></endEvent>
    <sequenceFlow id="rejectArrow" sourceRef="startProcess" targetRef="endProcess"></sequenceFlow>
    <sequenceFlow id="acceptArrow" sourceRef="startProcess" targetRef="nextStep">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${1 == 1}]]></conditionExpression>
  <bpmndi:BPMNDiagram id="BPMNDiagram_ExampleProcess">
    <bpmndi:BPMNPlane bpmnElement="ExampleProcess" id="BPMNPlane_ExampleProcess">
      <bpmndi:BPMNShape bpmnElement="startProcess" id="BPMNShape_startProcess">
        <omgdc:Bounds height="30.0" width="30.0" x="100.0" y="163.0"></omgdc:Bounds>
      <bpmndi:BPMNShape bpmnElement="nextStep" id="BPMNShape_nextStep">
        <omgdc:Bounds height="80.0" width="100.0" x="175.0" y="138.0"></omgdc:Bounds>
      <bpmndi:BPMNShape bpmnElement="endProcess" id="BPMNShape_endProcess">
        <omgdc:Bounds height="28.0" width="28.0" x="101.0" y="240.0"></omgdc:Bounds>
      <bpmndi:BPMNEdge bpmnElement="acceptArrow" id="BPMNEdge_acceptArrow">
        <omgdi:waypoint x="130.0" y="178.0"></omgdi:waypoint>
        <omgdi:waypoint x="175.0" y="178.0"></omgdi:waypoint>
      <bpmndi:BPMNEdge bpmnElement="rejectArrow" id="BPMNEdge_rejectArrow">
        <omgdi:waypoint x="115.0" y="193.0"></omgdi:waypoint>
        <omgdi:waypoint x="115.0" y="240.0"></omgdi:waypoint>

But I don't see anything here that would help me know what the name of this variable should be.