Closed workflow history related with document

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Active Member II

Closed workflow history related with document

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!

4 Replies
Highlighted
Established Member

Re: Closed workflow history related with document

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);
Highlighted
Active Member II

Re: Closed workflow history related with document

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 ...

Highlighted
Established Member

Re: Closed workflow history related with document

Highlighted
Active Member II

Re: Closed workflow history related with document

Can be useful :  Complete Workflow History Plugin