cancel
Showing results for 
Search instead for 
Did you mean: 

Where does the workflow package go to die?

mangar
Star Contributor
Star Contributor
I have a workflow, I attach some files to it.  The user completes the workflow.

Where does the workflow package go to die?

Do I need to clean something up or does it go away when the workflow reaches the end task?
5 REPLIES 5

abarisone
Star Contributor
Star Contributor
Hi,
when a workflows gets to completed state, it is kept anyway, but it is no more displayed.
There's no need of you about cleaning up anything.
You can always get info about completed workflows using WorkflowServices API: in fact there is a API called getCompletedWorkflows() in the workflowService which you can use for the purpose.

Rgeards,
Andrea

mangar
Star Contributor
Star Contributor
So if I want to get rid of the files in the workflow, I have to delete them before the task ends?  Im just thinking that there are going to be alot of documents hanging around in a no mans land. At some point this will cause a bloated repository and some performance issues, not to mention disk space.

cgiuliano
Champ in-the-making
Champ in-the-making
Hi Mangar,

If my understanding is correct, the documents attached to a workflow are just referenced by the bpm_package, not replicated. So I expect the only space occupied by the completed workflows is represented by the table rows about execution history. No documents should be hanging around!

Carlo

mangar
Star Contributor
Star Contributor
Thanks Carlo,

  However, the documents are NOT in the repository at first.  They are uploaded directly to the workflow package, like: content.putContent(file.inputStream()

  Full code here: http://forums.alfresco.com/forum/developer-discussions/workflow/add-file-workflow-package-problem-01...

  Once other tasks are complete, I copy them into the repository, then complete the workflow.

  SO the question is; What happens to the Node of the workflow package once the workflow is complete. Because if it's not deleted, then that content would still be there correct?

cgiuliano
Champ in-the-making
Champ in-the-making
Hi Mangar,

Now I got your use case!
I haven't experience in that, but according to these posts
<a>http://forums.alfresco.com/forum/developer-discussions/development-environment/explanations-about-wo...</a>
<a>http://forums.alfresco.com/forum/developer-discussions/workflow/add-new-workflow-java-07042011-1616</a>
the created packages should be stored in
workspace://SpacesStore/system/workflow/packages
I cannot check if there are document nodes associated to the packages (I don't use this kind of on-the-fly workflows), but I believe you can easily answer by using the node browser and check if there are nodes to be deleted.

Hope this can help you!

Carlo