AnsweredAssumed Answered

How to implement auto approval of forms?

Question asked by bbarani on Feb 26, 2013
Latest reply on Feb 28, 2013 by jbarrez

Can someone let me know how to implement an auto approval process.

For example, the below custom form should get auto approved and stored in archive based on the request but as of now someone has to get in to the system to approve this task. I am passing the data from source system to activiti (to populate the form) and I need those details for future reporting hence I wont be able to bypass the form without archiving it.

I need to set the value of the field 'approvalConfirmed' to true and call my java class… Can someone let me know how to do that?

<userTask id="NoNeedApproval" name="Auto Approval"
activiti:candidateUsers="${user}" activiti:assignee="${user}">
<activiti:formProperty id="test6" name="Needs Approval:"
expression="${needsApproval}" writable="false" type="boolean" />

<activiti:formProperty id="test3" name="Initiator:"
expression="${initiator}" writable="false" type="string" />

<activiti:formProperty id="test3" name="Description:"
expression="${description}" readable="true" writable="false" type="string" />

<activiti:formProperty id="test" name="User:"
expression="${user}" writable="false" type="string" />

<activiti:formProperty id="test2" name="Image:"
expression="${imageName}" writable="false" type="string" />
<activiti:formProperty id="approvalConfirmed"
name="approvalConfirmed" type="enum" required="true">
<activiti:value id="true" name="Yes"></activiti:value>
<activiti:value id="false" name="No"></activiti:value>

I have a java class to archive the form but I am not sure how to invoke the class automatically from this user task..