AnsweredAssumed Answered

Activiti Concurrent running Issue

Question asked by mdjuned on Jul 14, 2016
Latest reply on Jul 18, 2016 by vasile.dirla
Hi ,

I have a web app where in I am using activiti work flow to  call a webservice , we're hitting a bpmn file with multiple configurations with multiple users , so any  login user can concurrently change bpmn properties and run the workflow.

Now if i simulate 50  concurrency  user via Jmeter then I am getting following exception , this output is profiled via yourkit profiler.

http-bio-9090-exec-11 <— Frozen for at least 1m 38s
org.activiti.engine.impl.db.DbIdGenerator.getNextId() DbIdGenerator.java:35
org.activiti.engine.impl.db.DbSqlSession.insert(PersistentObject) DbSqlSession.java:111
org.activiti.engine.impl.persistence.entity.VariableInstanceEntity.createAndInsert(String, VariableType, Object) VariableInstanceEntity.java:61
org.activiti.engine.impl.persistence.entity.VariableScopeImpl.createVariableInstance(String, Object, ExecutionEntity) VariableScopeImpl.java:369
org.activiti.engine.impl.persistence.entity.VariableScopeImpl.createVariableLocal(String, Object, ExecutionEntity) VariableScopeImpl.java:289
org.activiti.engine.impl.persistence.entity.VariableScopeImpl.createVariableLocal(String, Object) VariableScopeImpl.java:276
org.activiti.engine.impl.persistence.entity.VariableScopeImpl.setVariable(String, Object, ExecutionEntity) VariableScopeImpl.java:256
org.activiti.engine.impl.persistence.entity.VariableScopeImpl.setVariable(String, Object) VariableScopeImpl.java:239
com.covalense.ctaf.server.util.DelegationTaskUtility.setOutputVariable(DelegateExecution, String) DelegationTaskUtility.java:138
com.covalense.ctaf.server.pluginadapter.delegators.InvokeGenericWSJavaDelegation.delegationExecuter(DelegateExecution) InvokeGenericWSJavaDelegation.java:121
com.covalense.ctaf.server.pluginadapter.delegators.InvokeGenericWSJavaDelegation.execute(DelegateExecution) InvokeGenericWSJavaDelegation.java:68
org.activiti.engine.impl.delegate.JavaDelegateInvocation.invoke() JavaDelegateInvocation.java:34
org.activiti.engine.impl.delegate.DelegateInvocation.proceed() DelegateInvocation.java:37
org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DelegateInvocation) DefaultDelegateInterceptor.java:25
org.activiti.engine.impl.bpmn.behavior.ServiceTaskJavaDelegateActivityBehavior.execute(DelegateExecution) ServiceTaskJavaDelegateActivityBehavior.java:49
org.activiti.engine.impl.bpmn.behavior.ServiceTaskJavaDelegateActivityBehavior.execute(ActivityExecution) ServiceTaskJavaDelegateActivityBehavior.java:40
org.activiti.engine.impl.bpmn.helper.ClassDelegate.execute(ActivityExecution) ClassDelegate.java:116
org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(InterpretableExecution) AtomicOperationActivityExecute.java:45
org.activiti.engine.impl.interceptor.CommandContext.performOperation(AtomicOperation, InterpretableExecution) CommandContext.java:88
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(AtomicOperation) ExecutionEntity.java:532
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(AtomicOperation) ExecutionEntity.java:527
org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(InterpretableExecution) AtomicOperationTransitionNotifyListenerStart.java:52
org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(InterpretableExecution) AbstractEventAtomicOperation.java:56
org.activiti.engine.impl.interceptor.CommandContext.performOperation(AtomicOperation, InterpretableExecution) CommandContext.java:88
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(AtomicOperation) ExecutionEntity.java:532
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(AtomicOperation) ExecutionEntity.java:527
org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(InterpretableExecution) AbstractEventAtomicOperation.java:49
org.activiti.engine.impl.interceptor.CommandContext.performOperation(AtomicOperation, InterpretableExecution) CommandContext.java:88
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(AtomicOperation) ExecutionEntity.java:532
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(AtomicOperation) ExecutionEntity.java:527
org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(InterpretableExecution) AtomicOperationTransitionCreateScope.java:49
org.activiti.engine.impl.interceptor.CommandContext.performOperation(AtomicOperation, InterpretableExecution) CommandContext.java:88
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(AtomicOperation) ExecutionEntity.java:532
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(AtomicOperation) ExecutionEntity.java:527
org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerTake.execute(InterpretableExecution) AtomicOperationTransitionNotifyListenerTake.java:66
org.activiti.engine.impl.interceptor.CommandContext.performOperation(AtomicOperation, InterpretableExecution) CommandContext.java:88
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(AtomicOperation) ExecutionEntity.java:532
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(AtomicOperation) ExecutionEntity.java:527
org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionDestroyScope.execute(InterpretableExecution) AtomicOperationTransitionDestroyScope.java:116
org.activiti.engine.impl.interceptor.CommandContext.performOperation(AtomicOperation, InterpretableExecution) CommandContext.java:88
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(AtomicOperation) ExecutionEntity.java:532
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(AtomicOperation) ExecutionEntity.java:527
org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(InterpretableExecution) AtomicOperationTransitionNotifyListenerEnd.java:36
org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(InterpretableExecution) AbstractEventAtomicOperation.java:56
org.activiti.engine.impl.interceptor.CommandContext.performOperation(AtomicOperation, InterpretableExecution) CommandContext.java:88
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(AtomicOperation) ExecutionEntity.java:532
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(AtomicOperation) ExecutionEntity.java:527
org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(InterpretableExecution) AbstractEventAtomicOperation.java:49
org.activiti.engine.impl.interceptor.CommandContext.performOperation(AtomicOperation, InterpretableExecution) CommandContext.java:88
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(AtomicOperation) ExecutionEntity.java:532
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(AtomicOperation) ExecutionEntity.java:527
org.activiti.engine.impl.persistence.entity.ExecutionEntity.take(PvmTransition) ExecutionEntity.java:367
org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(ActivityExecution, boolean, boolean, List) BpmnActivityBehavior.java:105
org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(ActivityExecution) BpmnActivityBehavior.java:54
org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(ActivityExecution) FlowNodeActivityBehavior.java:44
org.activiti.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.execute(ActivityExecution) FlowNodeActivityBehavior.java:36
org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(InterpretableExecution) AtomicOperationActivityExecute.java:45
org.activiti.engine.impl.interceptor.CommandContext.performOperation(AtomicOperation, InterpretableExecution) CommandContext.java:88
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(AtomicOperation) ExecutionEntity.java:532
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(AtomicOperation) ExecutionEntity.java:527
org.activiti.engine.impl.pvm.runtime.AtomicOperationProcessStartInitial.eventNotificationsCompleted(InterpretableExecution) AtomicOperationProcessStartInitial.java:46
org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(InterpretableExecution) AbstractEventAtomicOperation.java:56
org.activiti.engine.impl.interceptor.CommandContext.performOperation(AtomicOperation, InterpretableExecution) CommandContext.java:88
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(AtomicOperation) ExecutionEntity.java:532
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(AtomicOperation) ExecutionEntity.java:527
org.activiti.engine.impl.pvm.runtime.AtomicOperationProcessStart.eventNotificationsCompleted(InterpretableExecution) AtomicOperationProcessStart.java:45
org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(InterpretableExecution) AbstractEventAtomicOperation.java:56
org.activiti.engine.impl.interceptor.CommandContext.performOperation(AtomicOperation, InterpretableExecution) CommandContext.java:88
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(AtomicOperation) ExecutionEntity.java:532
org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(AtomicOperation) ExecutionEntity.java:527
org.activiti.engine.impl.persistence.entity.ExecutionEntity.start() ExecutionEntity.java:322
org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(CommandContext) StartProcessInstanceCmd.java:83
org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(CommandContext) StartProcessInstanceCmd.java:36
org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandConfig, Command) CommandInvoker.java:24
org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandConfig, Command) CommandContextInterceptor.java:57
org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(TransactionStatus) SpringTransactionInterceptor.java:47
org.springframework.transaction.support.TransactionTemplate.execute(TransactionCallback) TransactionTemplate.java:130
org.activiti.spring.SpringTransactionInterceptor.execute(CommandConfig, Command) SpringTransactionInterceptor.java:45
org.activiti.engine.impl.interceptor.LogInterceptor.execute(CommandConfig, Command) LogInterceptor.java:31
org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandConfig, Command) CommandExecutorImpl.java:40
org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(Command) CommandExecutorImpl.java:35
org.activiti.engine.impl.RuntimeServiceImpl.startProcessInstanceByKey(String, Map) RuntimeServiceImpl.java:64


My process Engine code is like this :



ProcessInstance processInstance = processEngine.getRuntimeService()
.startProcessInstanceByKey(testCaseSpecificBean.getWorkflowKey(), variableMap);


After googling i figured that  i have to  set StrongUuid in order to solve the problem , if its correct ,then how would i set StrongUuidGenerator in the processInstance instanse ?

Outcomes