Question

As the subject title, I wonder if would we be able to use HTML to display process instance as it's shown by Activiti Explorer. Do you guys have any tutorial? Thank you all.

Was it helpful?

Solution

Im not sure that there is a tutorial, however the REST API can be used to pull the process diagram and display it via an ajax call.

The call sequence is:

  1. Get the process deployment ID using something like: GET /activiti-rest/service/process-definitions

    Alternatives you can get the Process definition from the TASK or PROCESS INSTANCE

  2. Once you have the process you are interested in, get the details of the process: GET activiti-rest/service/repository/process-definitions/ where ID is the ID you selected from 1.

  3. Get the resource details, this URL will be returned in the diagramResource field of the above call.

  4. Finally, add the returned image url to your html page.

Obviously, all of the above assumes you have uploaded an image of the process as part of your .bar

Also, it assumes you have the activiti-rst war deployed, or have the activiti-rest.jar included in, and exposed through your webapp.

Hope this helps. Greg

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top