Hello,
we are trying createProcessInstanceModification in version 7.3 and gets this error:
Error message: activityInstance is null at org.camunda.bpm.engine.exception.NullValueException: activityInstance is null
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.camunda.bpm.engine.impl.util.EnsureUtil.generateException(EnsureUtil.java:283)
at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotNull(EnsureUtil.java:44)
at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotNull(EnsureUtil.java:39)
at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotNull(EnsureUtil.java:31)
at org.camunda.bpm.engine.impl.cmd.AbstractProcessInstanceModificationCommand.getScopeExecutionForActivityInstance(AbstractProcessInstanceModificationCommand.java:103)
at org.camunda.bpm.engine.impl.cmd.ActivityInstanceCancellationCmd.determineSourceInstanceExecution(ActivityInstanceCancellationCmd.java:49)
at org.camunda.bpm.engine.impl.cmd.AbstractInstanceCancellationCmd.execute(AbstractInstanceCancellationCmd.java:33)
at org.camunda.bpm.engine.impl.cmd.AbstractInstanceCancellationCmd.execute(AbstractInstanceCancellationCmd.java:26)
at org.camunda.bpm.engine.impl.cmd.ModifyProcessInstanceCmd.execute(ModifyProcessInstanceCmd.java:52)
at org.camunda.bpm.engine.impl.cmd.ModifyProcessInstanceCmd.execute(ModifyProcessInstanceCmd.java:30)
at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:97)
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.ProcessInstanceModificationBuilderImpl.execute(ProcessInstanceModificationBuilderImpl.java:219)
at org.camunda.bpm.engine.impl.ProcessInstanceModificationBuilderImpl.execute(ProcessInstanceModificationBuilderImpl.java:210)
Could you try to reproduce the issue with more recent Camunda version - 7.8 or 7.9-alpha
Also I think you need to fix your process:
The service task “Refresh…” is not reachable.
Hi Yana,
I will test with 7.8 version and comment the result.
The “Refresh ind…” task is not reachable because for me is not a real task, i only need it to call .startBeforeActivity(“tskRefreshIndividualRecruitings”) with diferent taskId than “tskFinishedIndividualRecruiting”
Do we have another posibility?
If I use this
runtimeService.createProcessInstanceModification(processInstanceId)
.startBeforeActivity(“tskFinishedIndividualRecruiting”)
.setVariable(“individualRecruitings”, individualRectruitings)
.cancelAllForActivity(“tskFinishedIndividualRecruiting”)
.execute();
Hi,
after migrate version to 7.8 on jBoss environment, in jboss log appear this:
ERROR ENGINE-03068 No deployment lock property found in databse
In ACT_GE_PROPERTY we have this records
NAME VALUE_ REV_
history.cleanup.job.lock 0 1
historyLevel 2 1
startup.lock 0 1
I’ve verified it with a query from cockpit and gets this warning in the log
WARNING [ExceptionHandler] (http-/0.0.0.0:8080-1) org.camunda.bpm.engine.rest.exception.InvalidRequestException: Process instance with id 66be972a-5e93-11e8-847e-96df20524153 does not exist
What can I do to increase the number of executions for an instance in the multiinstance task (Finished individual recruiting)?
Thanks thorben,
it works as you say without .cancelAllForActivity!!!
Can you explain to me why it should be like this?
I have tried createProcessInstanceModification from users tasks “Edit Affiliation” and “Correct…” and vice versa and it works correctly with the .cancelAllForActivity.
And in the documentation it is not clear to me when to use the .cancellAll because all the examples have it. https://docs.camunda.org/manual/7.8/user-guide/process-engine/process-instance-modification/
I’ll try to explain what the previous modification did. Let’s assume we have 3 instances in tskFinishedIndividualRecruiting and the following modification:
Instructions are executed in the order you submit them. That means, the process engine will first perform the startBefore instruction and run until the next wait state (as usual). Let’s assume this creates 3 new instances of tskFinishedIndividualRecruiting because the multi-instance cardinality is 3. Now, the engine performs the cancelAllForActivity instruction so it cancels all six instances of tskFinishedIndividualRecruiting including the ones we just started. See also this docs section on this topic: https://docs.camunda.org/manual/7.8/user-guide/process-engine/process-instance-modification/#instruction-execution-order
Hi,
I have done more tests and I have detected a problem.
I have a process with 9 execution instances in the multiinstance task before executing .createProcessInstanceModification
After adding an element to the collection and running .createProcessInstanceModification
a new execution is generated, the nrOfInstances and nrOfActiveInstances variables are increased but an individual PayrollProcessId is missing in the process variables.
There are 10 loopCounter values with values 0 to 9
But there are only 9 individualPayrollProcessId values
If i read que individualPayrollProcessId variable for all the 10 executions, is there one with null value.
That is expected behavior. You have to set the element variable manually, for example by adding a #setVariableLocal call to the startBefore instruction.