Hi everyone!
3 days ago I asked a question about get image of process diagram but maybe my question is not clear to you.
After research, I will summary my problem like this:
- Because when process completed, I can't use http://localhost:8080/activiti-rest/service/runtime/process-instances/proc-inst-id/diagram to get the process diagram with hightlight current task anymore.
- So, I add a service task before end task to get process instance id, then assign it to that link to get image of process diagram and save it to use later.
Now my problem is I really don't know how to code to get process instance id and call api in java class to assign it to service task. Can you help me?
Section 8.5.3 of the user guide shows how to create a Java Service Task. It implements JavaDelegate and the execute method is called with a DelegateExecution from which you can call getProcessInstanceId and other methods. See the javadoc DelegateExecution (Activiti - Engine 5.22.0 API)
Does that cover what you are trying to do ?
Thanks for your reply!
I made it. Now my problem is my saved diagram is just highlight only user task before my service task.
I tried add more service task after user task and it's still only return diagram that highlight user task.
Activiti don't highlight service task?
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.