Activiti and the REST API

  • June 26, 2013
  • Scott

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
  • June 15, 2017
  • Krista

We are excited to announce our first customer speaker for Driven 2017. Quang Ton, leader of Schlumberger's pro...

  • June 12, 2017
  • Scott

We had the pleasure of presenting Brazos CX Insights to the bpmNEXT 2017 conference in April.  As we've previ...

  • June 11, 2017
  • Scott

Anatoly does a great job of explaining the event types and why you really only need 5 or 6 of them to fully ex...