AnsweredAssumed Answered

How to use FromServiece and exlusive Gateway?

Question asked by euros on Oct 22, 2013
Latest reply on Oct 25, 2013 by euros
I am new to activiti so i followed this tutorial to get a running version i also added some code myself
http://rioasmara.wordpress.com/2013/01/26/simple-activiti-bpm-and-spring-for-task-assignment/

But I have two Problems.
First I am not able to get the formProperties.
My BPM process i wanted to use:

<blockcode>
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
  <process id="vacationRequest" name="Urlaubsantrag" isExecutable="true">
    <startEvent id="startevent1" name="Start">
      <extensionElements>
        <activiti:formProperty id="okNow"></activiti:formProperty>
      </extensionElements>
    </startEvent>
    <userTask id="requestVacation1" name="RequestVacation1">
      <documentation>hallo ich will Urlaub</documentation>
      <extensionElements>
        <activiti:formProperty id="name"></activiti:formProperty>
        <activiti:formProperty id="start" type="date"></activiti:formProperty>
        <activiti:formProperty id="end" type="date"></activiti:formProperty>
        <activiti:formProperty id="motivation"></activiti:formProperty>
      </extensionElements>
    </userTask>
    <userTask id="confirmVacation" name="ConfirmVacation">
      <extensionElements>
        <activiti:formProperty id="reject" type="boolean"></activiti:formProperty>
      </extensionElements>
    </userTask>
    <sequenceFlow id="flow1ToRequest" sourceRef="startevent1" targetRef="requestVacation1"></sequenceFlow>
    <userTask id="registervacation" name="Register Vacation">
      <extensionElements>
        <activiti:formProperty id="submit" type="boolean"></activiti:formProperty>
      </extensionElements>
    </userTask>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow5" sourceRef="registervacation" targetRef="endevent1"></sequenceFlow>
    <sequenceFlow id="flow7toConfirm" sourceRef="requestVacation1" targetRef="confirmVacation"></sequenceFlow>
    <exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway>
    <sequenceFlow id="flow8toEx" sourceRef="confirmVacation" targetRef="exclusivegateway1"></sequenceFlow>
    <sequenceFlow id="flow9reject" sourceRef="exclusivegateway1" targetRef="startevent1">
      <conditionExpression xsi:type="tFormalExpression"><${requestVacation1==false}></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow10submit" sourceRef="exclusivegateway1" targetRef="registervacation">
      <conditionExpression xsi:type="tFormalExpression"><${requestVacation1==true}></conditionExpression>
    </sequenceFlow>
  </process>
 
</definitions>
</blockcode>

I thought i get the properties from the FormServiece but everything i try returns only empty lists.

formserviece.getRenderedTaskForm(taskId);
formserviece.getStartFormData(processDefinitionID).getFormProperties();

I hope you can help my how i get the properties.

My second Problem is that i am not able to use the exlusivegateway.
Everytime i set the the process "ConfirmVacation" to complet "Register Vacation" is automatically started.

Thank you

Outcomes