02-18-2019 08:46 PM
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?
02-21-2019 06:30 AM
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 ?
02-21-2019 09:39 PM
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?
Explore our Alfresco products with the links below. Use labels to filter content by product module.