Chapter 7. Working with the REST API

In the previous chapter, we provided information regarding the Activiti Process Engine's APIs and how to use the Process Engine's JAR file and APIs. In this chapter, we will work with the Process Engine using the REST service.

In this chapter, we will go through the following topics:

  • An overview of the Activiti REST API
  • Implementing REST services
  • Working with Repository APIs as REST
  • Using Process APIs as REST
  • Using Task APIs as REST
  • Working with users using REST
  • Using management services as REST

With the help of REST services, we can access the process engine from any sort of device implemented in any of the languages. So, with the help of REST, there is no barrier to communicating with the Activiti Engine.

Overview of the Activiti REST API

In Chapter 1, Installing Activiti, we saw that Activiti provides activiti-rest.war to allow you to access the process engine as a REST Service. As the activiti-rest.war file is provided by Activiti, we need not create a separate web service for the process engine. In Chapter 6, The Activiti ProcessEngine API, we saw that we can access the process engine using APIs by adding the respective JAR files. We can also access the Process Engine APIs without importing the respective JAR files, that is, using REST services. To access the process engine as REST, you need to deploy the activiti-rest.war file into a web server such as apache-tomcat. You will find activiti-rest.war in the wars folder at the path where you extracted activiti-5.x.zip/activiti-5.13.0/wars, as shown in the following screenshot:

Overview of the Activiti REST API
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset