-
Bug Report
-
Resolution: Fixed
-
L3 - Default
-
None
-
None
Forum post discussing the issue:
https://groups.google.com/forum/#!topic/camunda-bpm-dev/8HpZEaDxft0
I have a scenario related to CAM-428. In this scenario, I allow a Service task in one of the execution paths to fail, exhaust it's retries and cause an incident to be created. On the other execution path there is a timer which delays until the incident is created - see attached process example. When the timer fires, the process continues on, triggering the end event, eventually resulting in an attempt to update the incident with the root execution Id. The result is an update error because the Incident mybatis configuration doesn't have an entry for updates - see stack trace below. The fix is to add the update entry in the mybatis configuration - see below. However, my question is was that left out on purpose? The incident has no version field which would be needed to properly handle concurrent updates. If it is ok with camunda I can perform a pull request with the addional configuration.
-
-
- Error updating database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for updateIncident
- Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for updateIncident
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:147)
at org.camunda.bpm.engine.impl.db.DbSqlSession.flushUpdates(DbSqlSession.java:699)
at org.camunda.bpm.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:500)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:211)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:154)
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:49)
at org.camunda.bpm.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:59)
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32)
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.executeJob(ExecuteJobsRunnable.java:79)
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:67)
at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:806)
at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:826)
at java.lang.Thread.run(Thread.java:722)
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for updateIncident
at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:672)
at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:507)
at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:500)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:144)
... 15 more
-
Proposed addition to the mybatis configuration for incident.xml:
<update id="updateIncident" parameterType="org.camunda.bpm.engine.impl.persistence.entity.IncidentEntity">
update ${prefix}ACT_RU_INCIDENT set
INCIDENT_TIMESTAMP_ = #
,
INCIDENT_MSG_ = #
,
INCIDENT_TYPE_ = #
,
EXECUTION_ID_ = #
,
ACTIVITY_ID_ = #
,
PROC_INST_ID_ = #
,
PROC_DEF_ID_ = #
,
CAUSE_INCIDENT_ID_ = #
,
ROOT_CAUSE_INCIDENT_ID_ = #
,
CONFIGURATION_ = #
where ID_ = #
{id, jdbcType=VARCHAR}</update>