Search code examples
bonita

How to access Bonita Engine API from a custom REST API Extension


I would like to develop a REST API Extensions that access the Engine API in order to do some queries and then start a new process.

What is the best way to access the Engine API from such REST extension?


Solution

  • Since Bonita BPM 7.2 you can use context.apiClientto access Bonita BPM Engine APIs from your REST API extension Groovy code.

    For example in order to use the IdentityAPI simply use context.apiClient.identityAPI followed by the method you want to call: context.apiClient.identityAPI.getUsers(0, 10, UserCriterion.FIRST_NAME_ASC)