cancel
Showing results for 
Search instead for 
Did you mean: 

How programmatically get flows?

sanets
Champ in-the-making
Champ in-the-making
Hello!
I am looking for good idea how to implement the following.

I have  many user tasks where user select the  flow of execution, like in attach.

How I can programmatically get this flows and show them to user.
2 REPLIES 2

sanets
Champ in-the-making
Champ in-the-making
I have found Form Values

Like this

<userTask id="prepareByUser" name="Prepare by user" activiti:candidateGroups="accountancy">
      <extensionElements>
        <activiti:formProperty id="preparedByUserNextStep" name="preparedByUserNextStep" type="string" required="true">     f           </activiti:formProperty>
        <activiti:formProperty id="statementOfClaim" name="statementOfClaim" type="string"></activiti:formProperty>
        <activiti:formProperty id="userDecision" name="userDecision" type="string" variable="default">
          <activiti:value id="giveToPartner" name="Отдать партнерам"></activiti:value>
          <activiti:value id="processByHimself" name="Обработать самим"></activiti:value>
        </activiti:formProperty>
      </extensionElements>

How can I get access to <activiti:value id="giveToPartner"> ?

trademak
Star Contributor
Star Contributor
Hi,

You can use the TaskService getTaskFormData method and then access the FormProperties.
When the FormProperty has form values you can retrieve those by calling the getType method, cast it to a EnumFormProperty and call getInformation("values")
Then you'll get a list of the form values.

Best regards,