cancel
Showing results for 
Search instead for 
Did you mean: 

Execute my script

gslamy
Champ in-the-making
Champ in-the-making
Hi,

How i can execute script on a particular step? Example, after execute
<task-node name="ASSISTENTagreement">
.

Thank you in advance.
1 REPLY 1

openpj
Elite Collaborator
Elite Collaborator
Using Activiti you can use a similar definition:


<userTask id="approved" name="Document Approved"
            activiti:formKey="wf:approvedTask" >
            <documentation>
                The document was reviewed and approved.
            </documentation>
            <extensionElements>
               <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
                  <activiti:field name="script">
                     <activiti:string>
                       YOUR CUSTOM SCRIPT HERE
                     </activiti:string>
                  </activiti:field>
               </activiti:taskListener>
            </extensionElements>
            <humanPerformer>
                <resourceAssignmentExpression>
                    <formalExpression>${initiator.exists() ? initiator.properties.userName : 'admin'}</formalExpression>
                </resourceAssignmentExpression>
            </humanPerformer>
        </userTask>