Activiti and the REST API

  • June 26, 2013
  • Scott
  • 0 Comments

Congrats to the Activiti team for releasing 5.13, which includes a new REST-API. They redesigned the REST API from scratch, which I think was the right move – thinking about it as a whole instead of separate, independently designed parts:

  • The old API doesn’t cover all features offered by the Java API. The new version covers 99% of all methods in the API services (RuntimeService, RepositoryService, HistoryService, …), which opens up the full potential of the engine through REST. This allows other programing languages to benefit from the power of the Activiti engine.
  • As requirements and use cases came along, the old API grew and evolved. Because of the use-case driven additions, there wasn’t really a common approach followed when adding new REST-calls. This resulted in differences in naming and handling between resources. The new API has introduced a uniform approach.
  • The new API applies the REST-principles more strictly (resource naming, appropriate HTTP-verbs used for resource actions, use of URL’s in responses referencing other resources, using the right HTTP-response codes).

Of course, what we like about it most is how it enables alternate UIs and App embedding possibilities that a clean REST-API enables.  The Activiti team has also done a good job of making sure that you can embed the API in an existing application:

It’s also possible to include the REST-API in your existing application (which may already have an Activiti-engine in it). We tried to make the REST-module (and the other modules as well, by the way) as easy to embed as possible. Just add the activiti-rest.jar as a dependency with all of it’s transitive dependencies and configure the Activiti Restlet Application. If you app runs in a web-container, Restlet is configured as a single servlet. When your application is not in a servlet-environment, you can run a standalone Restlet server to expose the REST-API for your engine.

 

Related Posts
  • July 18, 2018
  • Ariana
  • 0 Comments

We're pleased to announce all of the sponsors for Driven 2018. Automation Anywhere Camunda Bizagi ...

  • July 16, 2018
  • Ariana
  • 0 Comments

Driven 2018 is coming up quick and we wanted to share some of our most anticipated sessions with you. You can ...

  • July 15, 2018
  • Scott
  • 0 Comments

From nearly the first year I began writing this blog on behalf of BP3, pundits and commentators have predicted...