cancel
Showing results for 
Search instead for 
Did you mean: 
angelborroy
Community Manager Community Manager
Community Manager

Alfresco provides different BPM engines:

  • Alfresco Embedded Activiti Engine for ACS, that is integrated with the Alfresco Repository service. There is UI support using Share web application, but ADF applications (like ACA and ADW) are not supporting this engine. It's available for both Community and Enterprise versions of ACS.
  • Alfresco Process Services (APS) is an additional product that provides an AngularJS UI working with an independent Activiti Engine. It may be integrated with ACS to read, modify or create documents in the Repository. This product is Enteprise and it requires licensing.
  • Alfresco Process Automation (APA) is a Cloud Native BPM engine that is only available via PaaS and requires subscription.

Alfresco Embedded Activiti Engine

image

Workflow definitions, using BPMN standard notation, are deployed to the Alfresco Repository using different approaches:

  • Create a Repository Alfresco addon (JAR or AMP packaging) that includes the process definition and additional resources. Building this kind of addons is described by Jeff Potts on his Alfresco Developer Series Tutorial. Once deployed, the new workflow definition is registered in the workflowBootstrap Spring Bean.
  • Upload a XML file with the BPMN definition to Repository > Data Dictionary > Workflow Definitions folder in the Alfresco Repository. Once the property Workflow Deployed of this file is checked, the workflow definition is available in the Repository.

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:

2 Comments
unibravo
Confirmed Champ
Confirmed Champ

Dear Angel Borroy, we are people who have embraced, supported, and strived for years to make the Community edition more recognized and used by more people.

In the Alfresco Community Edition, we want to integrate Activiti 6 or 7, but we don't know how to do it, and we are constantly being directed to the paid version (by the way, the cost is unclear and the pricing is not transparent). Could you guide us on how to run Alfresco with the Activiti 7 Community Edition in ADF applications? What would you recommend?

angelborroy
Community Manager Community Manager
Community Manager

Given the complexity of this topic, would you be open to discussing this in more detail via email or perhaps scheduling a Tech Talk Live? This would allow us to delve deeper into the technical aspects and explore the best approach together.