Alfresco provides different BPM engines:
Alfresco Embedded Activiti Engine
Workflow definitions, using BPMN standard notation, are deployed to the Alfresco Repository using different approaches:
Processes or Workflows are created from workflow definitions by starting a new instance. BPMN activities and variables definitions are taken by users to populate the values and to attach Repository documents (items).
ACS Workflow Development APIs
There is a number of APIs that can be used within the Repository to manage workflow operations.
Java API
The following sample list workflow definitions using workflowBootstrap Spring Bean from JavaScript Console.
var context =
Packages.org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext(); var workflowBootstrap =
context.getBean('workflowBootstrap', Packages.org.alfresco.repo.workflow.WorkflowDeployer); logger.log(workflowBootstrap.getWorkflowDefinitions());
Workflow Admin Console
# Show workflow definitions show definitions all # Show running processes show workflows all # Show running processes for workflow definition activitiAdhoc show workflows 'activiti$activitiAdhoc v1' # Show running paths for process activiti$101 show paths activiti$101 # Get information (values, items, users) from process activiti$101 desc workflow activiti$101 # Show running tasks for process activiti$101 show tasks activiti$101 # Get information (values, items, users) from task activiti$147 desc task activiti$147 # Get all running tasks (COMPLETED state is not working, use REST API v1 for that) query task taskState=IN_PROGRESS
REST API v0
/api/workflow-definitions /api/workflow-definitions/{workflowDefinitionId} /api/workflow-definitions/{workflow_definition_id}/workflow-instances /api/workflow-instances /api/workflow-instances/{workflow_instance_id} /api/workflow-instances/{workflow_instance_id}/diagram /api/workflow-instances/{workflow_instance_id}/task-instances /api/workflow/task/end/{taskId} /api/workflow/task/end/{taskId}/{transitionId}
You can even get the diagram representation of a running process, that is not available in any other API.
REST API v1
http://localhost:8080/alfresco/api/-default-/public/workflow/versions/1/deployments http://localhost:8080/alfresco/api/-default-/public/workflow/versions/1/process-definitions http://localhost:8080/alfresco/api/-default-/public/workflow/versions/1/process-definitions/activitiAdhoc:1:4/image http://localhost:8080/alfresco/api/-default-/public/workflow/versions/1/processes http://localhost:8080/alfresco/api/-default-/public/workflow/versions/1/processes/460/variables http://localhost:8080/alfresco/api/-default-/public/workflow/versions/1/processes/460/items http://localhost:8080/alfresco/api/-default-/public/workflow/versions/1/processes/460/tasks http://localhost:8080/alfresco/api/-default-/public/workflow/versions/1/tasks/506/candidates
http://localhost:8080/alfresco/api/-default-/public/workflow/versions/1/processes?where=(status=completed)
This is the only API to get workflow definition diagram (using the "image" endpoint) and to get the processes that has been completed (using the where=(status=completed) filter).
Video recording
Additional details are available in the following video recording:
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.