cancel
Showing results for 
Search instead for 
Did you mean: 

Workflows Archivization

upforsin
Star Collaborator
Star Collaborator

Hello,

Are Alfresco's workflows somewhere archived with all of their content, including variables?

If yes, how is it possible from Admin's account to view them all? (I know about Workflow console, but it only shows current workflows, I need to see those, which are completed).

howkymike
Alfresco Developer
1 ACCEPTED ANSWER

afaust
Legendary Innovator
Legendary Innovator

The WorkflowService API for Java has a simple getWorkflows(WorkflowInstanceQuery) which can be used to retrieve completed processes.

View answer in original post

5 REPLIES 5

jljwoznica
Star Collaborator
Star Collaborator

Are you asking about workflows that are completed or in process? You can do this with the APIs. Check this out and see if this helps: https://docs.alfresco.com/community/references/API-JS-WorkflowInstance.html.

Completed are the most important.

Is there a Java's JscriptWorkflowInstance version for completed processes?

howkymike
Alfresco Developer

afaust
Legendary Innovator
Legendary Innovator

The class JscriptWorkflowInstance is generic and can be used for both in process and completed workflows. The main difference is what method you call to retrieve the workflow instance. Unfortunately, by default, the JavaScript "workflow" root scope object only provides a getInstance(String) method by which you can access an individual workflow, regardless of its active / inactive state. There is no list / query operation to retrieve multiple inactive workflows in bulk. The only (indirect) way to potentially get to more than one completed process would be to use the getCompletedTasks() operation, which would retrieve completed tasks from both active and completed workflows, and from those tasks you could get to the workflow instance itself.

upforsin
Star Collaborator
Star Collaborator

Thank you, I will try to play around to getCompletedTasks() then.

But is there a Java equivalent? I'm not keen on writing Javascript because there is not debugger there (I cannot easly check how things work in comparison to live-state debugging in Eclipse).. or can I?

howkymike
Alfresco Developer

afaust
Legendary Innovator
Legendary Innovator

The WorkflowService API for Java has a simple getWorkflows(WorkflowInstanceQuery) which can be used to retrieve completed processes.