hyj
April 23, 2019, 11:15am
1
I restart the process through method restartProcessInstances;
runtimeServive.restartProcessInstances(processDefinitionId)
.processInstanceIds(processInstanceId)
.startBeforeActivity(activeId1)
.startBeforeActivity(activeId2)
.startBeforeActivity(activeId3)
execute();
throw exception:
Unknown property used in expression: ${test}. Cause: Cannot resolve identifier ‘test’.
If there is only one Active restart,No problem, Can run.
runtimeServive.restartProcessInstances(processDefinitionId)
.processInstanceIds(processInstanceId)
.startBeforeActivity(activeId1)
execute();
Niall
April 23, 2019, 11:27am
2
Can you upload your process model?
hyj
April 24, 2019, 1:19am
3
ok,I restarted back_sub.bpmn and threw an exception.
The test variable is set at the start of the process.
back_sub.bpmn (6.5 KB)
goBreak.bpmn (6.8 KB)
Niall
April 24, 2019, 6:37am
4
Looks like you’re just missing the required variable test
which should be the candidate user.
This must not have been in the original run of the instance, but if it was present then you can add it with an additional line to the code
runtimeService.restartProcessInstances("ProcessDef")
.initialSetOfVariables()
.processInstanceIds("processinstance")
.startBeforeActivity("actKey1")
.startBeforeActivity("actKey2")
.startBeforeActivity("actKey3")
.execute();
hyj
April 24, 2019, 10:53am
5
No, or throw an exception.
Unknown property used in expression: ${test}. Cause: Cannot resolve identifier ‘test’
I don’t know why only one ActivityId can run on reboot. Setting more than two will cause errors
runtimeService.restartProcessInstances("ProcessDef")
.initialSetOfVariables()
.processInstanceIds("processinstance")
.startBeforeActivity("actKey1")
.execute();
hyj
April 24, 2019, 11:05am
6
There are test variables before restarting.
hyj
April 25, 2019, 8:17am
8
I checked the source code.
When starting the process, only variables are set to the last element of options, resulting in errors at startup time.