cancel
Showing results for 
Search instead for 
Did you mean: 

Display Form from Start Event in later UserTasks

sdwilly22
Champ in-the-making
Champ in-the-making
I have a form that the users will fill out to start a process. When that is completed the process goes on to the next step a UserTask for approval. That user needs to see the data in the form in order to make their decision. I'm sure it is possible to show the form in subsequent steps but I cannot find how to do it. I have searched the forums. I have purchased and read Activiti in Action. There is probably an easy way to do this and I am just missing it. If anyone could help I would be very appreciative.
1 REPLY 1

sdwilly22
Champ in-the-making
Champ in-the-making
I figured it out and I thought I would leave an explanation here for any people looking for this answer.

Say you have a form in a start event like this.
<code>
    <startEvent id="startevent1" name="User Requests Travel" activiti:formKey="ConferenceAttendanceForm">
      <extensionElements>
        <activiti:formProperty id="AttName" name="Attendee Name" type="string" required="true"></activiti:formProperty>
        <activiti:formProperty id="AttRank" name="Attendee Rank" type="string"></activiti:formProperty>
        <activiti:formProperty id="AttDegree" name="Attendee Degree" type="string"></activiti:formProperty>
        <activiti:formProperty id="AttJobTitle" name="Attendee Job Title" type="string" required="true"></activiti:formProperty>
        <activiti:formProperty id="AttDept" name="Attendee Department" type="enum" required="true">
      </extensionElements>
    </startEvent>
</code>

A subsequent UserTask can see the data fields like this. value="${activiti:formProperty.id}"
<code>
   <userTask id="usertask2" name="Department Approval" activiti:candidateGroups="deptAdmin,deptHead" activiti:formKey="ConferenceAttendanceForm">
          <extensionElements>
        <activiti:formProperty id="AttName" name="Attendee Name" value="${AttName}" type="string" required="true"></activiti:formProperty>
        <activiti:formProperty id="AttRank" name="Attendee Rank" value="${AttRank}" type="string"></activiti:formProperty>
        <activiti:formProperty id="AttDegree" name="Attendee Degree" value="${AttDegree}" type="string"></activiti:formProperty>
        <activiti:formProperty id="AttJobTitle" name="Attendee Job Title" value="${AttJobTitle}" type="string" required="true"></activiti:formProperty>
        <activiti:formProperty id="AttDept" name="Attendee Department" value="${AttDept}" type="enum" required="true">   </activiti:formProperty>
    </extensionElements>
    </userTask>
</code>