AnsweredAssumed Answered

About FormService some problem

Question asked by croc1 on Feb 15, 2012
My bpmn20.xml like this

<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="FormTest" name="FormTest">
    <documentation>Place documentation for the 'FormTest' process here.</documentation>
    <startEvent id="startevent1" name="Start"></startEvent>
    <userTask id="usertask1" name="User Task" activiti:assignee="${leaver}">
      <extensionElements>
        <activiti:formProperty id="name" name="name" type="string" variable="${leaver}" readable="true" writable="true"></activiti:formProperty>
        <activiti:formProperty id="days" name="days" type="long" variable="3" required="true" readable="true" writable="true"></activiti:formProperty>
        <activiti:formProperty id="reson" name="reson" type="string" variable="…." required="true" readable="true" writable="true"></activiti:formProperty>
      </extensionElements>
    </userTask>
    <sequenceFlow id="flow1" name="" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow2" name="" sourceRef="usertask1" targetRef="endevent1"></sequenceFlow>
  </process>

Operation Steps:
1.deploy
2.start ProcessInstance

      Map<String,Object> vars = new HashMap<String,Object>();
      vars.put("leaver", "croc");
      ProcessInstance pi = runtimeService.startProcessInstanceByKey("FormTest",vars);
      System.out.println(pi.getId());

3.test
formService.getTaskFormData("3604");
the formProperties
            –elementData
the value is null
[attachment=0]QQQ.png[/attachment]

thx

Attachments

Outcomes