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
Solved! Go to Solution.
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
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
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
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
I have created a Jira to document this change so as to avoid any migration issues:
https://activiti.atlassian.net/browse/ACT-4262
Greg
Thanks Greg,
Now how do I get the instance of context in a service task. All we have is an instance of delegateExecution.
Regards,
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.