Hello!
Have site and document library with docs in it.
Some workflow (one per doc) starting with some doc.
We can see icon in doclist - this doc is under workflow - good.
Workflow ending and closed.
Now we see just "clean" doc like no workflows was already done.
So, need too see in doclib - this document already was under workflow and workflow closed. Logically - possibility to quick see this closed worflow.
I think it can be something like doc model property or aspect looking like link named "Done" with url to closed workflow.
How to realise this? Or may be another way to see - "some job under this doc was done".
(Really strange why its not realised by default. Found some request under 10 years ago - and still nothing?)
Thank you!
Hi
You are right, Alfresco do not display list of completed workflow on specific document on document detail page. You may implement your own code to retrieve and display completed workflow using WorkflowService. Check getWorkflowsForContent method to get active or inactive workflow list for specific node,
/**
* Gets the Workflows that act upon the specified Repository content.
*
* @param packageItem the repository content item to get workflows for
* @param active true => active workflows only, false => completed workflows only
* @return list of workflows which act upon the specified content
*/
@Auditable(parameters = {"packageItem", "active"})
public List<WorkflowInstance> getWorkflowsForContent(NodeRef packageItem, boolean active);
Hm.. cant find info about getWorkflowsForContent in Alfresco Docs
"..implement your own code.." It looks like clear Java code.
But may be possible just use JavaScript and folder Rules e.g. for trying to copy/paste existing workflow url into special memo field of document (document model properties or aspect)?
Or make flag property "Done" if process closed via the folder rule.
Hope folder rule "if document changed" - take affect if workflow for this doc was started.. (may be not.. dont know)
Or make special workflow rule - change doc property before workflow close ...
Here it the for API doc,
Can be useful : Complete Workflow History Plugin
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.