cancel
Showing results for 
Search instead for 
Did you mean: 

How to get workflow instances related to a specific document

amiramira
Champ in-the-making
Champ in-the-making
Hello
I use this URL to get workflow instances  http://localhost:8082/alfresco/service/api/workflow-instances but i want to get just workflow instances related to a specific document.There is any web script to get this or i have to create my own web_script?

Could anyone help?
2 REPLIES 2

muralidharand
Star Contributor
Star Contributor
Hi,
You can use the below webscript to get all the running workflows for a particular node reference / document.
http://hostSmiley Tongueort/alfresco/service/script/org/alfresco/repository/workflow/workflow-instances-for-node....




Get Workflow Instance Collection for NodeRef
GET /alfresco/service/api/node/{store_type}/{store_id}/{id}/workflow-instances
Description:   Retrieves all active workflow instances that the given node is part of.
Authentication:   user
Transaction:   required
Format Style:   any
Default Format:   json
Lifecycle:   public_api
Id:   org/alfresco/repository/workflow/workflow-instances-for-node.get
Description:   classpath:alfresco/templates/webscripts/org/alfresco/repository/workflow/workflow-instances-for-node.get.desc.xml


Thank's it was helpful