You are here

Workflow

The Activiti workflow engine is built into Alfresco Content Services. It provides a predetermined set of document-review and approval workflows that you can use.
Information Workflow
Public Java API To start and manage workflow instances use the WorkflowService, see also the JavaDocs.
Repository JavaScript API Use the workflow root object, for more info see the Workflow JavaScrip API documentation.

Example of how to start a workflow with an attached file:

var aFile = search.findNode("<NodeRef>");
var workflowAction = workflow.getDefinitionByName('activiti$<workflow-definition-name>');
var package= workflow.createPackage();
package.addNode(aFile);
var parameters = new Array(2);
parameters["bpm:workflowDescription"] = "Testing Workflow ";
parameters["someCustomWorkflowVariable"]="someVal";
var futureDate = new Date();
futureDate.setDate(futureDate.getDate() + 7);
parameters["bpm:workflowDueDate"] = futureDate; 
workflowAction.startWorkflow(package, parameters);               
Alfresco ReST API The Alfresco ReST API provides APIs for dealing with process definitions, process instances, and tasks. To see the reference documentation for these APIs, and to try them out on the online ReST API explorer, go to https://api-explorer.alfresco.com/api-explorer. If you have the ReST API explorer running locally, then go to http://localhost:8080/api-explorer. Now, by default the ReST API Explorer will show the API Definitions for the Core API. You need to switch to the Workflow API definition in the API definition drop down box at the top of the page.
CMIS ReST API Not Available
Mobile SDK (iOS) The WorkflowService is exposed. The Model also exposes various Workflow data structures.
Mobile SDK (Android) The Node is exposed in the SDK Model. You can review the documentation for AlfrescoNode
More Information

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.