AnsweredAssumed Answered

Duplicate process ids

Question asked by mitchyoung on May 22, 2013
Latest reply on Jun 4, 2013 by frederikheremans1
Hi,
Just wondering if this is a known problem, or configuration issue.

I  am supporting a JSF application using Actitviti 5.9. It seems that duplicate process ids are being created while running a batch job that creates 100+ process instances.  In a method that iterates through the objects, a new process is started for each object.


At this point, randomly, a duplicate key will be retuned:
String procId = runtimeService.startProcessInstanceByKey("ffsClaimApproval", variables).getId();

These processes are running: async
<serviceTask id="thresholdCheckFFSClaim" name="Check Thresholds on FFS Claim" activiti:class="com.dms.workflow.ClaimCheckThresholdsDelegate" activiti:async="true" />

Out of 118 objects, 30 process instances failed because of a duplicate process id.

Which throws the below error:

2013-04-23 00:36:18,931 INFO  [com.dms.workflow.ClaimCheckThresholdsDelegate] (pool-32-thread-9) Claim #7,206 is ready to be checked against rate thresholds
2013-04-23 00:36:18,931 SEVERE [org.activiti.engine.impl.interceptor.CommandContext] (pool-32-thread-8) Error while closing command context: org.apache.ibatis.exceptions.PersistenceException:
### Error updating database.  Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (DMS.XX_ACT_PROCVER_UNIQUE) violated
### The error may involve org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity.insertProcessDefinition-Inline
### The error occurred while setting parameters
### Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: unique constraint (DMS.XX_ACT_PROCVER_UNIQUE) violated

Outcomes