-
Bug Report
-
Resolution: Fixed
-
L3 - Default
-
7.1.0, 7.1.1
-
None
Reproduce steps:
See SUPPORT-977
Problem:
Calling runtimeService.getActivityInstance("processInstanceId") inside a method which observes CDI events leads to a stackoverflow.
Expected behavior:
Works.
Hints (optional):
CommandExecutor commandExecutorTxRequiresNew = ((ProcessEngineImpl) ProcessEngines.getDefaultProcessEngine()).getProcessEngineConfiguration().getCommandExecutorTxRequiresNew();
this.activityInstance = commandExecutorTxRequiresNew.execute(new GetActivityInstanceCmd(event.getProcessInstanceId()));
is a workround.
With the introduction of ProcessEngineService usage in delegates etc. since 7.1.0, we reuse the already existing CommandContext instead of creating a new one when invoking a command.