How to execute an Action like 'Approved'?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2007 04:38 PM
Hello,
I have set up a simple workflow in the web client where is possible to Approve or Reject a document. The rule is defined against a folder that contains the document.
I want to execute the "Approved" action with web services but I don't know how to do that.
I see there is a an executeActions method described here:
http://wiki.alfresco.com/wiki/Action_Web_Service#executeActions
but I don't know how the actual Action object should be built.
If I read all NamedValue-s of the document that I want to run the "Approve" action against, I can see values like:
{http://www.alfresco.org/model/application/1.0}approveStep = Approved
but I don't know what this means.
So is there any simple example how to execute an Action with web services?
Thanks,
Biland
I have set up a simple workflow in the web client where is possible to Approve or Reject a document. The rule is defined against a folder that contains the document.
I want to execute the "Approved" action with web services but I don't know how to do that.
I see there is a an executeActions method described here:
http://wiki.alfresco.com/wiki/Action_Web_Service#executeActions
but I don't know how the actual Action object should be built.
If I read all NamedValue-s of the document that I want to run the "Approve" action against, I can see values like:
{http://www.alfresco.org/model/application/1.0}approveStep = Approved
but I don't know what this means.
So is there any simple example how to execute an Action with web services?
Thanks,
Biland
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2007 08:50 AM
Hi,
Here is a quick example on how to execute an action using the web service API.
Cheers,
Roy
Here is a quick example on how to execute an action using the web service API.
Predicate predicate = new Predicate(new Reference[]{BaseWebServiceSystemTest.contentReference}, BaseWebServiceSystemTest.store, null); // Create the action to add the versionable aspect NamedValue[] parameters = new NamedValue[]{new NamedValue("aspect-name", false, Constants.ASPECT_VERSIONABLE, null)}; Action newAction1 = new Action(); newAction1.setActionName("add-features"); newAction1.setTitle("Add the versionable aspect to the node."); newAction1.setDescription("This will add the verisonable aspect to the node and thus create a version history."); newAction1.setParameters(parameters); // Execute the action ActionExecutionResult[] results = this.actionService.executeActions(predicate, new Action[]{newAction1});
Cheers,
Roy
