AnsweredAssumed Answered

calledElement of a callActivity with multitenance activated

Question asked by checco on Jun 19, 2012
Hi all,
I would call a process (calledSubprocess) from another process (callingSubprocess) using tha callActivity task and so i have defined two process:
callingSubprocess:
<process id="callingSubprocess" name="Process calling subprocess">
    <documentation>A main process that call a subprocess defined in another file</documentation>
    <extensionElements>
      <activiti:executionListener event="start" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
        <activiti:field name="script">
          <activiti:string>execution.setVariable('lfi_managerId',100086);
logger.info('Calling Subprocess started');</activiti:string>
        </activiti:field>
      </activiti:executionListener>
    </extensionElements>
    <startEvent id="startevent1" name="Start"></startEvent>
    <callActivity id="callactivity1" name="Call activity" calledElement="subProcess">
      <extensionElements>
        <activiti:in source="lfi_managerId" target="lfi_managerId"></activiti:in>
      </extensionElements>
    </callActivity>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow1" name="" sourceRef="startevent1" targetRef="callactivity1"></sequenceFlow>
    <sequenceFlow id="flow2" name="" sourceRef="callactivity1" targetRef="endevent1"></sequenceFlow>
  </process>
calledSubprocess:
<process id="subProcess" name="Sub Process">
    <startEvent id="startevent1" name="Start"></startEvent>
    <intermediateCatchEvent id="timerintermediatecatchevent1" name="TimerCatchEvent">
      <timerEventDefinition>
        <timeDuration>PT5S</timeDuration>
      </timerEventDefinition>
    </intermediateCatchEvent>
    <sequenceFlow id="flow1" name="" sourceRef="startevent1" targetRef="timerintermediatecatchevent1">
      <extensionElements>
        <activiti:executionListener event="take" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
          <activiti:field name="script">
            <activiti:string>logger.info('subProcess lfi_managerId='+execution.getVariable('lfi_managerId'));</activiti:string>
          </activiti:field>
        </activiti:executionListener>
      </extensionElements>
    </sequenceFlow>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow2" name="" sourceRef="timerintermediatecatchevent1" targetRef="endevent1">
      <extensionElements>
        <activiti:executionListener event="take" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
          <activiti:field name="script">
            <activiti:string>logger.info('subProcess bye');</activiti:string>
          </activiti:field>
        </activiti:executionListener>
      </extensionElements>
    </sequenceFlow>
  </process>
If I run the Alfresco 4.0.1 with multitenance disabled i have no problem, but if i activate the multitenance i have the following error:
14:10:02,723 ERROR [org.alfresco.web.ui.common.Utils] A system error happened during the operation: 05190187 Failed to start workflow activiti$@<tenantName>@callingSubprocess:7:1016.

Caused by: org.activiti.engine.ActivitiException: no processes deployed with key 'subProcess'
So I tried to set the calledElement of callActivity of callingSubprocess to @<tenantName>@subProcess but I got this other error deploying the process:
Caused by: org.activiti.engine.ActivitiException: cvc-datatype-valid.1.2.1: '@<tenantName>@subProcess' is not a valid value for 'QName'. | f94fcbd0-e731-44cf-8c84-0b5991149892bpmn20.xml | line 14 | column 119

What is the right value for calledElement attribute whene the multitenance is active?

Regards,
Francesco

Outcomes