AnsweredAssumed Answered

Signalling parallel execution in service task

Question asked by activator on Mar 14, 2014
Latest reply on Mar 25, 2014 by jbarrez
Hi,

we are currently trying to model two parallel executions where one execution signals the other to terminate. We have tried to use signals to trigger the termination:

[IMG]http://i.imgur.com/WU3SV5o.png[/IMG]

As signals are broadcasted to all executions in all running process instances, we use a service task to only signal executions in the current process instance. However, in our test case, we receive the following exception:


  org.apache.ibatis.exceptions.PersistenceException:
  ### Error updating database.  Cause: org.h2.jdbc.JdbcSQLException: Referentielle Integrität verletzt: "ACT_FK_TASK_EXE: PUBLIC.ACT_RU_TASK FOREIGN KEY(EXECUTION_ID_) REFERENCES PUBLIC.ACT_RU_EXECUTION(ID_) ('9')"
  Referential integrity constraint violation: "ACT_FK_TASK_EXE: PUBLIC.ACT_RU_TASK FOREIGN KEY(EXECUTION_ID_) REFERENCES PUBLIC.ACT_RU_EXECUTION(ID_) ('9')"; SQL statement:
  delete from ACT_RU_EXECUTION where ID_ = ? and REV_ = ? [23503-168]
  ### The error may involve org.activiti.engine.impl.persistence.entity.ExecutionEntity.deleteExecution-Inline
  ### The error occurred while setting parameters
  ### SQL: delete from ACT_RU_EXECUTION where ID_ = ? and REV_ = ?

In our real live application, the service task terminates the parallel execution just fine, but the service task itself remains active.

We think that there is an issue with the service task trying to influence the control flow by sending signals.

Two questions:

  • Do you think, this is a bug?
  •  
  • How would you otherwise model this use case?
Please keep in mind that we cannot use intermediate signal throwing events as this would broadcast the signal to all process instances. Also, we could use a sub process and a terminate event. However, we would prefer to keep the three user tasks on the same level as this documents the business process more concisely. (We would like to use swimlanes and sub processes cannot span several lanes.)

Attached you will find the test case and stack trace.

Thank you very much for your help
Michael

Outcomes