AnsweredAssumed Answered

exclusive gateway has no visible effect

Question asked by werners on Mar 20, 2014
Latest reply on Mar 21, 2014 by werners
Hi all,
i would like to use a exclusive gateway that has three cases, yes, no and “doku”.
If the user chose yes am user task should be in invoked. In the cases of “No” and “Doku” two different messages should be send with email.
When i start an instance of my process definition, I can choose the value for exclusive gateway via dropdown, but I always receive only these mails from the service task “informCustomer”.
process definition:

<userTask id="evaluateRequestByManager" name="Evaluate loan request by manager" activiti:candidateGroups="management">
      <extensionElements>
        <activiti:formProperty id="customerName" name="Customer name" expression="${loanApplication.customerName}" writable="false"/>
        <activiti:formProperty id="income" name="Income of customer" expression="${loanApplication.income}" writable="false"/>
        <activiti:formProperty id="requestedAmount" name="Requested loan amount" expression="${loanApplication.requestedAmount}" writable="false"/>
        <activiti:formProperty id="creditCheckOk" name="Outcome of credit check" expression="${loanApplication.creditCheckOk}" writable="false"/>
        <activiti:formProperty id="requestApproved" name="Do you approve the request?" required="true" type="enum">
          <activiti:value id="true" name="Yes"/>
          <activiti:value id="false" name="No"/>
          <activiti:value id="doku" name="Doku"/>
        </activiti:formProperty>
        <activiti:formProperty id="explanation" name="Explanation"/>
      </extensionElements>
    </userTask>
    <sequenceFlow sourceRef="evaluateRequestByManager" targetRef="approvalGateway" />
    <exclusiveGateway id="approvalGateway" />
    <sequenceFlow sourceRef="approvalGateway" targetRef="informCustomer">
      <conditionExpression xsi:type="tFormalExpression">${requestApproved == false}</conditionExpression>
    </sequenceFlow>
    <sequenceFlow sourceRef="approvalGateway" targetRef="processRequest">
        <conditionExpression xsi:type="tFormalExpression">${requestApproved == true}</conditionExpression>
    </sequenceFlow>
     <sequenceFlow sourceRef="approvalGateway" targetRef="moredocuments">
        <conditionExpression xsi:type="tFormalExpression">${requestApproved == doku}</conditionExpression>
    </sequenceFlow>
    <serviceTask id="informCustomer" activiti:type="mail">
      <extensionElements>
        <activiti:field name="to" expression="${loanApplication.emailAddress}" />
        <activiti:field name="subject" stringValue="Loan Request Denied" />
        <activiti:field name="html">
          <activiti:expression>
            <![CDATA[
              <html>
                <body>
                  Hello ${loanApplication.customerName},<br/><br/>
                 
                  Your loan request has been denied for the following reason:${explanation}.<br/><br/>
                 
                  Kind regards,<br/>
                 
                  The Loan Sharks Company.
                </body>
              </html>
            ]]>
          </activiti:expression>
        </activiti:field>
      </extensionElements>
    </serviceTask>
     <sequenceFlow sourceRef="informCustomer" targetRef="theEnd" />
     <serviceTask id="moredocuments" activiti:type="mail">
      <extensionElements>
        <activiti:field name="to" expression="${loanApplication.emailAddress}" />
        <activiti:field name="subject" stringValue="Request for more documents" />
        <activiti:field name="html">
          <activiti:expression>
            <![CDATA[
              <html>
                <body>
                  Hello ${loanApplication.customerName},<br/><br/>
                 
                  We need mor documents: ${explanation}.<br/><br/>
                 
                  Kind regards,<br/>
                 
                  The Loan Sharks Company.
                </body>
              </html>
            ]]>
          </activiti:expression>
        </activiti:field>     
      </extensionElements>
    </serviceTask>
  
    <sequenceFlow sourceRef="moredocuments" targetRef="theEnd" />
    <userTask id="processRequest" name="Process the loan request" activiti:assignee="fozzie" />
    <sequenceFlow sourceRef="processRequest" targetRef="theEnd" />
   
    <endEvent id="theEnd" />
  </process>
</definitions>

Can someone give me an advice what is wrong with my processdefinition?
Thank you in advance.


Outcomes