cancel
Showing results for 
Search instead for 
Did you mean: 

documentation and taskListener

arief
Champ in-the-making
Champ in-the-making
Hi,

I'm creating bpmn20.xml without modeler.

in user task. If I put both documentation & taskListener, it won't work. I can only put either one of them. i.e. documentation without tasklistener or taskListener without documentation.

<userTask id="createRequest" name="Initiate work order request"
                  activiti:formKey="/workOrder/create" >
            <extensionElements>
                <activiti:taskListener event="complete" expression="${execution.setVariable('actButtonIndicator', wfParamGen.createActButtonIndicator('approve,reject'))}" />
            </extensionElements>
            <!–<documentation>–>
                <!–Work Order Requested by ${username}–>
            <!–</documentation>–>
….
….


Any idea on how to use both of them?

Thanks  Smiley Wink
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
You should use the "documentation" element first, like this:


<userTask id="task1" name="Schedule meeting" >
    <documentation>
      Schedule a meeting with management.
    </documentation>
    <extensionElements>
      <activiti:taskListener event="create" class="org.activiti.examples.bpmn.tasklistener.TaskCreateListener" />
      <activiti:taskListener event="complete" class="org.activiti.examples.bpmn.tasklistener.TaskCompleteListener">
        <activiti:field name="greeter" stringValue="The Process" />
              <activiti:field name="shortName" expression="${'Activiti'.substring(0,3)}" />
      </activiti:taskListener>
    </extensionElements>
  </userTask>