cancel
Showing results for 
Search instead for 
Did you mean: 

backend code for alfresco/api/workflow-instances

cafeguy
Champ in-the-making
Champ in-the-making
Hi forum,
  I'm trying to find the backend code that is responsible for returning the list of workflows from the URL below.

share/proxy/alfresco/api/workflow-instances?initiator=username&exclude=jbpm$wcmwf:*,jbpm$wf:articleapproval…&skipCount=0&maxItems=50&startedAfter=2014-09-16T11:59:59.999-07:00

Basically, I need to get a list of completed workflows back, but I need to know what parameter to pass it.

Does anyone know where this code might reside?  I've searched in XML, Java file, but no luck yet.

Thanks everyone.
2 REPLIES 2

kaynezhang
World-Class Innovator
World-Class Innovator
Share url as such format
share/proxy/alfresco/api/workflow-instances
will be sumbmitted to a Spring MVC proxy controller ,in the proxy controller the request url will be rebuild to send request to alfresco webscript api with address
/alfresco/service/api/workflow-instances
and the response of  alfresco webscript api will be used as response of share.
So the parameters of
share/proxy/alfresco/api/workflow-instances
are the same as
/alfresco/service/api/workflow-instances

Following are some parameters
 maxItems,skipCount,exclude,state,initiator,priority,dueBefore,dueAfter,startedBefore,startedAfter,completedBefore,completedAfter,definitionName,definitionId

For workflow-instances webscript api information,please visit
http://localhost:8080/alfresco/service/index/all

cafeguy
Champ in-the-making
Champ in-the-making
Thanks to Kaynezhang, I was able to retrieve the data by adding &state=completed as part of the query.