AnsweredAssumed Answered

Passing Map to tasklistener expression method in workflow

Question asked by monika on Jun 29, 2012
Latest reply on Jul 2, 2012 by frederikheremans1
I am using a method in my expression of activiti:tasklistener which is taking Map<String,Object> as a parameter.
Instead of passing this map inside the initail variable map, i want to create this map inside the workflow itself and want a way to edit and update its variables also inside workflow.
Is there any way to do this through activiti?

The code snippet is as below:

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn"
   xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"
   xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema"
   expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
   <collaboration id="Collaboration">
      <participant id="pool1" name="Pool" processRef="process_pool1"></participant>
   </collaboration>
   <process id="TestProcess" name="Test Process">
      <startEvent id="startevent" name="Start"></startEvent>
      <userTask id="ApprovalTaskForManager" name="Create approval task"
         activiti:dueDate="${dateVariable}">
         <extensionElements>
            <activiti:taskListener event="create"
               expression="${approvalTaskListener.processApproval("approvalActions")}" />

         </extensionElements>
      </userTask>
   </process>
</definitions>
   


Here my ("approvalActions") is a map which i dont want to pass in the initial variable map rather want to create in workflow itself. is there any way to do that?

Outcomes