cancel
Showing results for 
Search instead for 
Did you mean: 

workflow history

mythox
Champ on-the-rise
Champ on-the-rise
Hi, how may I check the workflow history when the task is ended?   Thankyou
25 REPLIES 25

darryl_staflund
Champ in-the-making
Champ in-the-making
Hi there,

I wanted to add a bit to the workflow history discussion.  Although it is possible to list a user's completed tasks, it does not seem possible to pull up inactive workflow instances.  In my case, for example, I want to retrieve a list of all workflow instances (active and inactive) so that I can retrieve their start and end dates to generate a statistical summary of sorts.  However, the SPI interface

org.alfresco.repo.workflow.WorkflowComponent
only defines a method called:

List<WorkflowInstance> getActiveWorkflows(String workflowDefinitionId)
which effectively filters out inactive workflows (NB:  I have confirmed this by checking the implementation logic in

org.alfresco.repo.workflow.jbpm.JBPMEngine
So, does anyone know another way of retrieving inactive workflow instances – short of querying the database or writing a jBPM callback?

Darryl

nicolasraoul
Star Contributor
Star Contributor
short of querying the database or coding against jBPM?
After a workflow ends, is the information still available in the jBPM database?
Sounds like a solution that would be better than my store-just-before-ending hack.

darryl_staflund
Champ in-the-making
Champ in-the-making
Hi Nicolas,

I am pretty sure it is still in the database, because a method defined in:

org.alfresco.service.cmr.workflow.WorkflowService
, i.e.:

List<WorkflowInstance> getWorkflowsForContent(NodeRef packageItem, boolean active)
lets you retrieve active or inactive workflow instances for a given package item.

Still, I can't confirm this tonight, but will peek around my database tomorrowto see if I can confirm this.

Darryl

darryl_staflund
Champ in-the-making
Champ in-the-making
Hi there,

I am pretty sure that workflow information is not deleted from the system when a workflow is finished.  Try the following:

1.  Query the Alfresco database as follows:  'select * from jbpm_processinstance'.
2.  Start a 'Review and Approve' advanced workflow in Alfresco.
3.  Query the Alfresco database again using the above query.  Note that a new record has been added to the table with a start date and no end date.
4.  Complete the 'Review and Approve' workflow.
5.  Query the Alfresco database again using the above query.  Note that the record in question is still present and it's end date has been set.

In addition, if you go to your Dashboard and add the 'My Completed Tasks' dashlet, information on your complete workflow tasks appear.

So I am pretty sure that workflow information is not deleted from the system.  We just can't access it easily.

Darryl

zaizi
Champ in-the-making
Champ in-the-making
Few other things:

1. Workflow information is not deleted from the jBPM tables.
2. After a few thousand workflows you are going to want to start deleting that information in order to maintain database performance.
3. jBPM tables do not contain references to the package contents.
4. Package contents are lost from Alfresco repository. E.g. Content is deleted or checked-out content is workflowed and deleted on check-in.

Do you need BI or BAM?
Business intelligence (BI): Report on historical workflow data and stats.
Business Activity Monitoring (BAM): Dashboard view on which active workflows are about to breach their SLA.

Ultimately, you'll end up using a combination of jBPM logs and audit data to do workflow reporting.

Ainga

pp20218
Champ in-the-making
Champ in-the-making
Hi,

How you are running and testing this piece of java code?
Where you are calling this class's methods and testing ?

Regards
PP

huima
Champ in-the-making
Champ in-the-making
1. Workflow information is not deleted from the jBPM tables.
2. After a few thousand workflows you are going to want to start deleting that information in order to maintain database performance.

What is the proper way to do this kind of housekeeping inside Alfresco?

Are there already actions in place, which just need to configured to be run at some time intervals or should one write straight JDBC code that deletes unnecessary data from the tables?

mirkomane
Champ in-the-making
Champ in-the-making
Hi,
I'm interesting to retrieve the workflow information about a document. By the dashboard, actors to the workflow can see this informations, but nobody else. I would like everyone that search the document could see the relative workflow information. So I try to implement the Nicolas solution but he said that it doesn't always work because of two concurrent thread.
Anyone have found a solution to this problem?

Thank you very much.
Mirko

dranakan
Champ on-the-rise
Champ on-the-rise
Hi,

I would like to retrive the workflow information for a document (also if the workflow is ended) and showing all worklflow (from a precise type) in progress…

Someone has done something like this ?

Thank you

katiepecbvda
Champ in-the-making
Champ in-the-making
thank you nicolas. ur posts have been really helpful