AnsweredAssumed Answered

Problem with executing user task inside called process

Question asked by argentumheart on Aug 17, 2015
Hello, i tried to use a call activity and faced a problem. Here's a recreation of this problem. I'm calling the simple process with one user task (every flow has logger.log(..) message). User task inside called process starting, but not ending. I tried to set assignee/pass an initiator expression/manually set assignee to admin, but it didn't help. Seems like i'm doing smth wrong. Help me please.



<process id="called" name="called" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <userTask id="usertask1" name="User Task"></userTask>
    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1">
      <extensionElements>
        <activiti:executionListener event="take" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
          <activiti:field name="script">
            <activiti:string><![CDATA[logger.log('before UT');]]></activiti:string>
          </activiti:field>
        </activiti:executionListener>
      </extensionElements>
    </sequenceFlow>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow2" sourceRef="usertask1" targetRef="endevent1">
      <extensionElements>
        <activiti:executionListener event="take" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
          <activiti:field name="script">
            <activiti:string><![CDATA[logger.log('after UT');]]></activiti:string>
          </activiti:field>
        </activiti:executionListener>
      </extensionElements>
    </sequenceFlow>
   </process>




<process id="main" name="main" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <userTask id="usertask1" name="User Task" activiti:assignee="${initiator.properties.userName}"></userTask>
    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1">
      <extensionElements>
        <activiti:executionListener event="take" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
          <activiti:field name="script">
            <activiti:string><![CDATA[logger.log('main:started');]]></activiti:string>
          </activiti:field>
        </activiti:executionListener>
      </extensionElements>
    </sequenceFlow>
    <callActivity id="callactivity1" name="Call activity" calledElement="called"></callActivity>
    <sequenceFlow id="flow2" sourceRef="usertask1" targetRef="callactivity1">
      <extensionElements>
        <activiti:executionListener event="take" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
          <activiti:field name="script">
            <activiti:string><![CDATA[logger.log('main:calling another process')]]></activiti:string>
          </activiti:field>
        </activiti:executionListener>
      </extensionElements>
    </sequenceFlow>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow3" sourceRef="callactivity1" targetRef="endevent1">
      <extensionElements>
        <activiti:executionListener event="take" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
          <activiti:field name="script">
            <activiti:string><![CDATA[logger.log('main:enging');]]></activiti:string>
          </activiti:field>
        </activiti:executionListener>
      </extensionElements>
    </sequenceFlow>
  </process>

Attachments

Outcomes