cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying process instance information in Activtit Probe

mproch
Champ in-the-making
Champ in-the-making
Currently there is no way of showing process instances for given process definition in UI.

I made new tab in Activiti Probe, providing this functionality. In left menu there is process definitions list (as in Database tab). When one clicks on process definition table with basic process instance info is displayed.
It is also possible to display process diagram with current activities highlighted. I think quite many users would like this feature - it's present e.g. in JBPM.

Changes involved:
- activiti-webapp-probe & activiti-webapp - standard code displaying new table
- activiti-engine - small change to ProcessDiagramGenerator & ProcessDiagramCanvas, to highlight selected activities.
- activiti-webapp-rest - two new webscripts:
  - process-instances - using processInstanceQuery to get instances, it's possible to query by businessKey and processDefinitionId - so fairly standard thing I think
  - processInstance/{processInstanceId}/diagram - to display current activities on process diagram. This dynamically generates diagram, based on deployed ProcessDefinitionEntity

I decided to implement this stuff myself, as I'm showing Activiti on Warsaw JUG meeting next week - there will be comparison with IBM tools - so I thought that without any way of running instances I wouldn't make good impression Smiley Wink
Now, I'd like to ask if there are any plans for such functionality - couldn't find it in roadmap. I think it would be good to include it in Activiti code base.

maciek
14 REPLIES 14

frederikherema1
Star Contributor
Star Contributor
Hi,

There are no concrete plans around this yet, but we have discussed this functionality and this is indeed a nice feature which is frequently asked for by Activiti users.
You said you decided to implement it yourself, did you manage to implement it?

Good job spreading the Activiti word at Warsaw JUG!!

wir33658
Champ in-the-making
Champ in-the-making
Hi,

Maciek that has been requested a couple of times like here

http://forums.activiti.org/en/viewtopic.php?f=6&t=37

I even opened up a JIRA : http://jira.codehaus.org/browse/ACT-426

in behalf of someone told me to do that, so it gets more severity.

What you did sounds exactly what its needed. And I am still supprised that this seems not to be on the roadmap and that it is considered only "a NICE feature" as int the mail from Frederik.

In my opinion, this is actually pretty essential. But, as we can see in the forum it looks like the whole Activity-Project is driven by developers and not by process engineers.

Cheers, Rob.

P.S. Maciek: If your implementation works, thumbs up and thanks for your work. Is this somewhere available even it is not on the projects path ?

tombaeyens
Champ in-the-making
Champ in-the-making
This looks promising!  Can you create a branch and share this contribution so that we can have a closer look?

mproch
Champ in-the-making
Champ in-the-making
Yes, I managed to implement this. I created branch for this feature:
https://svn.codehaus.org/activiti/activiti/branches/mproch/

There are some issues with http cache of generated diagram - currently one has to refresh whole Activiti Probe to see changes after completing task. I'm also not sure about which columns should be displayed for process instance
thanks for feedback, waiting for comments,

maciek

tombaeyens
Champ in-the-making
Champ in-the-making
Joram checked it out and showed me a screenshot.  Looks awsome.
We're very impressed with how much you've managed to accomplish with so little assistance.  Great work!
I'll ask Erik (our UI guy) to look at your work and the question you raised about refreshing whole of probe.

frederikherema1
Star Contributor
Star Contributor
Nice work, lookin' great!

jbarrez
Star Contributor
Star Contributor
Great work!!
As Tom stated, it's really impressive you were able to figure it all out without ever seeing any question on the forum!

There a few small remarks I have (see attached screenshot):

* The display diagram button is too small on my machine
* I would rename 'Dispaly diagram' to 'Actions', and call the button 'Display diagram'
* I would remove the 'ended' column, since it will always be false
* I would add a column with the start date of the process instance
* On the left list of processes: is that the name + version ?

erikwinlof
Confirmed Champ
Confirmed Champ
Really really nice work Maciek!

I'm very impressed that you've got this far and seem to have followed our patterns very well.
Just a few small suggestions to make it fit 100% with what we have today:

1. Add a title above the process-instances list and move the pagination to the right (example found in explorers "task-list.get.html")
2. Move the processes and process-instances from the "management" directory to a new "processes" directory (thats what we have in explorer)
3. Make sure "loadProcessInstances" from the ManagementService to the ProcessService
4. If youre up for it, rename the "processes.get.desc.xml" webscript to "process-definitions.get.desc.xml" (just to make it a bit clearer)

…then I was on my way asking you to move your new event "clickFormEventButton" out form activiti-core.js to "activiti-webapp-probe/src/main/webapp/js/activiti-app.js" where it can be defined as Activiti.event.clickFormEventButton = "clickFormEventButton";
…but then I realized that none of the webapps are doing this as intended, shame on us 😞
…you are very very welcome to behave better though 🙂

Regarding the caching problems you have:

If youre having trouble with the refereshing of freemarker templates or webscripts,
please try setting the "mode" in surf.xml to "development" instead.
<!– Pick the mode: development, preview, production –>
<mode>production</mode>

If you're having browser cache problems, try adding some javascript: "?noCache=" + new Date.getTime() at the end of the url to the image your displaying.

Otherwise, I believe that if we could get Jorams wishes in I think this is definitively something we should merge in cause its looking great!

Cheers and welcome to Activiti 🙂

:: Erik

mproch
Champ in-the-making
Champ in-the-making
Thanks for feedback.
I guess that activiti webapps are simple enough and code is quite clear - so I had just done some find-copy-paste-rename cycles Smiley Wink
I'll include your remarks, I think that maybe I'll switch to using HistoricProcessInstance to get process instance list - as it has some additional data such as start date/user. I was bit confused by this - I thought that HistoricProcessInstance is created only when process finishes, and before that all the data is in ProcessInstance.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.