02-20-2017 03:43 AM
Hi,
We used to get the EngineServices using the delegateExecution earlier in ServiceTask or TaskListener but I dont see that method in Activiti6.
Regards,
Sravani
02-21-2017 01:23 PM
I looked back through the commits and found that this change was made with the following commit:
The commit was made to the Activiti6 branch only in August 2015 by Tijs and had the title:
"Move to unified interfaces for DelegateExecution, ExecutionListener etc"
It looks as though the prefered way of getting to the Engine Services is now:
import org.activiti.engine.impl.context.Context;
Context.getProcessEngineConfiguration().getRuntimeService();
Hope this helps,
Greg
02-20-2017 11:40 AM
Sravani,
I downloaded the Activiti 6.0.0.Beta4, which includes the most up-to-date UserGuide with the download.
The section for how to do what you're describing in Activiti5 (located here in the UserGuide), is identical to that section within the Activiti 6.0.0.Beta4 documentation.
Are you saying you've attempted this and it doesn't seem to be exposed? There could be a potential issue in the Beta version, or the documentation may be off.
-JEarles
02-21-2017 11:19 AM
Hello Sravini,
I ran a quick check and you are absolutely correct.
The getEngineServices method has been removed from the DelegateExecution class in Activiti 6.
This will cause a huge issue when upgrading applications from version 5.??
I will reach out to the dev leads and see what's up.
In the interim, you can retrieve the ProcessEngineConfiguration from the Spring Context and from there get the engine Services:
e.g.
Context.getProcessEngineConfiguration().getRuntimeService()
Sit tight, this is a pretty big deal (at least in my mind).
Cheers,
Greg
02-21-2017 01:23 PM
I looked back through the commits and found that this change was made with the following commit:
The commit was made to the Activiti6 branch only in August 2015 by Tijs and had the title:
"Move to unified interfaces for DelegateExecution, ExecutionListener etc"
It looks as though the prefered way of getting to the Engine Services is now:
import org.activiti.engine.impl.context.Context;
Context.getProcessEngineConfiguration().getRuntimeService();
Hope this helps,
Greg
02-22-2017 09:20 AM
I have created a Jira to document this change so as to avoid any migration issues:
https://activiti.atlassian.net/browse/ACT-4262
Greg
02-23-2017 06:41 AM
Thanks Greg,
Now how do I get the instance of context in a service task. All we have is an instance of delegateExecution.
Regards,
02-24-2017 04:53 PM
Explore our Alfresco products with the links below. Use labels to filter content by product module.