Get diagram of process before completed

cancel
Showing results for 
Search instead for 
Did you mean: 
nhhao1996
Active Member II

Get diagram of process before completed

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?

2 Replies
pault
Active Member II

Re: Get diagram of process before completed

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 ?

nhhao1996
Active Member II

Re: Get diagram of process before completed

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?