cancel
Showing results for 
Search instead for 
Did you mean: 

RuntimeService APSv24.3 doesn't backward compatible

vnosach
Champ in-the-making
Champ in-the-making

hi all, trying to solve a problem after migration from 1.11 to 24.3.

we have a custom delegates (for example InitiateProcessVariableDelegate) in which we injected RuntimeService interface (real type RuntimeServiceImplAPS) and trying to save variables.

@Override
public void execute(DelegateExecution execution) {
runtimeService.setVariable(execution.getProcessInstanceId(), "test", "newContentId");
}

I know that we can use execution.setVariable(...) but sometimes in other delegates it's not possible...

when our process is starting, before first User Task we have the Service Task invoking below delegate bean, but when process starts on activiti-5 definition it throw an exception 

ActivitiObjectNotFoundException execution does not exist

it happens because despite the fact that that RuntimeServiceImplAPS creating SetExecutionVariablesCmdAPS which has a logic to identify Activiti version his parent class NeedsActiveExecutionCmd trying to find execution in v8 context. This is strange bug, because v8 context doesn't knows nothing about the newly created execution, which is still in process and does not flushed to DB

1 REPLY 1

vnosach
Champ in-the-making
Champ in-the-making

As a solution we trying to replace all usages of only one RuntimeService injection to two implementations 

org.activiti5.engine.RuntimeService
and
org.activiti.engine.RuntimeService

or using own adapters and v5 Context with v8 Context

Getting started

Explore our Alfresco products with the links below. Use labels to filter content by product module.