Chapter 6. Developer's guide

## Chapter 6. Developer's guide

This chapter describes how to start playing with Orchestra:

- How to develop a simple application by leveraging Orchestra APIs

## 6.1. Orchestra APIs

### 6.1.1. Getting started with Orchestra APIs

Actually, four different APIs are available in Orchestra :

- QueryRuntimeAPI that gives runtime information about instances of process and activities.

- QueryDefinitionAPI that gives information of process definition.

- ManagementAPI that gives the possibility to manage Orchestra (deploy / undeploy processes, etc...)

- InstanceManagementAPI that gives the possibility to manage instances of process (suspend / resume / exit process instance)

You can find detailled information about APIs in the javadocs. APIs are included in a Maven module. To include this module you have to add following Maven dependency :

    <dependency>
      <groupId>org.ow2.orchestra</groupId>
      <artifactId>orchestra-api</artifactId>
      <version>4.4.1</version>
    </dependency>

If you do not want / can't use Maven, you can create a Maven module which depends only on this dependency and create an assembly. Then copy created jar to your project.

- QueryRuntimeAPI: to get recorded/runtime informations for instances and activities. It allows also to get activities per state. Then operations in this API applies to process instances and activity instances.

Hereafter you will find an example on how to access to the QueryRuntimeAPI from your client application:

     org.ow2.orchestra.facade.QuerierRuntimeAPI querierRuntimeAPI =
                    org.ow2.orchestra.facade.AccessorUtil.getQueryRuntimeAPI(String, String);

The method getQueryRuntimeAPI takes two arguments of type String. The first argument is the URL of the JMX service. The second is the name of the object JMX. In case we use the default configuration, two constants can be used which are: AccessorUtil.SERVICE_URL and AccessorUtil.OBJECT_NAME.

For a detailed insight on Orchestra APIs, please take a look to the Orchestra javadoc APIs (available under /javadoc directory)

Similar methods exists to access to the QueryDefinitionAPI, ManagementAPI and InstanceManagementAPI.

5.8.2. How to use camel context instead of HTTP for Web Service interactions ? |  | 6.2. Orchestra Client jar