Get completed workflows for a node
![dave984 dave984](https://connect.hyland.com/legacyfs/online/avatars/Blue-user-logo.png)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2015 11:34 AM
Hi all, starting from a previous post, i'm asking if there is a way to have in the document-details page of a document the information not only about the active workflow but also the completed.
So i started studying the panel 'Workflows' and the webscripts invoked, that is document-workflows.
In document-workflows.get.js i found the remote call that retrieve all the active workflows:
Finally the question is: is there a way to retrieve the completed workflows for a defined node? i don't think i can add something in query string to that service…
So i started studying the panel 'Workflows' and the webscripts invoked, that is document-workflows.
In document-workflows.get.js i found the remote call that retrieve all the active workflows:
var result = remote.call("/api/node/" + nodeRef.replace(":/", "") + "/workflow-instances");
Finally the question is: is there a way to retrieve the completed workflows for a defined node? i don't think i can add something in query string to that service…
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2015 03:47 AM
HI,
I don't know any default webscript to get completed workflows for a node, but you can make your own java based webscript to do it. Take a look at WorkflowService class and method getWorkflowsForContent.
I don't know any default webscript to get completed workflows for a node, but you can make your own java based webscript to do it. Take a look at WorkflowService class and method getWorkflowsForContent.
/** * 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);
![dave984 dave984](https://connect.hyland.com/legacyfs/online/avatars/Blue-user-logo.png)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2015 04:40 AM
exactly what i need!!
Thanks!
Thanks!
![](/skins/images/A90266AC6EB1934BC937DAFB2842964E/responsive_peak/images/icon_anonymous_message.png)