AnsweredAssumed Answered

Problem with multi-instance sub-process

Question asked by dwoodbury on Jun 30, 2011
Latest reply on Aug 10, 2011 by jbarrez
Hello:

Does the activiti engine support the attached process definition?

I receive the following error when boundary event timers expire within the multi-instance sub-process:

2011-06-29 22:30:32,681 [pool-1-thread-18] ERROR interceptor.CommandContext  - Error while closing command context
org.activiti.engine.ActivitiOptimisticLockingException: ExecutionEntity[113] was updated by another transaction concurrently

The process image is attached.  Here is the bpmn.xml.

<?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">
  <process id="TrainingRequest" name="TrainingRequest">
    <documentation>Place documentation for the 'TrainingRequest' process here.</documentation>
    <startEvent id="startevent1" name="Start"></startEvent>
    <userTask id="usertask1" name="User Task" activiti:assignee="ROLE_USER">
      <multiInstanceLoopCharacteristics isSequential="false"></multiInstanceLoopCharacteristics>
    </userTask>
    <sequenceFlow id="flow1" name="" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
    <subProcess id="subprocess1" name="Sub Process">
      <multiInstanceLoopCharacteristics isSequential="false">
        <loopCardinality>5</loopCardinality>
      </multiInstanceLoopCharacteristics>
      <userTask id="subprocess1usertask2" name="User Task" activiti:assignee="ROLE_USER"></userTask>
      <boundaryEvent id="subprocess1boundarytimer1" name="" cancelActivity="true" attachedToRef="subprocess1usertask2">
        <timerEventDefinition>
          <timeDuration>PT1M</timeDuration>
        </timerEventDefinition>
      </boundaryEvent>
      <serviceTask id="subprocess1mailtask1" name="Mail Task" activiti:type="mail">
        <extensionElements>
          <activiti:field name="to" expression="dave.woodbury@freescale.com"></activiti:field>
          <activiti:field name="from" expression="dave.woodbury@freescale.com"></activiti:field>
          <activiti:field name="subject" expression="test"></activiti:field>
          <activiti:field name="html">
            <activiti:expression><![CDATA[test]]></activiti:expression>
          </activiti:field>
        </extensionElements>
      </serviceTask>
      <sequenceFlow id="subprocess1flow3" name="" sourceRef="subprocess1boundarytimer1" targetRef="subprocess1mailtask1"></sequenceFlow>
      <endEvent id="subprocess1endevent2" name="End"></endEvent>
      <sequenceFlow id="subprocess1flow5" name="" sourceRef="subprocess1mailtask1" targetRef="subprocess1endevent2"></sequenceFlow>
      <sequenceFlow id="subprocess1flow6" name="" sourceRef="subprocess1usertask2" targetRef="subprocess1endevent2"></sequenceFlow>
      <startEvent id="subprocess1startevent2" name="Start"></startEvent>
      <sequenceFlow id="subprocess1flow7" name="" sourceRef="subprocess1startevent2" targetRef="subprocess1usertask2"></sequenceFlow>
    </subProcess>
    <sequenceFlow id="flow2" name="" sourceRef="usertask1" targetRef="subprocess1"></sequenceFlow>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow4" name="" sourceRef="subprocess1" targetRef="endevent1"></sequenceFlow>
  </process>
</definitions>

Thank you for your help

David Woodbury

Attachments

Outcomes