cancel
Showing results for 
Search instead for 
Did you mean: 

Highlight process instance chain when get process instance image

mr_mister
Champ in-the-making
Champ in-the-making
Hi,
I wonder if REST API support get the process instance image which be highlight the process instance chain.
This should look like this
[img]https://lh6.googleusercontent.com/-2uS_7kUmJLo/VIPNeDPXs2I/AAAAAAAABU8/-CBxIoxjCiI/w700-h193-no/diag...[/img]

If not, could you give me some guidance to make this.
Thank you very much!
8 REPLIES 8

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

I tried something similar (ages ago).
https://github.com/gro-mar/activiti-crystalball/wiki/Audit-trail-diagram

Regards
Martin

mr_mister
Champ in-the-making
Champ in-the-making
Thank Martin, I'm going to look at that. That helps alot!

trademak
Star Contributor
Star Contributor
This REST endpoint should already provide that:

GET runtime/process-instances/{processInstanceId}/diagram

Best regards,

kch0313
Champ on-the-rise
Champ on-the-rise
The REST endpoint (5.18)
     GET runtime/process-instances/{processInstanceId}/diagram

only seems to highlight the current pending execution step (waiting).  It doesn't seem to draw RED lines for the flow transition (lines) between the steps that have been completed.  However, in Activiti Explorer (5.18) the diagram for a process instance does show the flow transitions in RED.  I am not sure if it is just coloring any transition to the pending execution step, or if it is looking at the History to identify them.  Anyone know how these two (REST endpoint for diagram highlight and Activiti Explorer process instance diagram) handle making these flow transition lines RED?

I was thinking we could just get a distinct list of the Ids for these from ACT_HI_DETAIL (or related History REST endpoint) for the process instance Id and color them RED if they are returned in the response recordset.  Does this sound right?  Any pointers?

plehal
Champ in-the-making
Champ in-the-making
You may get the completed activities from history service and highlight them with a different colour, just like the active task is coloured in red by current picture generator. I have done a crude highlighter of completed tasks. It will be very appreciated if this feature is part of core functionality. Couldn't attach the image because of forum policy.

jbarrez
Star Contributor
Star Contributor
" It will be very appreciated if this feature is part of core functionality. "

Contributions are, as usual, always welcomed 😉

yerbol777
Champ in-the-making
Champ in-the-making
Hi, Mr_Mister
Did you find the way of highlighting? Could you suggest it if you did it…
Thank you.

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,


  public InputStream generateDiagram(BpmnModel bpmnModel, String imageType, List<String> highLightedActivities, List<String> highLightedFlows,
      String activityFontName, String labelFontName, ClassLoader customClassLoader, double scaleFactor) {
   
    return generateProcessDiagram(bpmnModel, imageType, highLightedActivities, highLightedFlows,
        activityFontName, labelFontName, customClassLoader, scaleFactor).generateImage(imageType);
  }

Regards
Martin