I have created a rule for a space in which added simple workflow.
If user approves file from this workflow then, this file is get moved to another space.
Now I want to approve files using alfresco web service client. For this I am using following code, but somehow it is not moving file to another space (not executing approve action)
ActionServiceSoapBindingStub actionService = WebServiceFactory.getActionService();
Rule[] rules = actionService.getRules(parentRef, new RuleFilter());
for (int i = 0; i < rules.length; i++) {
Rule rule = rules[i];
if(rule.getTitle().equals("Upload workflow rule")) {
ActionExecutionResult[] results = actionService.executeActions(predicete,
new Action[{rule.getAction()});
}
}
Thanks, Yogesh
I found solution for this, just need to call CommandServlet with specific parameters.
Example – (http://localhost:8080/alfresco/command/workflow/approve/workspace/SpacesStore/0000-0000-0000)
Here “0000-0000-0000” is node id on which I wanted to execute workflow approve.
Thanks.