AnsweredAssumed Answered

Parallel Gateway Usage

Question asked by pault on Dec 14, 2010
I'm trying to use a parralel gateway and hitting a db referential integrity error.

### Error updating database.  Cause: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "ACT_FK_EXE_PROCINST: PUBLIC.ACT_RU_EXECUTION FOREIGN KEY(PROC_INST_ID_) REFERENCES PUBLIC.ACT_RU_EXECUTION(ID_)"; SQL statement:
delete from ACT_RU_EXECUTION where ID_ = ? [23003-132]
### The error may involve org.activiti.persistence.deleteExecution-Inline
### The error occurred while setting parameters
### Cause: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "ACT_FK_EXE_PROCINST: PUBLIC.ACT_RU_EXECUTION FOREIGN KEY(PROC_INST_ID_) REFERENCES PUBLIC.ACT_RU_EXECUTION(ID_)"; SQL statement:
delete from ACT_RU_EXECUTION where ID_ = ? [23003-132]

To try and isolate the problem I've stripped it down to the following xml, if I connect flow3 direct back to task waitState all is fine, but if instead it goes via the fork as below I get the error shown above at the point it forks. Should this work ?

               <startEvent id="theStart" />

      <sequenceFlow id="flow1" sourceRef="theStart" targetRef="waitState" />

      <receiveTask id="waitState" name="Wait" />
      
      <boundaryEvent id="waitTimer" cancelActivity="true" attachedToRef="waitState">
         <timerEventDefinition><timeDuration>PT10S</timeDuration></timerEventDefinition>
      </boundaryEvent>

      <sequenceFlow id="flow2" sourceRef="waitTimer" targetRef="mServiceTask" />
      
      <serviceTask id="mServiceTask"
                  name="My Task"
                 activiti:class="org.me.test.MonitorServiceTask" />
      
      <sequenceFlow id="flow3" sourceRef="mServiceTask" targetRef="fork" />
      
      <parallelGateway id="fork" />
       
               <sequenceFlow id="pflow1" sourceRef="fork" targetRef="waitState" />

Outcomes