Start an Activiti Process via Rest Script in CrafterCMS
Applicable to CrafterCMS 3.0
Russ Danner

Activiti is a powerful open source workflow engine built by Alfresco. Incorporating a workflow engine into your customer and employee facing sites and portals is an excellent solution for automating complex workflows that cross system boundaries while providing the user with a simple to use, contextual user experience. Working for a bank or an insurance company and need to workflow contracts with customers? No problem. CrafterCMS (the open-source Java-based CMS for enterprises) paired with Alfresco is a perfect solution. It’s customer friendly, highly scalable and about as powerful as enterprise technology gets!
In this blog, I’ll demonstrate the most straightforward example of a CrafterCMS REST service being used to start an Activiti Process.
Prerequisites
-
- You have Activiti (http://www.activiti.org/) installed
- NOTE:
- The authentication and process are hard coded to simplify the example
Step 1: Create a REST Controller
- Under Scripts/rest right click and click create controller
- Enter start-process.get as the controller name
- Add the following code to the controller. This code assumes Activiti is deployed into the same container as Crafter Engine.
Step2: Execute the Service
- Open a browser and hit the following URL:
- http://localhost:8080/api/1/services/start-process.json
Step 3: Verify that a new process instance has been started
-
- Open a browser and hit the following URL:
-
- http://localhost:8080/activiti-rest/service/runtime/process-instances
- Every time you run your Crafter REST service, the instance count returned in the above Activiti service will increase
Related Posts

Scaling Your Business with a Multi-Tenant CMS: Tips and Best Practices

Sara Williams

What Is Digital Experience Composition?

Amanda Jones

Fireside Chat with DXP Report

Mike Vertal

Lower Environments - One, Two, or More?

Amanda Jones