Browse Source

added three REST-activated client options

Grega Bremec 3 years ago
parent
commit
86b533a99f
45 changed files with 9797 additions and 0 deletions
  1. 73 0
      pom.xml
  2. 20 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/cdi/AuthPassword.java
  3. 20 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/cdi/AuthUsername.java
  4. 45 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/cdi/ConfigProducer.java
  5. 20 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/cdi/EndpointUrl.java
  6. 20 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/cdi/RhpamClient.java
  7. 20 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/cdi/RhpamProxy.java
  8. 20 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/cdi/SwaggerClient.java
  9. 73 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/cdi/WebTargetProducer.java
  10. 8 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/jaxrs/Activator.java
  11. 81 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rest_client/ManualInvocationClient.java
  12. 55 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rest_client/ManualRhpamResponse.java
  13. 65 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rest_client/ProxyInvocationClient.java
  14. 87 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rest_client/SwaggerInvocationClient.java
  15. 25 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/RhpamEndpoints.java
  16. 3769 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/api/ProcessInstancesApi.java
  17. 62 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/ApiCallback.java
  18. 1209 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/ApiClient.java
  19. 91 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/ApiException.java
  20. 59 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/ApiResponse.java
  21. 39 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/Configuration.java
  22. 362 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/JSON.java
  23. 52 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/Pair.java
  24. 77 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/ProgressRequestBody.java
  25. 76 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/ProgressResponseBody.java
  26. 55 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/StringUtil.java
  27. 75 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/auth/ApiKeyAuth.java
  28. 29 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/auth/Authentication.java
  29. 54 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/auth/HttpBasicAuth.java
  30. 39 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/auth/OAuth.java
  31. 162 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/NodeDefinition.java
  32. 370 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/NodeInstance.java
  33. 104 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/NodeInstanceList.java
  34. 431 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/ProcessDefinition.java
  35. 104 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/ProcessDefinitions.java
  36. 428 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/ProcessInstance.java
  37. 104 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/ProcessInstanceList.java
  38. 485 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/TaskSummary.java
  39. 104 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/TaskSummaryList.java
  40. 162 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/TimerDefinition.java
  41. 186 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/VariableInstance.java
  42. 104 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/VariableInstanceList.java
  43. 265 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/WorkItemInstance.java
  44. 104 0
      src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/WorkItemInstanceList.java
  45. 4 0
      src/main/resources/rhpam-rest-client.properties

+ 73 - 0
pom.xml

@@ -16,6 +16,14 @@
 		<version.maven.war.plugin>3.0.0</version.maven.war.plugin>
 		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+		<!-- These are for Swagger-generated code. -->
+		<swagger-codegen-maven-plugin-version>2.4.21</swagger-codegen-maven-plugin-version>
+		<swagger-core-version>1.5.15</swagger-core-version>
+        <okhttp-version>2.7.5</okhttp-version>
+        <gson-version>2.8.1</gson-version>
+        <gson-fire-version>1.8.0</gson-fire-version>
+        <threetenbp-version>1.3.5</threetenbp-version>
+		<!-- END Swagger-generated code. -->
 	</properties>
 
 	<dependencyManagement>
@@ -53,6 +61,11 @@
 			<scope>provided</scope>
 		</dependency>
 		<dependency>
+			<groupId>org.jboss.resteasy</groupId>
+			<artifactId>resteasy-client</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
 			<groupId>org.apache.camel</groupId>
 			<artifactId>camel-core</artifactId>
 			<scope>provided</scope>
@@ -77,6 +90,39 @@
 			<artifactId>shared-data-model</artifactId>
 			<version>1.0.0</version>
 		</dependency>
+		<!-- These are needed for the Swagger-generated code. -->
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-annotations</artifactId>
+            <version>${swagger-core-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.squareup.okhttp</groupId>
+            <artifactId>okhttp</artifactId>
+            <version>${okhttp-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.squareup.okhttp</groupId>
+            <artifactId>logging-interceptor</artifactId>
+            <version>${okhttp-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+            <!-- Managed by jboss-eap-parent (2.8.6.redhat-00001). -->
+            <!-- version>${gson-version}</version -->
+        </dependency>
+        <dependency>
+            <groupId>io.gsonfire</groupId>
+            <artifactId>gson-fire</artifactId>
+            <version>${gson-fire-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.threeten</groupId>
+            <artifactId>threetenbp</artifactId>
+            <version>${threetenbp-version}</version>
+        </dependency>
+		<!-- END Swagger-generated code. -->
 	</dependencies>
 	<build>
 		<plugins>
@@ -88,6 +134,33 @@
 					<failOnMissingWebXml>false</failOnMissingWebXml>
 				</configuration>
 			</plugin>
+			<plugin>
+			    <groupId>io.swagger</groupId>
+			    <artifactId>swagger-codegen-maven-plugin</artifactId>
+			    <version>${swagger-codegen-maven-plugin-version}</version>
+			    <executions>
+			        <execution>
+			        	<phase>none</phase>
+			            <goals>
+			                <goal>generate</goal>
+			            </goals>
+			            <configuration>
+			                <inputSpec>http://localhost:8080/kie-server/services/rest/server/swagger.json</inputSpec>
+			                <language>java</language>
+			                <generateApiTests>false</generateApiTests>
+			                <generateApiDocumentation>false</generateApiDocumentation>
+			                <generateModelTests>false</generateModelTests>
+			                <generateModelDocumentation>false</generateModelDocumentation>
+		                   	<modelPackage>net.p0f.samples.rhpam_fuse_integration.rhpam.model</modelPackage>
+		                   	<apiPackage>net.p0f.samples.rhpam_fuse_integration.rhpam.api</apiPackage>
+		                  	<invokerPackage>net.p0f.samples.rhpam_fuse_integration.rhpam.invoke</invokerPackage>
+			                <configOptions>
+			                   <sourceFolder>src/gen/java/main</sourceFolder>
+			                </configOptions>
+			            </configuration>
+			        </execution>
+			    </executions>
+			</plugin>
 		</plugins>
 	</build>
 </project>

+ 20 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/cdi/AuthPassword.java

@@ -0,0 +1,20 @@
+package net.p0f.samples.rhpam_fuse_integration.cdi;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface AuthPassword {
+}

+ 20 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/cdi/AuthUsername.java

@@ -0,0 +1,20 @@
+package net.p0f.samples.rhpam_fuse_integration.cdi;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface AuthUsername {
+}

+ 45 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/cdi/ConfigProducer.java

@@ -0,0 +1,45 @@
+package net.p0f.samples.rhpam_fuse_integration.cdi;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+import javax.ejb.Startup;
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Produces;
+
+@ApplicationScoped
+@Startup
+public class ConfigProducer {
+	private Properties p = new Properties();
+
+	public ConfigProducer() {
+		InputStream pi = this.getClass().getResourceAsStream("/rhpam-rest-client.properties");
+		try {
+			this.p.load(pi);
+			pi.close();
+		} catch (IOException ioe) {
+			// log something or whatever
+		} finally {
+			// ?
+		}
+	}
+
+	@Produces
+	@EndpointUrl
+	public String getEndpointUrl() {
+		return this.p.getProperty("rhpam.endpoint", "unknown");
+	}
+
+	@Produces
+	@AuthUsername
+	public String getAuthUsername() {
+		return this.p.getProperty("rhpam.username", "admin");
+	}
+
+	@Produces
+	@AuthPassword
+	public String getAuthPassword() {
+		return this.p.getProperty("rhpam.password", "admin");
+	}
+}

+ 20 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/cdi/EndpointUrl.java

@@ -0,0 +1,20 @@
+package net.p0f.samples.rhpam_fuse_integration.cdi;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface EndpointUrl {
+}

+ 20 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/cdi/RhpamClient.java

@@ -0,0 +1,20 @@
+package net.p0f.samples.rhpam_fuse_integration.cdi;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface RhpamClient {
+}

+ 20 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/cdi/RhpamProxy.java

@@ -0,0 +1,20 @@
+package net.p0f.samples.rhpam_fuse_integration.cdi;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface RhpamProxy {
+}

+ 20 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/cdi/SwaggerClient.java

@@ -0,0 +1,20 @@
+package net.p0f.samples.rhpam_fuse_integration.cdi;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Qualifier
+@Target({ TYPE, METHOD, PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface SwaggerClient {
+}

+ 73 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/cdi/WebTargetProducer.java

@@ -0,0 +1,73 @@
+package net.p0f.samples.rhpam_fuse_integration.cdi;
+
+import java.util.logging.Logger;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.ClientBuilder;
+import javax.ws.rs.client.WebTarget;
+
+import org.jboss.resteasy.client.jaxrs.BasicAuthentication;
+import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget;
+
+import net.p0f.samples.rhpam_fuse_integration.rhpam.RhpamEndpoints;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.ApiClient;
+
+@ApplicationScoped
+public class WebTargetProducer {
+	private static final Logger log = Logger.getLogger(WebTargetProducer.class.getName());
+
+	@Inject
+	@EndpointUrl
+	private String rhpamEndpoint;
+	
+	@Inject
+	@AuthUsername
+	private String rhpamUser;
+	
+	@Inject
+	@AuthPassword
+	private String rhpamPassword;
+
+	@Produces
+	@RhpamClient
+	public WebTarget getWebTarget() {
+		Client rc = ClientBuilder.newClient().register(new BasicAuthentication(rhpamUser, rhpamPassword));
+
+		WebTarget wt = rc.target(rhpamEndpoint);
+		
+		log.info("Producing WebTarget instance for " + rhpamEndpoint);
+		
+		return wt;
+	}
+
+	@Produces
+	@RhpamProxy
+	public RhpamEndpoints getProxyClient() {
+		Client rc = ClientBuilder.newClient().register(new BasicAuthentication(rhpamUser, rhpamPassword));
+
+		ResteasyWebTarget wt = (ResteasyWebTarget)rc.target(rhpamEndpoint);
+
+		RhpamEndpoints re = wt.proxy(RhpamEndpoints.class);
+
+		log.info("Producing RhpamEndpoints instance for " + rhpamEndpoint);
+
+		return re;
+	}
+	
+	@Produces
+	@SwaggerClient
+	public ApiClient getApiClient() {
+		ApiClient ac = new ApiClient();
+
+		ac.setBasePath(rhpamEndpoint.replaceFirst("/server$", ""));
+		ac.setUsername(rhpamUser);
+		ac.setPassword(rhpamPassword);
+		
+		log.info("Producing ApiClient for " + ac.getBasePath());
+
+		return ac;
+	}
+}

+ 8 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/jaxrs/Activator.java

@@ -0,0 +1,8 @@
+package net.p0f.samples.rhpam_fuse_integration.jaxrs;
+
+import javax.ws.rs.ApplicationPath;
+import javax.ws.rs.core.Application;
+
+@ApplicationPath("/api")
+public class Activator extends Application {
+}

+ 81 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rest_client/ManualInvocationClient.java

@@ -0,0 +1,81 @@
+package net.p0f.samples.rhpam_fuse_integration.rest_client;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.enterprise.context.RequestScoped;
+import javax.inject.Inject;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.client.WebTarget;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import net.p0f.samples.rhpam_fuse_integration.cdi.RhpamClient;
+
+// Only two endpoints here, for demonstration: /start and /signal; they expect
+// their respective operands as path parameters and request payload as POST
+// method body (json, of course).
+//
+// Probably best used with the pam-simple-process.StartStopStart process model.
+
+@RequestScoped
+@Path("/manual")
+@Consumes(MediaType.APPLICATION_JSON)
+@Produces(MediaType.APPLICATION_JSON)
+public class ManualInvocationClient {
+	private static final Logger log = Logger.getLogger(ManualInvocationClient.class.getName());
+
+	// This uses a CDI producer in WebTargetProducer, which in turn uses
+	// another producer in ConfigProducer to load rhpam-rest-client.properties
+	// and configure WebTarget with base URL and the Client with auth settings.
+	@Inject
+	@RhpamClient
+	private WebTarget wt;
+
+	@POST
+	@Path("/start/{kieContainer}/{processModel}")
+	public ManualRhpamResponse startProcess(@PathParam("kieContainer") String containerName,
+								@PathParam("processModel") String modelName,
+								Object data) {
+		log.log(Level.INFO, "Starting a new process from " + containerName + "/" + modelName);
+
+		WebTarget it = this.wt.path("containers/{kieContainer}/processes/{processModel}/instances")
+								.resolveTemplate("kieContainer", containerName)
+								.resolveTemplate("processModel", modelName);
+
+		Response r = it.request().post(Entity.json(data));
+
+		ManualRhpamResponse rr = new ManualRhpamResponse(r);
+		
+		log.log(Level.INFO, "Got response: " + rr.toString());
+
+		return rr;
+	}
+
+	@POST
+	@Path("/signal/{kieContainer}/{instanceId}/{signalName}")
+	public ManualRhpamResponse signalInstance(@PathParam("kieContainer") String containerName,
+								@PathParam("instanceId") int instanceId,
+								@PathParam("signalName") String signalName,
+								Object data) {
+		log.log(Level.INFO, "Signaling instance " + containerName + "/" + instanceId + " with " + signalName);
+
+		WebTarget it = this.wt.path("containers/{kieContainer}/processes/instances/{instanceId}/signal/{signalName}")
+								.resolveTemplate("kieContainer", containerName)
+								.resolveTemplate("instanceId", instanceId)
+								.resolveTemplate("signalName", signalName);
+
+		Response r = it.request().post(Entity.json(data));
+
+		ManualRhpamResponse rr = new ManualRhpamResponse(r);
+		
+		log.log(Level.INFO, "Got response: " + rr.toString());
+
+		return rr;
+	}
+}

+ 55 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rest_client/ManualRhpamResponse.java

@@ -0,0 +1,55 @@
+package net.p0f.samples.rhpam_fuse_integration.rest_client;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.ws.rs.core.Response;
+
+public class ManualRhpamResponse {
+	private int status;
+	private String statusText;
+	private String responseBody;
+	private String responseBodyType;
+
+	public ManualRhpamResponse(Response r) {
+		this.setStatus(r.getStatus());
+		this.setStatusText(r.getStatusInfo().getReasonPhrase());
+		this.setResponseBodyType(r.getEntity().getClass().getCanonicalName());
+
+		try {
+			this.setResponseBody(new String(((InputStream)r.getEntity()).readAllBytes()));
+		} catch (IOException ioe) {
+			this.setResponseBody("unreadable");
+		} finally {
+			// do something
+		}
+	}
+
+	public int getStatus() {
+		return status;
+	}
+	public void setStatus(int status) {
+		this.status = status;
+	}
+	public String getStatusText() {
+		return statusText;
+	}
+	public void setStatusText(String statusText) {
+		this.statusText = statusText;
+	}
+	public String getResponseBody() {
+		return responseBody;
+	}
+	public void setResponseBody(String responseBody) {
+		this.responseBody = responseBody;
+	}
+	public String getResponseBodyType() {
+		return responseBodyType;
+	}
+	public void setResponseBodyType(String responseBodyType) {
+		this.responseBodyType = responseBodyType;
+	}
+	public String toString() {
+		return "[HTTP/" + this.status + ": " + this.statusText + "]<" + this.responseBodyType + ">: " + this.responseBody;
+	}
+}

+ 65 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rest_client/ProxyInvocationClient.java

@@ -0,0 +1,65 @@
+package net.p0f.samples.rhpam_fuse_integration.rest_client;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.enterprise.context.RequestScoped;
+import javax.inject.Inject;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import net.p0f.samples.rhpam_fuse_integration.cdi.RhpamProxy;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.RhpamEndpoints;
+
+// Same two endpoints as in the other InvocationClients: /start and /signal
+//
+// Exactly the same behaviour, except this time using a RestEasy proxy instead
+// of a manually chauffeured WebTarget or a Swagger-generated client.
+//
+// This does not depend on anything but the RhpamEndpoints interface.
+//
+// Probably best used with the pam-simple-process.StartStopStart process model.
+
+@RequestScoped
+@Path("/proxy")
+@Consumes(MediaType.APPLICATION_JSON)
+@Produces(MediaType.APPLICATION_JSON)
+public class ProxyInvocationClient {
+	private static final Logger log = Logger.getLogger(ProxyInvocationClient.class.getName());
+
+	// This uses a CDI producer in WebTargetProducer, which in turn uses
+	// another producer in ConfigProducer to load rhpam-rest-client.properties
+	// and configure WebTarget with base URL and the Client with auth settings.
+	@Inject
+	@RhpamProxy
+	private RhpamEndpoints re;
+
+	@POST
+	@Path("/start/{kieContainer}/{processModel}")
+	public String startProcess(@PathParam("kieContainer") String containerName,
+								@PathParam("processModel") String modelName,
+								Object data) {
+		log.log(Level.INFO, "Starting a new process from " + containerName + "/" + modelName);
+		
+		String newId = this.re.startProcess(containerName, modelName, data);
+
+		log.log(Level.INFO, "New process ID: " + newId);
+
+		return newId;
+	}
+	
+	@POST
+	@Path("/signal/{kieContainer}/{instanceId}/{signalName}")
+	public void signalInstance(@PathParam("kieContainer") String containerName,
+								@PathParam("instanceId") int instanceId,
+								@PathParam("signalName") String signalName,
+								Object data) {
+		log.log(Level.INFO, "Signaling instance " + containerName + "/" + instanceId + " with " + signalName);
+
+		this.re.signalInstance(containerName, instanceId, signalName, data);
+	}
+}

+ 87 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rest_client/SwaggerInvocationClient.java

@@ -0,0 +1,87 @@
+package net.p0f.samples.rhpam_fuse_integration.rest_client;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.enterprise.context.RequestScoped;
+import javax.inject.Inject;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import net.p0f.samples.rhpam_fuse_integration.cdi.SwaggerClient;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.api.ProcessInstancesApi;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.ApiClient;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.ApiException;
+
+// Same two endpoints as in the other InvocationClients: /start and /signal
+//
+// Exactly the same behaviour, except this time using a Swagger proxy instead
+// of a manually chauffeured WebTarget or a RestEasy proxy.
+//
+// All the code in net.p0f.samples.rhpam_fuse_integration.rhpam was generated
+// from swagger.json (using swagger-codegen-maven-plugin, see pom.xml). Only
+// the minimum number of classes was then added to this project.
+//
+// NOTE: ApiClient had to be modified to add HttpBasicAuth to Authentications.
+//
+// NOTE: ProcessInstancesApi had to be modified to activate basicAuth in all calls.
+//
+// Probably best used with the pam-simple-process.StartStopStart process model.
+
+@RequestScoped
+@Path("/swagger")
+@Consumes(MediaType.APPLICATION_JSON)
+@Produces(MediaType.APPLICATION_JSON)
+public class SwaggerInvocationClient {
+	private static final Logger log = Logger.getLogger(SwaggerInvocationClient.class.getName());
+
+	// This uses a CDI producer in WebTargetProducer, which in turn uses
+	// another producer in ConfigProducer to load rhpam-rest-client.properties
+	// and configure WebTarget with base URL and the Client with auth settings.
+	@Inject
+	@SwaggerClient
+	private ApiClient ac;
+
+	@POST
+	@Path("/start/{kieContainer}/{processModel}")
+	public String startProcess(@PathParam("kieContainer") String containerName,
+								@PathParam("processModel") String modelName,
+								Object data) {
+		log.log(Level.INFO, "Starting a new process from " + containerName + "/" + modelName);
+
+		ProcessInstancesApi pia = new ProcessInstancesApi(ac);
+
+		String newId = null;
+
+		try {
+			newId = pia.startProcess(containerName, modelName, (data != null ? data.toString() : null)).toString();
+		} catch (ApiException ae) {
+			log.log(Level.SEVERE, "API problem while attempting to start process instance.", ae);
+		}
+
+		log.log(Level.INFO, "New process ID: " + newId);
+
+		return newId;
+	}
+	
+	@POST
+	@Path("/signal/{kieContainer}/{instanceId}/{signalName}")
+	public void signalInstance(@PathParam("kieContainer") String containerName,
+								@PathParam("instanceId") int instanceId,
+								@PathParam("signalName") String signalName,
+								Object data) {
+		log.log(Level.INFO, "Signaling instance " + containerName + "/" + instanceId + " with " + signalName);
+
+		ProcessInstancesApi pia = new ProcessInstancesApi(ac);
+
+		try {
+			pia.signalProcessInstance(containerName, Integer.toUnsignedLong(instanceId), signalName, (data != null ? data.toString() : null));
+		} catch (ApiException ae) {
+			log.log(Level.SEVERE, "API problem while attempting to signal process instance.", ae);
+		}
+	}
+}

+ 25 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/RhpamEndpoints.java

@@ -0,0 +1,25 @@
+package net.p0f.samples.rhpam_fuse_integration.rhpam;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+@Consumes(MediaType.APPLICATION_JSON)
+@Produces(MediaType.APPLICATION_JSON)
+public interface RhpamEndpoints {
+	@POST
+	@Path("/containers/{containerId}/processes/{processId}/instances")
+	public String startProcess(@PathParam("containerId") String kieContainer,
+								@PathParam("processId") String processModel,
+								Object data);
+	
+	@POST
+	@Path("/containers/{containerId}/processes/instances/{processInstanceId}/signal/{signalName}")
+	public void signalInstance(@PathParam("containerId") String kieContainer,
+								@PathParam("processInstanceId") int pid,
+								@PathParam("signalName") String signal,
+								Object data);
+}

+ 3769 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/api/ProcessInstancesApi.java

@@ -0,0 +1,3769 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.api;
+
+import net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.ApiCallback;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.ApiClient;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.ApiException;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.ApiResponse;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.Configuration;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.Pair;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.ProgressRequestBody;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.ProgressResponseBody;
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+
+
+import net.p0f.samples.rhpam_fuse_integration.rhpam.model.NodeInstanceList;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.model.ProcessDefinitions;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.model.ProcessInstance;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.model.ProcessInstanceList;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.model.VariableInstanceList;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.model.WorkItemInstance;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.model.WorkItemInstanceList;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+// XXX Due to missing swagger.json authentication info, every single instance of XXX
+// XXX String[] localVarAuthNames = new String[] {  }; must be replaced with     XXX
+// XXX String[] localVarAuthNames = new String[] { "basicAuth" }; matching the   XXX
+// XXX authentication configured in ApiClient. Unfortunately, the same for all   XXX
+// XXX other generated API classes.                                              XXX
+public class ProcessInstancesApi {
+    private ApiClient apiClient;
+
+    public ProcessInstancesApi() {
+        this(Configuration.getDefaultApiClient());
+    }
+
+    public ProcessInstancesApi(ApiClient apiClient) {
+        this.apiClient = apiClient;
+    }
+
+    public ApiClient getApiClient() {
+        return apiClient;
+    }
+
+    public void setApiClient(ApiClient apiClient) {
+        this.apiClient = apiClient;
+    }
+
+    /**
+     * Build call for abortProcessInstance
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance to be aborted (required)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call abortProcessInstanceCall(String containerId, Long processInstanceId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = null;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/instances/{processInstanceId}"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "processInstanceId" + "\\}", apiClient.escapeString(processInstanceId.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call abortProcessInstanceValidateBeforeCall(String containerId, Long processInstanceId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling abortProcessInstance(Async)");
+        }
+        
+        // verify the required parameter 'processInstanceId' is set
+        if (processInstanceId == null) {
+            throw new ApiException("Missing the required parameter 'processInstanceId' when calling abortProcessInstance(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = abortProcessInstanceCall(containerId, processInstanceId, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Aborts a specified process instance in a specified KIE container.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance to be aborted (required)
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public void abortProcessInstance(String containerId, Long processInstanceId) throws ApiException {
+        abortProcessInstanceWithHttpInfo(containerId, processInstanceId);
+    }
+
+    /**
+     * Aborts a specified process instance in a specified KIE container.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance to be aborted (required)
+     * @return ApiResponse&lt;Void&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<Void> abortProcessInstanceWithHttpInfo(String containerId, Long processInstanceId) throws ApiException {
+        com.squareup.okhttp.Call call = abortProcessInstanceValidateBeforeCall(containerId, processInstanceId, null, null);
+        return apiClient.execute(call);
+    }
+
+    /**
+     * Aborts a specified process instance in a specified KIE container. (asynchronously)
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance to be aborted (required)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call abortProcessInstanceAsync(String containerId, Long processInstanceId, final ApiCallback<Void> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = abortProcessInstanceValidateBeforeCall(containerId, processInstanceId, progressListener, progressRequestListener);
+        apiClient.executeAsync(call, callback);
+        return call;
+    }
+    /**
+     * Build call for abortProcessInstances
+     * @param containerId container id that process instance belongs to (required)
+     * @param instanceId list of identifiers of the process instances to be aborted (required)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call abortProcessInstancesCall(String containerId, List<Long> instanceId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = null;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/instances"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+        if (instanceId != null)
+        localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("multi", "instanceId", instanceId));
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call abortProcessInstancesValidateBeforeCall(String containerId, List<Long> instanceId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling abortProcessInstances(Async)");
+        }
+        
+        // verify the required parameter 'instanceId' is set
+        if (instanceId == null) {
+            throw new ApiException("Missing the required parameter 'instanceId' when calling abortProcessInstances(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = abortProcessInstancesCall(containerId, instanceId, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Aborts multiple specified process instances in a specified KIE container.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param instanceId list of identifiers of the process instances to be aborted (required)
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public void abortProcessInstances(String containerId, List<Long> instanceId) throws ApiException {
+        abortProcessInstancesWithHttpInfo(containerId, instanceId);
+    }
+
+    /**
+     * Aborts multiple specified process instances in a specified KIE container.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param instanceId list of identifiers of the process instances to be aborted (required)
+     * @return ApiResponse&lt;Void&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<Void> abortProcessInstancesWithHttpInfo(String containerId, List<Long> instanceId) throws ApiException {
+        com.squareup.okhttp.Call call = abortProcessInstancesValidateBeforeCall(containerId, instanceId, null, null);
+        return apiClient.execute(call);
+    }
+
+    /**
+     * Aborts multiple specified process instances in a specified KIE container. (asynchronously)
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param instanceId list of identifiers of the process instances to be aborted (required)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call abortProcessInstancesAsync(String containerId, List<Long> instanceId, final ApiCallback<Void> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = abortProcessInstancesValidateBeforeCall(containerId, instanceId, progressListener, progressRequestListener);
+        apiClient.executeAsync(call, callback);
+        return call;
+    }
+    /**
+     * Build call for abortWorkItem
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that work item belongs to (required)
+     * @param workItemId identifier of the work item to abort (required)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call abortWorkItemCall(String containerId, Long processInstanceId, Long workItemId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = null;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/instances/{processInstanceId}/workitems/{workItemId}/aborted"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "processInstanceId" + "\\}", apiClient.escapeString(processInstanceId.toString()))
+            .replaceAll("\\{" + "workItemId" + "\\}", apiClient.escapeString(workItemId.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call abortWorkItemValidateBeforeCall(String containerId, Long processInstanceId, Long workItemId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling abortWorkItem(Async)");
+        }
+        
+        // verify the required parameter 'processInstanceId' is set
+        if (processInstanceId == null) {
+            throw new ApiException("Missing the required parameter 'processInstanceId' when calling abortWorkItem(Async)");
+        }
+        
+        // verify the required parameter 'workItemId' is set
+        if (workItemId == null) {
+            throw new ApiException("Missing the required parameter 'workItemId' when calling abortWorkItem(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = abortWorkItemCall(containerId, processInstanceId, workItemId, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Aborts a specified work item for a specified process instance.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that work item belongs to (required)
+     * @param workItemId identifier of the work item to abort (required)
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public void abortWorkItem(String containerId, Long processInstanceId, Long workItemId) throws ApiException {
+        abortWorkItemWithHttpInfo(containerId, processInstanceId, workItemId);
+    }
+
+    /**
+     * Aborts a specified work item for a specified process instance.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that work item belongs to (required)
+     * @param workItemId identifier of the work item to abort (required)
+     * @return ApiResponse&lt;Void&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<Void> abortWorkItemWithHttpInfo(String containerId, Long processInstanceId, Long workItemId) throws ApiException {
+        com.squareup.okhttp.Call call = abortWorkItemValidateBeforeCall(containerId, processInstanceId, workItemId, null, null);
+        return apiClient.execute(call);
+    }
+
+    /**
+     * Aborts a specified work item for a specified process instance. (asynchronously)
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that work item belongs to (required)
+     * @param workItemId identifier of the work item to abort (required)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call abortWorkItemAsync(String containerId, Long processInstanceId, Long workItemId, final ApiCallback<Void> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = abortWorkItemValidateBeforeCall(containerId, processInstanceId, workItemId, progressListener, progressRequestListener);
+        apiClient.executeAsync(call, callback);
+        return call;
+    }
+    /**
+     * Build call for completeWorkItem
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that work item belongs to (required)
+     * @param workItemId identifier of the work item to complete (required)
+     * @param body optional outcome data give as map (optional)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call completeWorkItemCall(String containerId, Long processInstanceId, Long workItemId, String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = body;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/instances/{processInstanceId}/workitems/{workItemId}/completed"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "processInstanceId" + "\\}", apiClient.escapeString(processInstanceId.toString()))
+            .replaceAll("\\{" + "workItemId" + "\\}", apiClient.escapeString(workItemId.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            "application/json", "application/xml"
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call completeWorkItemValidateBeforeCall(String containerId, Long processInstanceId, Long workItemId, String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling completeWorkItem(Async)");
+        }
+        
+        // verify the required parameter 'processInstanceId' is set
+        if (processInstanceId == null) {
+            throw new ApiException("Missing the required parameter 'processInstanceId' when calling completeWorkItem(Async)");
+        }
+        
+        // verify the required parameter 'workItemId' is set
+        if (workItemId == null) {
+            throw new ApiException("Missing the required parameter 'workItemId' when calling completeWorkItem(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = completeWorkItemCall(containerId, processInstanceId, workItemId, body, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Completes a specified work item for a specified process instance.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that work item belongs to (required)
+     * @param workItemId identifier of the work item to complete (required)
+     * @param body optional outcome data give as map (optional)
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public void completeWorkItem(String containerId, Long processInstanceId, Long workItemId, String body) throws ApiException {
+        completeWorkItemWithHttpInfo(containerId, processInstanceId, workItemId, body);
+    }
+
+    /**
+     * Completes a specified work item for a specified process instance.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that work item belongs to (required)
+     * @param workItemId identifier of the work item to complete (required)
+     * @param body optional outcome data give as map (optional)
+     * @return ApiResponse&lt;Void&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<Void> completeWorkItemWithHttpInfo(String containerId, Long processInstanceId, Long workItemId, String body) throws ApiException {
+        com.squareup.okhttp.Call call = completeWorkItemValidateBeforeCall(containerId, processInstanceId, workItemId, body, null, null);
+        return apiClient.execute(call);
+    }
+
+    /**
+     * Completes a specified work item for a specified process instance. (asynchronously)
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that work item belongs to (required)
+     * @param workItemId identifier of the work item to complete (required)
+     * @param body optional outcome data give as map (optional)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call completeWorkItemAsync(String containerId, Long processInstanceId, Long workItemId, String body, final ApiCallback<Void> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = completeWorkItemValidateBeforeCall(containerId, processInstanceId, workItemId, body, progressListener, progressRequestListener);
+        apiClient.executeAsync(call, callback);
+        return call;
+    }
+    /**
+     * Build call for getAvailableSignals
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that signals should be collected for (required)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call getAvailableSignalsCall(String containerId, Long processInstanceId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = null;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/instances/{processInstanceId}/signals"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "processInstanceId" + "\\}", apiClient.escapeString(processInstanceId.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call getAvailableSignalsValidateBeforeCall(String containerId, Long processInstanceId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling getAvailableSignals(Async)");
+        }
+        
+        // verify the required parameter 'processInstanceId' is set
+        if (processInstanceId == null) {
+            throw new ApiException("Missing the required parameter 'processInstanceId' when calling getAvailableSignals(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = getAvailableSignalsCall(containerId, processInstanceId, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Returns all available signal names for a specified process instance.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that signals should be collected for (required)
+     * @return List&lt;String&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public List<String> getAvailableSignals(String containerId, Long processInstanceId) throws ApiException {
+        ApiResponse<List<String>> resp = getAvailableSignalsWithHttpInfo(containerId, processInstanceId);
+        return resp.getData();
+    }
+
+    /**
+     * Returns all available signal names for a specified process instance.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that signals should be collected for (required)
+     * @return ApiResponse&lt;List&lt;String&gt;&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<List<String>> getAvailableSignalsWithHttpInfo(String containerId, Long processInstanceId) throws ApiException {
+        com.squareup.okhttp.Call call = getAvailableSignalsValidateBeforeCall(containerId, processInstanceId, null, null);
+        Type localVarReturnType = new TypeToken<List<String>>(){}.getType();
+        return apiClient.execute(call, localVarReturnType);
+    }
+
+    /**
+     * Returns all available signal names for a specified process instance. (asynchronously)
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that signals should be collected for (required)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call getAvailableSignalsAsync(String containerId, Long processInstanceId, final ApiCallback<List<String>> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = getAvailableSignalsValidateBeforeCall(containerId, processInstanceId, progressListener, progressRequestListener);
+        Type localVarReturnType = new TypeToken<List<String>>(){}.getType();
+        apiClient.executeAsync(call, localVarReturnType, callback);
+        return call;
+    }
+    /**
+     * Build call for getProcessInstance
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance to be fetched (required)
+     * @param withVars indicates if process instance variables should be loaded or not (optional)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call getProcessInstanceCall(String containerId, Long processInstanceId, Boolean withVars, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = null;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/instances/{processInstanceId}"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "processInstanceId" + "\\}", apiClient.escapeString(processInstanceId.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+        if (withVars != null)
+        localVarQueryParams.addAll(apiClient.parameterToPair("withVars", withVars));
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call getProcessInstanceValidateBeforeCall(String containerId, Long processInstanceId, Boolean withVars, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling getProcessInstance(Async)");
+        }
+        
+        // verify the required parameter 'processInstanceId' is set
+        if (processInstanceId == null) {
+            throw new ApiException("Missing the required parameter 'processInstanceId' when calling getProcessInstance(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = getProcessInstanceCall(containerId, processInstanceId, withVars, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Returns information about a specified process instance in a specified KIE container.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance to be fetched (required)
+     * @param withVars indicates if process instance variables should be loaded or not (optional)
+     * @return ProcessInstance
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ProcessInstance getProcessInstance(String containerId, Long processInstanceId, Boolean withVars) throws ApiException {
+        ApiResponse<ProcessInstance> resp = getProcessInstanceWithHttpInfo(containerId, processInstanceId, withVars);
+        return resp.getData();
+    }
+
+    /**
+     * Returns information about a specified process instance in a specified KIE container.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance to be fetched (required)
+     * @param withVars indicates if process instance variables should be loaded or not (optional)
+     * @return ApiResponse&lt;ProcessInstance&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<ProcessInstance> getProcessInstanceWithHttpInfo(String containerId, Long processInstanceId, Boolean withVars) throws ApiException {
+        com.squareup.okhttp.Call call = getProcessInstanceValidateBeforeCall(containerId, processInstanceId, withVars, null, null);
+        Type localVarReturnType = new TypeToken<ProcessInstance>(){}.getType();
+        return apiClient.execute(call, localVarReturnType);
+    }
+
+    /**
+     * Returns information about a specified process instance in a specified KIE container. (asynchronously)
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance to be fetched (required)
+     * @param withVars indicates if process instance variables should be loaded or not (optional)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call getProcessInstanceAsync(String containerId, Long processInstanceId, Boolean withVars, final ApiCallback<ProcessInstance> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = getProcessInstanceValidateBeforeCall(containerId, processInstanceId, withVars, progressListener, progressRequestListener);
+        Type localVarReturnType = new TypeToken<ProcessInstance>(){}.getType();
+        apiClient.executeAsync(call, localVarReturnType, callback);
+        return call;
+    }
+    /**
+     * Build call for getProcessInstanceHistory
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that history should be collected for (required)
+     * @param activeOnly instructs if active nodes only should be collected, defaults to false (optional)
+     * @param completedOnly instructs if completed nodes only should be collected, defaults to false (optional)
+     * @param processInstanceHistoryType entry type from the history (optional)
+     * @param page optional pagination - at which page to start, defaults to 0 (meaning first) (optional, default to 0)
+     * @param pageSize optional pagination - size of the result, defaults to 10 (optional, default to 10)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call getProcessInstanceHistoryCall(String containerId, Long processInstanceId, Boolean activeOnly, Boolean completedOnly, String processInstanceHistoryType, Integer page, Integer pageSize, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = null;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/instances/{processInstanceId}/nodes/instances"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "processInstanceId" + "\\}", apiClient.escapeString(processInstanceId.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+        if (activeOnly != null)
+        localVarQueryParams.addAll(apiClient.parameterToPair("activeOnly", activeOnly));
+        if (completedOnly != null)
+        localVarQueryParams.addAll(apiClient.parameterToPair("completedOnly", completedOnly));
+        if (processInstanceHistoryType != null)
+        localVarQueryParams.addAll(apiClient.parameterToPair("processInstanceHistoryType", processInstanceHistoryType));
+        if (page != null)
+        localVarQueryParams.addAll(apiClient.parameterToPair("page", page));
+        if (pageSize != null)
+        localVarQueryParams.addAll(apiClient.parameterToPair("pageSize", pageSize));
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call getProcessInstanceHistoryValidateBeforeCall(String containerId, Long processInstanceId, Boolean activeOnly, Boolean completedOnly, String processInstanceHistoryType, Integer page, Integer pageSize, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling getProcessInstanceHistory(Async)");
+        }
+        
+        // verify the required parameter 'processInstanceId' is set
+        if (processInstanceId == null) {
+            throw new ApiException("Missing the required parameter 'processInstanceId' when calling getProcessInstanceHistory(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = getProcessInstanceHistoryCall(containerId, processInstanceId, activeOnly, completedOnly, processInstanceHistoryType, page, pageSize, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Returns node instances for the specified process instance.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that history should be collected for (required)
+     * @param activeOnly instructs if active nodes only should be collected, defaults to false (optional)
+     * @param completedOnly instructs if completed nodes only should be collected, defaults to false (optional)
+     * @param processInstanceHistoryType entry type from the history (optional)
+     * @param page optional pagination - at which page to start, defaults to 0 (meaning first) (optional, default to 0)
+     * @param pageSize optional pagination - size of the result, defaults to 10 (optional, default to 10)
+     * @return NodeInstanceList
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public NodeInstanceList getProcessInstanceHistory(String containerId, Long processInstanceId, Boolean activeOnly, Boolean completedOnly, String processInstanceHistoryType, Integer page, Integer pageSize) throws ApiException {
+        ApiResponse<NodeInstanceList> resp = getProcessInstanceHistoryWithHttpInfo(containerId, processInstanceId, activeOnly, completedOnly, processInstanceHistoryType, page, pageSize);
+        return resp.getData();
+    }
+
+    /**
+     * Returns node instances for the specified process instance.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that history should be collected for (required)
+     * @param activeOnly instructs if active nodes only should be collected, defaults to false (optional)
+     * @param completedOnly instructs if completed nodes only should be collected, defaults to false (optional)
+     * @param processInstanceHistoryType entry type from the history (optional)
+     * @param page optional pagination - at which page to start, defaults to 0 (meaning first) (optional, default to 0)
+     * @param pageSize optional pagination - size of the result, defaults to 10 (optional, default to 10)
+     * @return ApiResponse&lt;NodeInstanceList&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<NodeInstanceList> getProcessInstanceHistoryWithHttpInfo(String containerId, Long processInstanceId, Boolean activeOnly, Boolean completedOnly, String processInstanceHistoryType, Integer page, Integer pageSize) throws ApiException {
+        com.squareup.okhttp.Call call = getProcessInstanceHistoryValidateBeforeCall(containerId, processInstanceId, activeOnly, completedOnly, processInstanceHistoryType, page, pageSize, null, null);
+        Type localVarReturnType = new TypeToken<NodeInstanceList>(){}.getType();
+        return apiClient.execute(call, localVarReturnType);
+    }
+
+    /**
+     * Returns node instances for the specified process instance. (asynchronously)
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that history should be collected for (required)
+     * @param activeOnly instructs if active nodes only should be collected, defaults to false (optional)
+     * @param completedOnly instructs if completed nodes only should be collected, defaults to false (optional)
+     * @param processInstanceHistoryType entry type from the history (optional)
+     * @param page optional pagination - at which page to start, defaults to 0 (meaning first) (optional, default to 0)
+     * @param pageSize optional pagination - size of the result, defaults to 10 (optional, default to 10)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call getProcessInstanceHistoryAsync(String containerId, Long processInstanceId, Boolean activeOnly, Boolean completedOnly, String processInstanceHistoryType, Integer page, Integer pageSize, final ApiCallback<NodeInstanceList> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = getProcessInstanceHistoryValidateBeforeCall(containerId, processInstanceId, activeOnly, completedOnly, processInstanceHistoryType, page, pageSize, progressListener, progressRequestListener);
+        Type localVarReturnType = new TypeToken<NodeInstanceList>(){}.getType();
+        apiClient.executeAsync(call, localVarReturnType, callback);
+        return call;
+    }
+    /**
+     * Build call for getProcessInstanceVariable
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that variable should be retrieved from (required)
+     * @param varName variable name to be retrieved (required)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call getProcessInstanceVariableCall(String containerId, Long processInstanceId, String varName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = null;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/instances/{processInstanceId}/variable/{varName}"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "processInstanceId" + "\\}", apiClient.escapeString(processInstanceId.toString()))
+            .replaceAll("\\{" + "varName" + "\\}", apiClient.escapeString(varName.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call getProcessInstanceVariableValidateBeforeCall(String containerId, Long processInstanceId, String varName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling getProcessInstanceVariable(Async)");
+        }
+        
+        // verify the required parameter 'processInstanceId' is set
+        if (processInstanceId == null) {
+            throw new ApiException("Missing the required parameter 'processInstanceId' when calling getProcessInstanceVariable(Async)");
+        }
+        
+        // verify the required parameter 'varName' is set
+        if (varName == null) {
+            throw new ApiException("Missing the required parameter 'varName' when calling getProcessInstanceVariable(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = getProcessInstanceVariableCall(containerId, processInstanceId, varName, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Returns the value of a specified variable in a specified process instance.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that variable should be retrieved from (required)
+     * @param varName variable name to be retrieved (required)
+     * @return Object
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public Object getProcessInstanceVariable(String containerId, Long processInstanceId, String varName) throws ApiException {
+        ApiResponse<Object> resp = getProcessInstanceVariableWithHttpInfo(containerId, processInstanceId, varName);
+        return resp.getData();
+    }
+
+    /**
+     * Returns the value of a specified variable in a specified process instance.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that variable should be retrieved from (required)
+     * @param varName variable name to be retrieved (required)
+     * @return ApiResponse&lt;Object&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<Object> getProcessInstanceVariableWithHttpInfo(String containerId, Long processInstanceId, String varName) throws ApiException {
+        com.squareup.okhttp.Call call = getProcessInstanceVariableValidateBeforeCall(containerId, processInstanceId, varName, null, null);
+        Type localVarReturnType = new TypeToken<Object>(){}.getType();
+        return apiClient.execute(call, localVarReturnType);
+    }
+
+    /**
+     * Returns the value of a specified variable in a specified process instance. (asynchronously)
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that variable should be retrieved from (required)
+     * @param varName variable name to be retrieved (required)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call getProcessInstanceVariableAsync(String containerId, Long processInstanceId, String varName, final ApiCallback<Object> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = getProcessInstanceVariableValidateBeforeCall(containerId, processInstanceId, varName, progressListener, progressRequestListener);
+        Type localVarReturnType = new TypeToken<Object>(){}.getType();
+        apiClient.executeAsync(call, localVarReturnType, callback);
+        return call;
+    }
+    /**
+     * Build call for getProcessInstanceVariables
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that variables should be retrieved from (required)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call getProcessInstanceVariablesCall(String containerId, Long processInstanceId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = null;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/instances/{processInstanceId}/variables"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "processInstanceId" + "\\}", apiClient.escapeString(processInstanceId.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call getProcessInstanceVariablesValidateBeforeCall(String containerId, Long processInstanceId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling getProcessInstanceVariables(Async)");
+        }
+        
+        // verify the required parameter 'processInstanceId' is set
+        if (processInstanceId == null) {
+            throw new ApiException("Missing the required parameter 'processInstanceId' when calling getProcessInstanceVariables(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = getProcessInstanceVariablesCall(containerId, processInstanceId, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Retrieves all variables for a specified process instance as a map in which the key is the variable name and the value is the variable value.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that variables should be retrieved from (required)
+     * @return Map&lt;String, Object&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public Map<String, Object> getProcessInstanceVariables(String containerId, Long processInstanceId) throws ApiException {
+        ApiResponse<Map<String, Object>> resp = getProcessInstanceVariablesWithHttpInfo(containerId, processInstanceId);
+        return resp.getData();
+    }
+
+    /**
+     * Retrieves all variables for a specified process instance as a map in which the key is the variable name and the value is the variable value.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that variables should be retrieved from (required)
+     * @return ApiResponse&lt;Map&lt;String, Object&gt;&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<Map<String, Object>> getProcessInstanceVariablesWithHttpInfo(String containerId, Long processInstanceId) throws ApiException {
+        com.squareup.okhttp.Call call = getProcessInstanceVariablesValidateBeforeCall(containerId, processInstanceId, null, null);
+        Type localVarReturnType = new TypeToken<Map<String, Object>>(){}.getType();
+        return apiClient.execute(call, localVarReturnType);
+    }
+
+    /**
+     * Retrieves all variables for a specified process instance as a map in which the key is the variable name and the value is the variable value. (asynchronously)
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that variables should be retrieved from (required)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call getProcessInstanceVariablesAsync(String containerId, Long processInstanceId, final ApiCallback<Map<String, Object>> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = getProcessInstanceVariablesValidateBeforeCall(containerId, processInstanceId, progressListener, progressRequestListener);
+        Type localVarReturnType = new TypeToken<Map<String, Object>>(){}.getType();
+        apiClient.executeAsync(call, localVarReturnType, callback);
+        return call;
+    }
+    /**
+     * Build call for getProcessInstances
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the parent process instance that process instances should be collected for (required)
+     * @param status optional process instance status (active, completed, aborted) - defaults ot active (1) only (optional)
+     * @param page optional pagination - at which page to start, defaults to 0 (meaning first) (optional, default to 0)
+     * @param pageSize optional pagination - size of the result, defaults to 10 (optional, default to 10)
+     * @param sort optional sort column, no default (optional)
+     * @param sortOrder optional sort direction (asc, desc) - defaults to asc (optional, default to true)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call getProcessInstancesCall(String containerId, Long processInstanceId, List<Integer> status, Integer page, Integer pageSize, String sort, Boolean sortOrder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = null;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/instances/{processInstanceId}/processes"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "processInstanceId" + "\\}", apiClient.escapeString(processInstanceId.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+        if (status != null)
+        localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("multi", "status", status));
+        if (page != null)
+        localVarQueryParams.addAll(apiClient.parameterToPair("page", page));
+        if (pageSize != null)
+        localVarQueryParams.addAll(apiClient.parameterToPair("pageSize", pageSize));
+        if (sort != null)
+        localVarQueryParams.addAll(apiClient.parameterToPair("sort", sort));
+        if (sortOrder != null)
+        localVarQueryParams.addAll(apiClient.parameterToPair("sortOrder", sortOrder));
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call getProcessInstancesValidateBeforeCall(String containerId, Long processInstanceId, List<Integer> status, Integer page, Integer pageSize, String sort, Boolean sortOrder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling getProcessInstances(Async)");
+        }
+        
+        // verify the required parameter 'processInstanceId' is set
+        if (processInstanceId == null) {
+            throw new ApiException("Missing the required parameter 'processInstanceId' when calling getProcessInstances(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = getProcessInstancesCall(containerId, processInstanceId, status, page, pageSize, sort, sortOrder, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Returns a list of process instances for which a specified process instance is a parent process instance
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the parent process instance that process instances should be collected for (required)
+     * @param status optional process instance status (active, completed, aborted) - defaults ot active (1) only (optional)
+     * @param page optional pagination - at which page to start, defaults to 0 (meaning first) (optional, default to 0)
+     * @param pageSize optional pagination - size of the result, defaults to 10 (optional, default to 10)
+     * @param sort optional sort column, no default (optional)
+     * @param sortOrder optional sort direction (asc, desc) - defaults to asc (optional, default to true)
+     * @return ProcessInstanceList
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ProcessInstanceList getProcessInstances(String containerId, Long processInstanceId, List<Integer> status, Integer page, Integer pageSize, String sort, Boolean sortOrder) throws ApiException {
+        ApiResponse<ProcessInstanceList> resp = getProcessInstancesWithHttpInfo(containerId, processInstanceId, status, page, pageSize, sort, sortOrder);
+        return resp.getData();
+    }
+
+    /**
+     * Returns a list of process instances for which a specified process instance is a parent process instance
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the parent process instance that process instances should be collected for (required)
+     * @param status optional process instance status (active, completed, aborted) - defaults ot active (1) only (optional)
+     * @param page optional pagination - at which page to start, defaults to 0 (meaning first) (optional, default to 0)
+     * @param pageSize optional pagination - size of the result, defaults to 10 (optional, default to 10)
+     * @param sort optional sort column, no default (optional)
+     * @param sortOrder optional sort direction (asc, desc) - defaults to asc (optional, default to true)
+     * @return ApiResponse&lt;ProcessInstanceList&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<ProcessInstanceList> getProcessInstancesWithHttpInfo(String containerId, Long processInstanceId, List<Integer> status, Integer page, Integer pageSize, String sort, Boolean sortOrder) throws ApiException {
+        com.squareup.okhttp.Call call = getProcessInstancesValidateBeforeCall(containerId, processInstanceId, status, page, pageSize, sort, sortOrder, null, null);
+        Type localVarReturnType = new TypeToken<ProcessInstanceList>(){}.getType();
+        return apiClient.execute(call, localVarReturnType);
+    }
+
+    /**
+     * Returns a list of process instances for which a specified process instance is a parent process instance (asynchronously)
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the parent process instance that process instances should be collected for (required)
+     * @param status optional process instance status (active, completed, aborted) - defaults ot active (1) only (optional)
+     * @param page optional pagination - at which page to start, defaults to 0 (meaning first) (optional, default to 0)
+     * @param pageSize optional pagination - size of the result, defaults to 10 (optional, default to 10)
+     * @param sort optional sort column, no default (optional)
+     * @param sortOrder optional sort direction (asc, desc) - defaults to asc (optional, default to true)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call getProcessInstancesAsync(String containerId, Long processInstanceId, List<Integer> status, Integer page, Integer pageSize, String sort, Boolean sortOrder, final ApiCallback<ProcessInstanceList> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = getProcessInstancesValidateBeforeCall(containerId, processInstanceId, status, page, pageSize, sort, sortOrder, progressListener, progressRequestListener);
+        Type localVarReturnType = new TypeToken<ProcessInstanceList>(){}.getType();
+        apiClient.executeAsync(call, localVarReturnType, callback);
+        return call;
+    }
+    /**
+     * Build call for getProcessInstancesByDeploymentId
+     * @param containerId container id that process instance belongs to (required)
+     * @param status optional process instance status (active, completed, aborted) - defaults ot active (1) only (optional)
+     * @param page optional pagination - at which page to start, defaults to 0 (meaning first) (optional, default to 0)
+     * @param pageSize optional pagination - size of the result, defaults to 10 (optional, default to 10)
+     * @param sort optional sort column, no default (optional)
+     * @param sortOrder optional sort direction (asc, desc) - defaults to asc (optional, default to true)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call getProcessInstancesByDeploymentIdCall(String containerId, List<Integer> status, Integer page, Integer pageSize, String sort, Boolean sortOrder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = null;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/instances"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+        if (status != null)
+        localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("multi", "status", status));
+        if (page != null)
+        localVarQueryParams.addAll(apiClient.parameterToPair("page", page));
+        if (pageSize != null)
+        localVarQueryParams.addAll(apiClient.parameterToPair("pageSize", pageSize));
+        if (sort != null)
+        localVarQueryParams.addAll(apiClient.parameterToPair("sort", sort));
+        if (sortOrder != null)
+        localVarQueryParams.addAll(apiClient.parameterToPair("sortOrder", sortOrder));
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call getProcessInstancesByDeploymentIdValidateBeforeCall(String containerId, List<Integer> status, Integer page, Integer pageSize, String sort, Boolean sortOrder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling getProcessInstancesByDeploymentId(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = getProcessInstancesByDeploymentIdCall(containerId, status, page, pageSize, sort, sortOrder, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Returns a list of process instances in a specified KIE container.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param status optional process instance status (active, completed, aborted) - defaults ot active (1) only (optional)
+     * @param page optional pagination - at which page to start, defaults to 0 (meaning first) (optional, default to 0)
+     * @param pageSize optional pagination - size of the result, defaults to 10 (optional, default to 10)
+     * @param sort optional sort column, no default (optional)
+     * @param sortOrder optional sort direction (asc, desc) - defaults to asc (optional, default to true)
+     * @return ProcessInstanceList
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ProcessInstanceList getProcessInstancesByDeploymentId(String containerId, List<Integer> status, Integer page, Integer pageSize, String sort, Boolean sortOrder) throws ApiException {
+        ApiResponse<ProcessInstanceList> resp = getProcessInstancesByDeploymentIdWithHttpInfo(containerId, status, page, pageSize, sort, sortOrder);
+        return resp.getData();
+    }
+
+    /**
+     * Returns a list of process instances in a specified KIE container.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param status optional process instance status (active, completed, aborted) - defaults ot active (1) only (optional)
+     * @param page optional pagination - at which page to start, defaults to 0 (meaning first) (optional, default to 0)
+     * @param pageSize optional pagination - size of the result, defaults to 10 (optional, default to 10)
+     * @param sort optional sort column, no default (optional)
+     * @param sortOrder optional sort direction (asc, desc) - defaults to asc (optional, default to true)
+     * @return ApiResponse&lt;ProcessInstanceList&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<ProcessInstanceList> getProcessInstancesByDeploymentIdWithHttpInfo(String containerId, List<Integer> status, Integer page, Integer pageSize, String sort, Boolean sortOrder) throws ApiException {
+        com.squareup.okhttp.Call call = getProcessInstancesByDeploymentIdValidateBeforeCall(containerId, status, page, pageSize, sort, sortOrder, null, null);
+        Type localVarReturnType = new TypeToken<ProcessInstanceList>(){}.getType();
+        return apiClient.execute(call, localVarReturnType);
+    }
+
+    /**
+     * Returns a list of process instances in a specified KIE container. (asynchronously)
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param status optional process instance status (active, completed, aborted) - defaults ot active (1) only (optional)
+     * @param page optional pagination - at which page to start, defaults to 0 (meaning first) (optional, default to 0)
+     * @param pageSize optional pagination - size of the result, defaults to 10 (optional, default to 10)
+     * @param sort optional sort column, no default (optional)
+     * @param sortOrder optional sort direction (asc, desc) - defaults to asc (optional, default to true)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call getProcessInstancesByDeploymentIdAsync(String containerId, List<Integer> status, Integer page, Integer pageSize, String sort, Boolean sortOrder, final ApiCallback<ProcessInstanceList> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = getProcessInstancesByDeploymentIdValidateBeforeCall(containerId, status, page, pageSize, sort, sortOrder, progressListener, progressRequestListener);
+        Type localVarReturnType = new TypeToken<ProcessInstanceList>(){}.getType();
+        apiClient.executeAsync(call, localVarReturnType, callback);
+        return call;
+    }
+    /**
+     * Build call for getProcessesByDeploymentId
+     * @param containerId container id that process instance belongs to (required)
+     * @param page optional pagination - at which page to start, defaults to 0 (meaning first) (optional, default to 0)
+     * @param pageSize optional pagination - size of the result, defaults to 10 (optional, default to 10)
+     * @param sort optional sort column, no default (optional)
+     * @param sortOrder optional sort direction (asc, desc) - defaults to asc (optional, default to true)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call getProcessesByDeploymentIdCall(String containerId, Integer page, Integer pageSize, String sort, Boolean sortOrder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = null;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+        if (page != null)
+        localVarQueryParams.addAll(apiClient.parameterToPair("page", page));
+        if (pageSize != null)
+        localVarQueryParams.addAll(apiClient.parameterToPair("pageSize", pageSize));
+        if (sort != null)
+        localVarQueryParams.addAll(apiClient.parameterToPair("sort", sort));
+        if (sortOrder != null)
+        localVarQueryParams.addAll(apiClient.parameterToPair("sortOrder", sortOrder));
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call getProcessesByDeploymentIdValidateBeforeCall(String containerId, Integer page, Integer pageSize, String sort, Boolean sortOrder, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling getProcessesByDeploymentId(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = getProcessesByDeploymentIdCall(containerId, page, pageSize, sort, sortOrder, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Returns a list of process definitions in a specified KIE container.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param page optional pagination - at which page to start, defaults to 0 (meaning first) (optional, default to 0)
+     * @param pageSize optional pagination - size of the result, defaults to 10 (optional, default to 10)
+     * @param sort optional sort column, no default (optional)
+     * @param sortOrder optional sort direction (asc, desc) - defaults to asc (optional, default to true)
+     * @return ProcessDefinitions
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ProcessDefinitions getProcessesByDeploymentId(String containerId, Integer page, Integer pageSize, String sort, Boolean sortOrder) throws ApiException {
+        ApiResponse<ProcessDefinitions> resp = getProcessesByDeploymentIdWithHttpInfo(containerId, page, pageSize, sort, sortOrder);
+        return resp.getData();
+    }
+
+    /**
+     * Returns a list of process definitions in a specified KIE container.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param page optional pagination - at which page to start, defaults to 0 (meaning first) (optional, default to 0)
+     * @param pageSize optional pagination - size of the result, defaults to 10 (optional, default to 10)
+     * @param sort optional sort column, no default (optional)
+     * @param sortOrder optional sort direction (asc, desc) - defaults to asc (optional, default to true)
+     * @return ApiResponse&lt;ProcessDefinitions&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<ProcessDefinitions> getProcessesByDeploymentIdWithHttpInfo(String containerId, Integer page, Integer pageSize, String sort, Boolean sortOrder) throws ApiException {
+        com.squareup.okhttp.Call call = getProcessesByDeploymentIdValidateBeforeCall(containerId, page, pageSize, sort, sortOrder, null, null);
+        Type localVarReturnType = new TypeToken<ProcessDefinitions>(){}.getType();
+        return apiClient.execute(call, localVarReturnType);
+    }
+
+    /**
+     * Returns a list of process definitions in a specified KIE container. (asynchronously)
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param page optional pagination - at which page to start, defaults to 0 (meaning first) (optional, default to 0)
+     * @param pageSize optional pagination - size of the result, defaults to 10 (optional, default to 10)
+     * @param sort optional sort column, no default (optional)
+     * @param sortOrder optional sort direction (asc, desc) - defaults to asc (optional, default to true)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call getProcessesByDeploymentIdAsync(String containerId, Integer page, Integer pageSize, String sort, Boolean sortOrder, final ApiCallback<ProcessDefinitions> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = getProcessesByDeploymentIdValidateBeforeCall(containerId, page, pageSize, sort, sortOrder, progressListener, progressRequestListener);
+        Type localVarReturnType = new TypeToken<ProcessDefinitions>(){}.getType();
+        apiClient.executeAsync(call, localVarReturnType, callback);
+        return call;
+    }
+    /**
+     * Build call for getVariableHistory
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that variable history should be collected for (required)
+     * @param varName name of the variables that history should be collected for (required)
+     * @param page optional pagination - at which page to start, defaults to 0 (meaning first) (optional, default to 0)
+     * @param pageSize optional pagination - size of the result, defaults to 10 (optional, default to 10)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call getVariableHistoryCall(String containerId, Long processInstanceId, String varName, Integer page, Integer pageSize, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = null;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/instances/{processInstanceId}/variables/instances/{varName}"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "processInstanceId" + "\\}", apiClient.escapeString(processInstanceId.toString()))
+            .replaceAll("\\{" + "varName" + "\\}", apiClient.escapeString(varName.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+        if (page != null)
+        localVarQueryParams.addAll(apiClient.parameterToPair("page", page));
+        if (pageSize != null)
+        localVarQueryParams.addAll(apiClient.parameterToPair("pageSize", pageSize));
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call getVariableHistoryValidateBeforeCall(String containerId, Long processInstanceId, String varName, Integer page, Integer pageSize, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling getVariableHistory(Async)");
+        }
+        
+        // verify the required parameter 'processInstanceId' is set
+        if (processInstanceId == null) {
+            throw new ApiException("Missing the required parameter 'processInstanceId' when calling getVariableHistory(Async)");
+        }
+        
+        // verify the required parameter 'varName' is set
+        if (varName == null) {
+            throw new ApiException("Missing the required parameter 'varName' when calling getVariableHistory(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = getVariableHistoryCall(containerId, processInstanceId, varName, page, pageSize, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Returns the history of a specified variable in a specified process instance.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that variable history should be collected for (required)
+     * @param varName name of the variables that history should be collected for (required)
+     * @param page optional pagination - at which page to start, defaults to 0 (meaning first) (optional, default to 0)
+     * @param pageSize optional pagination - size of the result, defaults to 10 (optional, default to 10)
+     * @return VariableInstanceList
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public VariableInstanceList getVariableHistory(String containerId, Long processInstanceId, String varName, Integer page, Integer pageSize) throws ApiException {
+        ApiResponse<VariableInstanceList> resp = getVariableHistoryWithHttpInfo(containerId, processInstanceId, varName, page, pageSize);
+        return resp.getData();
+    }
+
+    /**
+     * Returns the history of a specified variable in a specified process instance.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that variable history should be collected for (required)
+     * @param varName name of the variables that history should be collected for (required)
+     * @param page optional pagination - at which page to start, defaults to 0 (meaning first) (optional, default to 0)
+     * @param pageSize optional pagination - size of the result, defaults to 10 (optional, default to 10)
+     * @return ApiResponse&lt;VariableInstanceList&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<VariableInstanceList> getVariableHistoryWithHttpInfo(String containerId, Long processInstanceId, String varName, Integer page, Integer pageSize) throws ApiException {
+        com.squareup.okhttp.Call call = getVariableHistoryValidateBeforeCall(containerId, processInstanceId, varName, page, pageSize, null, null);
+        Type localVarReturnType = new TypeToken<VariableInstanceList>(){}.getType();
+        return apiClient.execute(call, localVarReturnType);
+    }
+
+    /**
+     * Returns the history of a specified variable in a specified process instance. (asynchronously)
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that variable history should be collected for (required)
+     * @param varName name of the variables that history should be collected for (required)
+     * @param page optional pagination - at which page to start, defaults to 0 (meaning first) (optional, default to 0)
+     * @param pageSize optional pagination - size of the result, defaults to 10 (optional, default to 10)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call getVariableHistoryAsync(String containerId, Long processInstanceId, String varName, Integer page, Integer pageSize, final ApiCallback<VariableInstanceList> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = getVariableHistoryValidateBeforeCall(containerId, processInstanceId, varName, page, pageSize, progressListener, progressRequestListener);
+        Type localVarReturnType = new TypeToken<VariableInstanceList>(){}.getType();
+        apiClient.executeAsync(call, localVarReturnType, callback);
+        return call;
+    }
+    /**
+     * Build call for getVariablesCurrentState
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that variables state should be collected for (required)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call getVariablesCurrentStateCall(String containerId, Long processInstanceId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = null;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/instances/{processInstanceId}/variables/instances"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "processInstanceId" + "\\}", apiClient.escapeString(processInstanceId.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call getVariablesCurrentStateValidateBeforeCall(String containerId, Long processInstanceId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling getVariablesCurrentState(Async)");
+        }
+        
+        // verify the required parameter 'processInstanceId' is set
+        if (processInstanceId == null) {
+            throw new ApiException("Missing the required parameter 'processInstanceId' when calling getVariablesCurrentState(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = getVariablesCurrentStateCall(containerId, processInstanceId, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Returns the current variable values of a specified process instance in a specified KIE container.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that variables state should be collected for (required)
+     * @return VariableInstanceList
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public VariableInstanceList getVariablesCurrentState(String containerId, Long processInstanceId) throws ApiException {
+        ApiResponse<VariableInstanceList> resp = getVariablesCurrentStateWithHttpInfo(containerId, processInstanceId);
+        return resp.getData();
+    }
+
+    /**
+     * Returns the current variable values of a specified process instance in a specified KIE container.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that variables state should be collected for (required)
+     * @return ApiResponse&lt;VariableInstanceList&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<VariableInstanceList> getVariablesCurrentStateWithHttpInfo(String containerId, Long processInstanceId) throws ApiException {
+        com.squareup.okhttp.Call call = getVariablesCurrentStateValidateBeforeCall(containerId, processInstanceId, null, null);
+        Type localVarReturnType = new TypeToken<VariableInstanceList>(){}.getType();
+        return apiClient.execute(call, localVarReturnType);
+    }
+
+    /**
+     * Returns the current variable values of a specified process instance in a specified KIE container. (asynchronously)
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that variables state should be collected for (required)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call getVariablesCurrentStateAsync(String containerId, Long processInstanceId, final ApiCallback<VariableInstanceList> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = getVariablesCurrentStateValidateBeforeCall(containerId, processInstanceId, progressListener, progressRequestListener);
+        Type localVarReturnType = new TypeToken<VariableInstanceList>(){}.getType();
+        apiClient.executeAsync(call, localVarReturnType, callback);
+        return call;
+    }
+    /**
+     * Build call for getWorkItem
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that work item belongs to (required)
+     * @param workItemId identifier of the work item to retrieve (required)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call getWorkItemCall(String containerId, Long processInstanceId, Long workItemId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = null;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/instances/{processInstanceId}/workitems/{workItemId}"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "processInstanceId" + "\\}", apiClient.escapeString(processInstanceId.toString()))
+            .replaceAll("\\{" + "workItemId" + "\\}", apiClient.escapeString(workItemId.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call getWorkItemValidateBeforeCall(String containerId, Long processInstanceId, Long workItemId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling getWorkItem(Async)");
+        }
+        
+        // verify the required parameter 'processInstanceId' is set
+        if (processInstanceId == null) {
+            throw new ApiException("Missing the required parameter 'processInstanceId' when calling getWorkItem(Async)");
+        }
+        
+        // verify the required parameter 'workItemId' is set
+        if (workItemId == null) {
+            throw new ApiException("Missing the required parameter 'workItemId' when calling getWorkItem(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = getWorkItemCall(containerId, processInstanceId, workItemId, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Returns information about a specified work item for a specified process instance.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that work item belongs to (required)
+     * @param workItemId identifier of the work item to retrieve (required)
+     * @return WorkItemInstance
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public WorkItemInstance getWorkItem(String containerId, Long processInstanceId, Long workItemId) throws ApiException {
+        ApiResponse<WorkItemInstance> resp = getWorkItemWithHttpInfo(containerId, processInstanceId, workItemId);
+        return resp.getData();
+    }
+
+    /**
+     * Returns information about a specified work item for a specified process instance.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that work item belongs to (required)
+     * @param workItemId identifier of the work item to retrieve (required)
+     * @return ApiResponse&lt;WorkItemInstance&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<WorkItemInstance> getWorkItemWithHttpInfo(String containerId, Long processInstanceId, Long workItemId) throws ApiException {
+        com.squareup.okhttp.Call call = getWorkItemValidateBeforeCall(containerId, processInstanceId, workItemId, null, null);
+        Type localVarReturnType = new TypeToken<WorkItemInstance>(){}.getType();
+        return apiClient.execute(call, localVarReturnType);
+    }
+
+    /**
+     * Returns information about a specified work item for a specified process instance. (asynchronously)
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that work item belongs to (required)
+     * @param workItemId identifier of the work item to retrieve (required)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call getWorkItemAsync(String containerId, Long processInstanceId, Long workItemId, final ApiCallback<WorkItemInstance> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = getWorkItemValidateBeforeCall(containerId, processInstanceId, workItemId, progressListener, progressRequestListener);
+        Type localVarReturnType = new TypeToken<WorkItemInstance>(){}.getType();
+        apiClient.executeAsync(call, localVarReturnType, callback);
+        return call;
+    }
+    /**
+     * Build call for getWorkItemByProcessInstance
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that work items belong to (required)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call getWorkItemByProcessInstanceCall(String containerId, Long processInstanceId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = null;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/instances/{processInstanceId}/workitems"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "processInstanceId" + "\\}", apiClient.escapeString(processInstanceId.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call getWorkItemByProcessInstanceValidateBeforeCall(String containerId, Long processInstanceId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling getWorkItemByProcessInstance(Async)");
+        }
+        
+        // verify the required parameter 'processInstanceId' is set
+        if (processInstanceId == null) {
+            throw new ApiException("Missing the required parameter 'processInstanceId' when calling getWorkItemByProcessInstance(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = getWorkItemByProcessInstanceCall(containerId, processInstanceId, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Returns all work items for a specified process instance.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that work items belong to (required)
+     * @return WorkItemInstanceList
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public WorkItemInstanceList getWorkItemByProcessInstance(String containerId, Long processInstanceId) throws ApiException {
+        ApiResponse<WorkItemInstanceList> resp = getWorkItemByProcessInstanceWithHttpInfo(containerId, processInstanceId);
+        return resp.getData();
+    }
+
+    /**
+     * Returns all work items for a specified process instance.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that work items belong to (required)
+     * @return ApiResponse&lt;WorkItemInstanceList&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<WorkItemInstanceList> getWorkItemByProcessInstanceWithHttpInfo(String containerId, Long processInstanceId) throws ApiException {
+        com.squareup.okhttp.Call call = getWorkItemByProcessInstanceValidateBeforeCall(containerId, processInstanceId, null, null);
+        Type localVarReturnType = new TypeToken<WorkItemInstanceList>(){}.getType();
+        return apiClient.execute(call, localVarReturnType);
+    }
+
+    /**
+     * Returns all work items for a specified process instance. (asynchronously)
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance that work items belong to (required)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call getWorkItemByProcessInstanceAsync(String containerId, Long processInstanceId, final ApiCallback<WorkItemInstanceList> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = getWorkItemByProcessInstanceValidateBeforeCall(containerId, processInstanceId, progressListener, progressRequestListener);
+        Type localVarReturnType = new TypeToken<WorkItemInstanceList>(){}.getType();
+        apiClient.executeAsync(call, localVarReturnType, callback);
+        return call;
+    }
+    /**
+     * Build call for setProcessVariable
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance to be updated (required)
+     * @param varName name of the variable to be set/updated (required)
+     * @param body variable data - any type can be provided (required)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call setProcessVariableCall(String containerId, Long processInstanceId, String varName, String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = body;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/instances/{processInstanceId}/variable/{varName}"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "processInstanceId" + "\\}", apiClient.escapeString(processInstanceId.toString()))
+            .replaceAll("\\{" + "varName" + "\\}", apiClient.escapeString(varName.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            "application/json", "application/xml"
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call setProcessVariableValidateBeforeCall(String containerId, Long processInstanceId, String varName, String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling setProcessVariable(Async)");
+        }
+        
+        // verify the required parameter 'processInstanceId' is set
+        if (processInstanceId == null) {
+            throw new ApiException("Missing the required parameter 'processInstanceId' when calling setProcessVariable(Async)");
+        }
+        
+        // verify the required parameter 'varName' is set
+        if (varName == null) {
+            throw new ApiException("Missing the required parameter 'varName' when calling setProcessVariable(Async)");
+        }
+        
+        // verify the required parameter 'body' is set
+        if (body == null) {
+            throw new ApiException("Missing the required parameter 'body' when calling setProcessVariable(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = setProcessVariableCall(containerId, processInstanceId, varName, body, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Creates or updates a variable for a specified process instance.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance to be updated (required)
+     * @param varName name of the variable to be set/updated (required)
+     * @param body variable data - any type can be provided (required)
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public void setProcessVariable(String containerId, Long processInstanceId, String varName, String body) throws ApiException {
+        setProcessVariableWithHttpInfo(containerId, processInstanceId, varName, body);
+    }
+
+    /**
+     * Creates or updates a variable for a specified process instance.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance to be updated (required)
+     * @param varName name of the variable to be set/updated (required)
+     * @param body variable data - any type can be provided (required)
+     * @return ApiResponse&lt;Void&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<Void> setProcessVariableWithHttpInfo(String containerId, Long processInstanceId, String varName, String body) throws ApiException {
+        com.squareup.okhttp.Call call = setProcessVariableValidateBeforeCall(containerId, processInstanceId, varName, body, null, null);
+        return apiClient.execute(call);
+    }
+
+    /**
+     * Creates or updates a variable for a specified process instance. (asynchronously)
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance to be updated (required)
+     * @param varName name of the variable to be set/updated (required)
+     * @param body variable data - any type can be provided (required)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call setProcessVariableAsync(String containerId, Long processInstanceId, String varName, String body, final ApiCallback<Void> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = setProcessVariableValidateBeforeCall(containerId, processInstanceId, varName, body, progressListener, progressRequestListener);
+        apiClient.executeAsync(call, callback);
+        return call;
+    }
+    /**
+     * Build call for setProcessVariables
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance to be updated (required)
+     * @param body variable data give as map (required)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call setProcessVariablesCall(String containerId, Long processInstanceId, String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = body;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/instances/{processInstanceId}/variables"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "processInstanceId" + "\\}", apiClient.escapeString(processInstanceId.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            "application/json", "application/xml"
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call setProcessVariablesValidateBeforeCall(String containerId, Long processInstanceId, String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling setProcessVariables(Async)");
+        }
+        
+        // verify the required parameter 'processInstanceId' is set
+        if (processInstanceId == null) {
+            throw new ApiException("Missing the required parameter 'processInstanceId' when calling setProcessVariables(Async)");
+        }
+        
+        // verify the required parameter 'body' is set
+        if (body == null) {
+            throw new ApiException("Missing the required parameter 'body' when calling setProcessVariables(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = setProcessVariablesCall(containerId, processInstanceId, body, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Updates the values of one or more variable for a specified process instance. The request is a map in which the key is the variable name and the value is the new variable value.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance to be updated (required)
+     * @param body variable data give as map (required)
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public void setProcessVariables(String containerId, Long processInstanceId, String body) throws ApiException {
+        setProcessVariablesWithHttpInfo(containerId, processInstanceId, body);
+    }
+
+    /**
+     * Updates the values of one or more variable for a specified process instance. The request is a map in which the key is the variable name and the value is the new variable value.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance to be updated (required)
+     * @param body variable data give as map (required)
+     * @return ApiResponse&lt;Void&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<Void> setProcessVariablesWithHttpInfo(String containerId, Long processInstanceId, String body) throws ApiException {
+        com.squareup.okhttp.Call call = setProcessVariablesValidateBeforeCall(containerId, processInstanceId, body, null, null);
+        return apiClient.execute(call);
+    }
+
+    /**
+     * Updates the values of one or more variable for a specified process instance. The request is a map in which the key is the variable name and the value is the new variable value. (asynchronously)
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance to be updated (required)
+     * @param body variable data give as map (required)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call setProcessVariablesAsync(String containerId, Long processInstanceId, String body, final ApiCallback<Void> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = setProcessVariablesValidateBeforeCall(containerId, processInstanceId, body, progressListener, progressRequestListener);
+        apiClient.executeAsync(call, callback);
+        return call;
+    }
+    /**
+     * Build call for signalProcessInstance
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance to be signaled (required)
+     * @param signalName signal name to be send to process instance (required)
+     * @param body optional event data - any type can be provided (optional)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call signalProcessInstanceCall(String containerId, Long processInstanceId, String signalName, String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = body;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/instances/{processInstanceId}/signal/{signalName}"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "processInstanceId" + "\\}", apiClient.escapeString(processInstanceId.toString()))
+            .replaceAll("\\{" + "signalName" + "\\}", apiClient.escapeString(signalName.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            "application/json", "application/xml"
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call signalProcessInstanceValidateBeforeCall(String containerId, Long processInstanceId, String signalName, String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling signalProcessInstance(Async)");
+        }
+        
+        // verify the required parameter 'processInstanceId' is set
+        if (processInstanceId == null) {
+            throw new ApiException("Missing the required parameter 'processInstanceId' when calling signalProcessInstance(Async)");
+        }
+        
+        // verify the required parameter 'signalName' is set
+        if (signalName == null) {
+            throw new ApiException("Missing the required parameter 'signalName' when calling signalProcessInstance(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = signalProcessInstanceCall(containerId, processInstanceId, signalName, body, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Signals a specified process instance with a specified signal name and optional signal data.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance to be signaled (required)
+     * @param signalName signal name to be send to process instance (required)
+     * @param body optional event data - any type can be provided (optional)
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public void signalProcessInstance(String containerId, Long processInstanceId, String signalName, String body) throws ApiException {
+        signalProcessInstanceWithHttpInfo(containerId, processInstanceId, signalName, body);
+    }
+
+    /**
+     * Signals a specified process instance with a specified signal name and optional signal data.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance to be signaled (required)
+     * @param signalName signal name to be send to process instance (required)
+     * @param body optional event data - any type can be provided (optional)
+     * @return ApiResponse&lt;Void&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<Void> signalProcessInstanceWithHttpInfo(String containerId, Long processInstanceId, String signalName, String body) throws ApiException {
+        com.squareup.okhttp.Call call = signalProcessInstanceValidateBeforeCall(containerId, processInstanceId, signalName, body, null, null);
+        return apiClient.execute(call);
+    }
+
+    /**
+     * Signals a specified process instance with a specified signal name and optional signal data. (asynchronously)
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param processInstanceId identifier of the process instance to be signaled (required)
+     * @param signalName signal name to be send to process instance (required)
+     * @param body optional event data - any type can be provided (optional)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call signalProcessInstanceAsync(String containerId, Long processInstanceId, String signalName, String body, final ApiCallback<Void> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = signalProcessInstanceValidateBeforeCall(containerId, processInstanceId, signalName, body, progressListener, progressRequestListener);
+        apiClient.executeAsync(call, callback);
+        return call;
+    }
+    /**
+     * Build call for signalProcessInstanceByCorrelationKey
+     * @param containerId container id that process instance belongs to (required)
+     * @param correlationKey correlation key of the process instance to be signaled (required)
+     * @param signalName signal name to be sent to process instance (required)
+     * @param body optional event data - any type can be provided (optional)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call signalProcessInstanceByCorrelationKeyCall(String containerId, String correlationKey, String signalName, String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = body;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/instances/correlation/{correlationKey}/signal/{signalName}"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "correlationKey" + "\\}", apiClient.escapeString(correlationKey.toString()))
+            .replaceAll("\\{" + "signalName" + "\\}", apiClient.escapeString(signalName.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            "application/json", "application/xml"
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call signalProcessInstanceByCorrelationKeyValidateBeforeCall(String containerId, String correlationKey, String signalName, String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling signalProcessInstanceByCorrelationKey(Async)");
+        }
+        
+        // verify the required parameter 'correlationKey' is set
+        if (correlationKey == null) {
+            throw new ApiException("Missing the required parameter 'correlationKey' when calling signalProcessInstanceByCorrelationKey(Async)");
+        }
+        
+        // verify the required parameter 'signalName' is set
+        if (signalName == null) {
+            throw new ApiException("Missing the required parameter 'signalName' when calling signalProcessInstanceByCorrelationKey(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = signalProcessInstanceByCorrelationKeyCall(containerId, correlationKey, signalName, body, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Signals a specified process instance by correlation key with a specified signal name and optional signal data.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param correlationKey correlation key of the process instance to be signaled (required)
+     * @param signalName signal name to be sent to process instance (required)
+     * @param body optional event data - any type can be provided (optional)
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public void signalProcessInstanceByCorrelationKey(String containerId, String correlationKey, String signalName, String body) throws ApiException {
+        signalProcessInstanceByCorrelationKeyWithHttpInfo(containerId, correlationKey, signalName, body);
+    }
+
+    /**
+     * Signals a specified process instance by correlation key with a specified signal name and optional signal data.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param correlationKey correlation key of the process instance to be signaled (required)
+     * @param signalName signal name to be sent to process instance (required)
+     * @param body optional event data - any type can be provided (optional)
+     * @return ApiResponse&lt;Void&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<Void> signalProcessInstanceByCorrelationKeyWithHttpInfo(String containerId, String correlationKey, String signalName, String body) throws ApiException {
+        com.squareup.okhttp.Call call = signalProcessInstanceByCorrelationKeyValidateBeforeCall(containerId, correlationKey, signalName, body, null, null);
+        return apiClient.execute(call);
+    }
+
+    /**
+     * Signals a specified process instance by correlation key with a specified signal name and optional signal data. (asynchronously)
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param correlationKey correlation key of the process instance to be signaled (required)
+     * @param signalName signal name to be sent to process instance (required)
+     * @param body optional event data - any type can be provided (optional)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call signalProcessInstanceByCorrelationKeyAsync(String containerId, String correlationKey, String signalName, String body, final ApiCallback<Void> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = signalProcessInstanceByCorrelationKeyValidateBeforeCall(containerId, correlationKey, signalName, body, progressListener, progressRequestListener);
+        apiClient.executeAsync(call, callback);
+        return call;
+    }
+    /**
+     * Build call for signalProcessInstances
+     * @param containerId container id that process instance belongs to (required)
+     * @param signalName signal name to be send to process instance (required)
+     * @param instanceId list of identifiers of the process instances to be signaled (optional)
+     * @param correlationKey list of correlationKeys of the process instances to be signaled (optional)
+     * @param body optional event data - any type can be provided (optional)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call signalProcessInstancesCall(String containerId, String signalName, List<Long> instanceId, List<String> correlationKey, String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = body;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/instances/signal/{signalName}"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "signalName" + "\\}", apiClient.escapeString(signalName.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+        if (instanceId != null)
+        localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("multi", "instanceId", instanceId));
+        if (correlationKey != null)
+        localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("multi", "correlationKey", correlationKey));
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            "application/json", "application/xml"
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call signalProcessInstancesValidateBeforeCall(String containerId, String signalName, List<Long> instanceId, List<String> correlationKey, String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling signalProcessInstances(Async)");
+        }
+        
+        // verify the required parameter 'signalName' is set
+        if (signalName == null) {
+            throw new ApiException("Missing the required parameter 'signalName' when calling signalProcessInstances(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = signalProcessInstancesCall(containerId, signalName, instanceId, correlationKey, body, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Signals multiple process instances with a specified signal name.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param signalName signal name to be send to process instance (required)
+     * @param instanceId list of identifiers of the process instances to be signaled (optional)
+     * @param correlationKey list of correlationKeys of the process instances to be signaled (optional)
+     * @param body optional event data - any type can be provided (optional)
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public void signalProcessInstances(String containerId, String signalName, List<Long> instanceId, List<String> correlationKey, String body) throws ApiException {
+        signalProcessInstancesWithHttpInfo(containerId, signalName, instanceId, correlationKey, body);
+    }
+
+    /**
+     * Signals multiple process instances with a specified signal name.
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param signalName signal name to be send to process instance (required)
+     * @param instanceId list of identifiers of the process instances to be signaled (optional)
+     * @param correlationKey list of correlationKeys of the process instances to be signaled (optional)
+     * @param body optional event data - any type can be provided (optional)
+     * @return ApiResponse&lt;Void&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<Void> signalProcessInstancesWithHttpInfo(String containerId, String signalName, List<Long> instanceId, List<String> correlationKey, String body) throws ApiException {
+        com.squareup.okhttp.Call call = signalProcessInstancesValidateBeforeCall(containerId, signalName, instanceId, correlationKey, body, null, null);
+        return apiClient.execute(call);
+    }
+
+    /**
+     * Signals multiple process instances with a specified signal name. (asynchronously)
+     * 
+     * @param containerId container id that process instance belongs to (required)
+     * @param signalName signal name to be send to process instance (required)
+     * @param instanceId list of identifiers of the process instances to be signaled (optional)
+     * @param correlationKey list of correlationKeys of the process instances to be signaled (optional)
+     * @param body optional event data - any type can be provided (optional)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call signalProcessInstancesAsync(String containerId, String signalName, List<Long> instanceId, List<String> correlationKey, String body, final ApiCallback<Void> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = signalProcessInstancesValidateBeforeCall(containerId, signalName, instanceId, correlationKey, body, progressListener, progressRequestListener);
+        apiClient.executeAsync(call, callback);
+        return call;
+    }
+    /**
+     * Build call for startProcess
+     * @param containerId container id where the process definition resides (required)
+     * @param processId process id that new instance should be created from (required)
+     * @param body optional map of process variables (optional)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call startProcessCall(String containerId, String processId, String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = body;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/{processId}/instances"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "processId" + "\\}", apiClient.escapeString(processId.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            "application/json", "application/xml"
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call startProcessValidateBeforeCall(String containerId, String processId, String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling startProcess(Async)");
+        }
+        
+        // verify the required parameter 'processId' is set
+        if (processId == null) {
+            throw new ApiException("Missing the required parameter 'processId' when calling startProcess(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = startProcessCall(containerId, processId, body, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Starts a new process instance of a specified process.
+     * 
+     * @param containerId container id where the process definition resides (required)
+     * @param processId process id that new instance should be created from (required)
+     * @param body optional map of process variables (optional)
+     * @return Long
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public Long startProcess(String containerId, String processId, String body) throws ApiException {
+        ApiResponse<Long> resp = startProcessWithHttpInfo(containerId, processId, body);
+        return resp.getData();
+    }
+
+    /**
+     * Starts a new process instance of a specified process.
+     * 
+     * @param containerId container id where the process definition resides (required)
+     * @param processId process id that new instance should be created from (required)
+     * @param body optional map of process variables (optional)
+     * @return ApiResponse&lt;Long&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<Long> startProcessWithHttpInfo(String containerId, String processId, String body) throws ApiException {
+        com.squareup.okhttp.Call call = startProcessValidateBeforeCall(containerId, processId, body, null, null);
+        Type localVarReturnType = new TypeToken<Long>(){}.getType();
+        return apiClient.execute(call, localVarReturnType);
+    }
+
+    /**
+     * Starts a new process instance of a specified process. (asynchronously)
+     * 
+     * @param containerId container id where the process definition resides (required)
+     * @param processId process id that new instance should be created from (required)
+     * @param body optional map of process variables (optional)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call startProcessAsync(String containerId, String processId, String body, final ApiCallback<Long> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = startProcessValidateBeforeCall(containerId, processId, body, progressListener, progressRequestListener);
+        Type localVarReturnType = new TypeToken<Long>(){}.getType();
+        apiClient.executeAsync(call, localVarReturnType, callback);
+        return call;
+    }
+    /**
+     * Build call for startProcessFromNodeIds
+     * @param containerId container id where the process definition resides (required)
+     * @param processId process instance id that new instance should be created from (required)
+     * @param body optional map of process variables (optional)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call startProcessFromNodeIdsCall(String containerId, String processId, String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = body;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/{processId}/instances/fromNodes"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "processId" + "\\}", apiClient.escapeString(processId.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            "application/json", "application/xml"
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call startProcessFromNodeIdsValidateBeforeCall(String containerId, String processId, String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling startProcessFromNodeIds(Async)");
+        }
+        
+        // verify the required parameter 'processId' is set
+        if (processId == null) {
+            throw new ApiException("Missing the required parameter 'processId' when calling startProcessFromNodeIds(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = startProcessFromNodeIdsCall(containerId, processId, body, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Starts a new process instance from the specific nodes
+     * 
+     * @param containerId container id where the process definition resides (required)
+     * @param processId process instance id that new instance should be created from (required)
+     * @param body optional map of process variables (optional)
+     * @return Long
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public Long startProcessFromNodeIds(String containerId, String processId, String body) throws ApiException {
+        ApiResponse<Long> resp = startProcessFromNodeIdsWithHttpInfo(containerId, processId, body);
+        return resp.getData();
+    }
+
+    /**
+     * Starts a new process instance from the specific nodes
+     * 
+     * @param containerId container id where the process definition resides (required)
+     * @param processId process instance id that new instance should be created from (required)
+     * @param body optional map of process variables (optional)
+     * @return ApiResponse&lt;Long&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<Long> startProcessFromNodeIdsWithHttpInfo(String containerId, String processId, String body) throws ApiException {
+        com.squareup.okhttp.Call call = startProcessFromNodeIdsValidateBeforeCall(containerId, processId, body, null, null);
+        Type localVarReturnType = new TypeToken<Long>(){}.getType();
+        return apiClient.execute(call, localVarReturnType);
+    }
+
+    /**
+     * Starts a new process instance from the specific nodes (asynchronously)
+     * 
+     * @param containerId container id where the process definition resides (required)
+     * @param processId process instance id that new instance should be created from (required)
+     * @param body optional map of process variables (optional)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call startProcessFromNodeIdsAsync(String containerId, String processId, String body, final ApiCallback<Long> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = startProcessFromNodeIdsValidateBeforeCall(containerId, processId, body, progressListener, progressRequestListener);
+        Type localVarReturnType = new TypeToken<Long>(){}.getType();
+        apiClient.executeAsync(call, localVarReturnType, callback);
+        return call;
+    }
+    /**
+     * Build call for startProcessWithCorrelation
+     * @param containerId container id where the process definition resides (required)
+     * @param processId process id that new instance should be created from (required)
+     * @param correlationKey correlation key to be assigned to process instance (required)
+     * @param body optional map of process variables (optional)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call startProcessWithCorrelationCall(String containerId, String processId, String correlationKey, String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = body;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/{processId}/instances/correlation/{correlationKey}"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "processId" + "\\}", apiClient.escapeString(processId.toString()))
+            .replaceAll("\\{" + "correlationKey" + "\\}", apiClient.escapeString(correlationKey.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            "application/json", "application/xml"
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call startProcessWithCorrelationValidateBeforeCall(String containerId, String processId, String correlationKey, String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling startProcessWithCorrelation(Async)");
+        }
+        
+        // verify the required parameter 'processId' is set
+        if (processId == null) {
+            throw new ApiException("Missing the required parameter 'processId' when calling startProcessWithCorrelation(Async)");
+        }
+        
+        // verify the required parameter 'correlationKey' is set
+        if (correlationKey == null) {
+            throw new ApiException("Missing the required parameter 'correlationKey' when calling startProcessWithCorrelation(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = startProcessWithCorrelationCall(containerId, processId, correlationKey, body, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Starts a new process instance of a specified process and assigns a new correlation key to the process instance.
+     * 
+     * @param containerId container id where the process definition resides (required)
+     * @param processId process id that new instance should be created from (required)
+     * @param correlationKey correlation key to be assigned to process instance (required)
+     * @param body optional map of process variables (optional)
+     * @return Long
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public Long startProcessWithCorrelation(String containerId, String processId, String correlationKey, String body) throws ApiException {
+        ApiResponse<Long> resp = startProcessWithCorrelationWithHttpInfo(containerId, processId, correlationKey, body);
+        return resp.getData();
+    }
+
+    /**
+     * Starts a new process instance of a specified process and assigns a new correlation key to the process instance.
+     * 
+     * @param containerId container id where the process definition resides (required)
+     * @param processId process id that new instance should be created from (required)
+     * @param correlationKey correlation key to be assigned to process instance (required)
+     * @param body optional map of process variables (optional)
+     * @return ApiResponse&lt;Long&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<Long> startProcessWithCorrelationWithHttpInfo(String containerId, String processId, String correlationKey, String body) throws ApiException {
+        com.squareup.okhttp.Call call = startProcessWithCorrelationValidateBeforeCall(containerId, processId, correlationKey, body, null, null);
+        Type localVarReturnType = new TypeToken<Long>(){}.getType();
+        return apiClient.execute(call, localVarReturnType);
+    }
+
+    /**
+     * Starts a new process instance of a specified process and assigns a new correlation key to the process instance. (asynchronously)
+     * 
+     * @param containerId container id where the process definition resides (required)
+     * @param processId process id that new instance should be created from (required)
+     * @param correlationKey correlation key to be assigned to process instance (required)
+     * @param body optional map of process variables (optional)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call startProcessWithCorrelationAsync(String containerId, String processId, String correlationKey, String body, final ApiCallback<Long> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = startProcessWithCorrelationValidateBeforeCall(containerId, processId, correlationKey, body, progressListener, progressRequestListener);
+        Type localVarReturnType = new TypeToken<Long>(){}.getType();
+        apiClient.executeAsync(call, localVarReturnType, callback);
+        return call;
+    }
+    /**
+     * Build call for startProcessWithCorrelationKeyFromNodeIds
+     * @param containerId container id where the process definition resides (required)
+     * @param processId process instance id that new instance should be created from (required)
+     * @param correlationKey correlation key that should be used for creating the process (required)
+     * @param body start process specifications (optional)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call startProcessWithCorrelationKeyFromNodeIdsCall(String containerId, String processId, String correlationKey, String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = body;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/{processId}/instances/correlation/{correlationKey}/fromNodes"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "processId" + "\\}", apiClient.escapeString(processId.toString()))
+            .replaceAll("\\{" + "correlationKey" + "\\}", apiClient.escapeString(correlationKey.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            "application/json", "application/xml"
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call startProcessWithCorrelationKeyFromNodeIdsValidateBeforeCall(String containerId, String processId, String correlationKey, String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling startProcessWithCorrelationKeyFromNodeIds(Async)");
+        }
+        
+        // verify the required parameter 'processId' is set
+        if (processId == null) {
+            throw new ApiException("Missing the required parameter 'processId' when calling startProcessWithCorrelationKeyFromNodeIds(Async)");
+        }
+        
+        // verify the required parameter 'correlationKey' is set
+        if (correlationKey == null) {
+            throw new ApiException("Missing the required parameter 'correlationKey' when calling startProcessWithCorrelationKeyFromNodeIds(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = startProcessWithCorrelationKeyFromNodeIdsCall(containerId, processId, correlationKey, body, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Starts a new process instance from the specific nodes
+     * 
+     * @param containerId container id where the process definition resides (required)
+     * @param processId process instance id that new instance should be created from (required)
+     * @param correlationKey correlation key that should be used for creating the process (required)
+     * @param body start process specifications (optional)
+     * @return Long
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public Long startProcessWithCorrelationKeyFromNodeIds(String containerId, String processId, String correlationKey, String body) throws ApiException {
+        ApiResponse<Long> resp = startProcessWithCorrelationKeyFromNodeIdsWithHttpInfo(containerId, processId, correlationKey, body);
+        return resp.getData();
+    }
+
+    /**
+     * Starts a new process instance from the specific nodes
+     * 
+     * @param containerId container id where the process definition resides (required)
+     * @param processId process instance id that new instance should be created from (required)
+     * @param correlationKey correlation key that should be used for creating the process (required)
+     * @param body start process specifications (optional)
+     * @return ApiResponse&lt;Long&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<Long> startProcessWithCorrelationKeyFromNodeIdsWithHttpInfo(String containerId, String processId, String correlationKey, String body) throws ApiException {
+        com.squareup.okhttp.Call call = startProcessWithCorrelationKeyFromNodeIdsValidateBeforeCall(containerId, processId, correlationKey, body, null, null);
+        Type localVarReturnType = new TypeToken<Long>(){}.getType();
+        return apiClient.execute(call, localVarReturnType);
+    }
+
+    /**
+     * Starts a new process instance from the specific nodes (asynchronously)
+     * 
+     * @param containerId container id where the process definition resides (required)
+     * @param processId process instance id that new instance should be created from (required)
+     * @param correlationKey correlation key that should be used for creating the process (required)
+     * @param body start process specifications (optional)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call startProcessWithCorrelationKeyFromNodeIdsAsync(String containerId, String processId, String correlationKey, String body, final ApiCallback<Long> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = startProcessWithCorrelationKeyFromNodeIdsValidateBeforeCall(containerId, processId, correlationKey, body, progressListener, progressRequestListener);
+        Type localVarReturnType = new TypeToken<Long>(){}.getType();
+        apiClient.executeAsync(call, localVarReturnType, callback);
+        return call;
+    }
+    /**
+     * Build call for startSynchronousProcess
+     * @param containerId container id where the process definition resides (required)
+     * @param processId process id that new instance should be created from (required)
+     * @param body optional map of process variables (optional)
+     * @param progressListener Progress listener
+     * @param progressRequestListener Progress request listener
+     * @return Call to execute
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public com.squareup.okhttp.Call startSynchronousProcessCall(String containerId, String processId, String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Object localVarPostBody = body;
+
+        // create path and map variables
+        String localVarPath = "/server/containers/{containerId}/processes/{processId}/computedInstances"
+            .replaceAll("\\{" + "containerId" + "\\}", apiClient.escapeString(containerId.toString()))
+            .replaceAll("\\{" + "processId" + "\\}", apiClient.escapeString(processId.toString()));
+
+        List<Pair> localVarQueryParams = new ArrayList<Pair>();
+        List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
+
+        Map<String, String> localVarHeaderParams = new HashMap<String, String>();
+
+        Map<String, Object> localVarFormParams = new HashMap<String, Object>();
+
+        final String[] localVarAccepts = {
+            "application/json", "application/xml"
+        };
+        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+        final String[] localVarContentTypes = {
+            "application/json", "application/xml"
+        };
+        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+        localVarHeaderParams.put("Content-Type", localVarContentType);
+
+        if(progressListener != null) {
+            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+                @Override
+                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+                    return originalResponse.newBuilder()
+                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+                    .build();
+                }
+            });
+        }
+
+        String[] localVarAuthNames = new String[] { "basicAuth" };
+        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+    }
+
+    @SuppressWarnings("rawtypes")
+    private com.squareup.okhttp.Call startSynchronousProcessValidateBeforeCall(String containerId, String processId, String body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        
+        // verify the required parameter 'containerId' is set
+        if (containerId == null) {
+            throw new ApiException("Missing the required parameter 'containerId' when calling startSynchronousProcess(Async)");
+        }
+        
+        // verify the required parameter 'processId' is set
+        if (processId == null) {
+            throw new ApiException("Missing the required parameter 'processId' when calling startSynchronousProcess(Async)");
+        }
+        
+
+        com.squareup.okhttp.Call call = startSynchronousProcessCall(containerId, processId, body, progressListener, progressRequestListener);
+        return call;
+
+    }
+
+    /**
+     * Starts a new synchronous process instance of a specified process.
+     * 
+     * @param containerId container id where the process definition resides (required)
+     * @param processId process id that new instance should be created from (required)
+     * @param body optional map of process variables (optional)
+     * @return Map&lt;String, Object&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public Map<String, Object> startSynchronousProcess(String containerId, String processId, String body) throws ApiException {
+        ApiResponse<Map<String, Object>> resp = startSynchronousProcessWithHttpInfo(containerId, processId, body);
+        return resp.getData();
+    }
+
+    /**
+     * Starts a new synchronous process instance of a specified process.
+     * 
+     * @param containerId container id where the process definition resides (required)
+     * @param processId process id that new instance should be created from (required)
+     * @param body optional map of process variables (optional)
+     * @return ApiResponse&lt;Map&lt;String, Object&gt;&gt;
+     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+     */
+    public ApiResponse<Map<String, Object>> startSynchronousProcessWithHttpInfo(String containerId, String processId, String body) throws ApiException {
+        com.squareup.okhttp.Call call = startSynchronousProcessValidateBeforeCall(containerId, processId, body, null, null);
+        Type localVarReturnType = new TypeToken<Map<String, Object>>(){}.getType();
+        return apiClient.execute(call, localVarReturnType);
+    }
+
+    /**
+     * Starts a new synchronous process instance of a specified process. (asynchronously)
+     * 
+     * @param containerId container id where the process definition resides (required)
+     * @param processId process id that new instance should be created from (required)
+     * @param body optional map of process variables (optional)
+     * @param callback The callback to be executed when the API call finishes
+     * @return The request call
+     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+     */
+    public com.squareup.okhttp.Call startSynchronousProcessAsync(String containerId, String processId, String body, final ApiCallback<Map<String, Object>> callback) throws ApiException {
+
+        ProgressResponseBody.ProgressListener progressListener = null;
+        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
+
+        if (callback != null) {
+            progressListener = new ProgressResponseBody.ProgressListener() {
+                @Override
+                public void update(long bytesRead, long contentLength, boolean done) {
+                    callback.onDownloadProgress(bytesRead, contentLength, done);
+                }
+            };
+
+            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
+                @Override
+                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
+                    callback.onUploadProgress(bytesWritten, contentLength, done);
+                }
+            };
+        }
+
+        com.squareup.okhttp.Call call = startSynchronousProcessValidateBeforeCall(containerId, processId, body, progressListener, progressRequestListener);
+        Type localVarReturnType = new TypeToken<Map<String, Object>>(){}.getType();
+        apiClient.executeAsync(call, localVarReturnType, callback);
+        return call;
+    }
+}

+ 62 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/ApiCallback.java

@@ -0,0 +1,62 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.invoke;
+
+import java.io.IOException;
+
+import java.util.Map;
+import java.util.List;
+
+/**
+ * Callback for asynchronous API call.
+ *
+ * @param <T> The return type
+ */
+public interface ApiCallback<T> {
+    /**
+     * This is called when the API call fails.
+     *
+     * @param e The exception causing the failure
+     * @param statusCode Status code of the response if available, otherwise it would be 0
+     * @param responseHeaders Headers of the response if available, otherwise it would be null
+     */
+    void onFailure(ApiException e, int statusCode, Map<String, List<String>> responseHeaders);
+
+    /**
+     * This is called when the API call succeeded.
+     *
+     * @param result The result deserialized from response
+     * @param statusCode Status code of the response
+     * @param responseHeaders Headers of the response
+     */
+    void onSuccess(T result, int statusCode, Map<String, List<String>> responseHeaders);
+
+    /**
+     * This is called when the API upload processing.
+     *
+     * @param bytesWritten bytes Written
+     * @param contentLength content length of request body
+     * @param done write end
+     */
+    void onUploadProgress(long bytesWritten, long contentLength, boolean done);
+
+    /**
+     * This is called when the API downlond processing.
+     *
+     * @param bytesRead bytes Read
+     * @param contentLength content lenngth of the response
+     * @param done Read end
+     */
+    void onDownloadProgress(long bytesRead, long contentLength, boolean done);
+}

+ 1209 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/ApiClient.java

@@ -0,0 +1,1209 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.invoke;
+
+import com.squareup.okhttp.*;
+import com.squareup.okhttp.internal.http.HttpMethod;
+import com.squareup.okhttp.logging.HttpLoggingInterceptor;
+import com.squareup.okhttp.logging.HttpLoggingInterceptor.Level;
+import okio.BufferedSink;
+import okio.Okio;
+import org.threeten.bp.LocalDate;
+import org.threeten.bp.OffsetDateTime;
+import org.threeten.bp.format.DateTimeFormatter;
+
+import javax.net.ssl.*;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.lang.reflect.Type;
+import java.net.URLConnection;
+import java.net.URLEncoder;
+import java.security.GeneralSecurityException;
+import java.security.KeyStore;
+import java.security.SecureRandom;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateException;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+import java.text.DateFormat;
+import java.util.*;
+import java.util.Map.Entry;
+import java.util.concurrent.TimeUnit;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.auth.Authentication;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.auth.HttpBasicAuth;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.auth.ApiKeyAuth;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.auth.OAuth;
+
+public class ApiClient {
+
+    private String basePath = "https://localhost/kie-server/services/rest";
+    private boolean debugging = false;
+    private Map<String, String> defaultHeaderMap = new HashMap<String, String>();
+    private String tempFolderPath = null;
+
+    private Map<String, Authentication> authentications;
+
+    private DateFormat dateFormat;
+    private DateFormat datetimeFormat;
+    private boolean lenientDatetimeFormat;
+    private int dateLength;
+
+    private InputStream sslCaCert;
+    private boolean verifyingSsl;
+    private KeyManager[] keyManagers;
+
+    private OkHttpClient httpClient;
+    private JSON json;
+
+    private HttpLoggingInterceptor loggingInterceptor;
+
+    /*
+     * Constructor for ApiClient
+     */
+    public ApiClient() {
+        httpClient = new OkHttpClient();
+
+
+        verifyingSsl = true;
+
+        json = new JSON();
+
+        // Set default User-Agent.
+        setUserAgent("Swagger-Codegen/1.0.0/java");
+
+        // Setup authentications (key: authentication name, value: authentication).
+        authentications = new HashMap<String, Authentication>();
+
+        // XXX MODIFIED THIS. XXX
+        authentications.put("basicAuth", new HttpBasicAuth());
+
+        // Prevent the authentications from being modified.
+        authentications = Collections.unmodifiableMap(authentications);
+    }
+
+    /**
+     * Get base path
+     *
+     * @return Baes path
+     */
+    public String getBasePath() {
+        return basePath;
+    }
+
+    /**
+     * Set base path
+     *
+     * @param basePath Base path of the URL (e.g https://localhost/kie-server/services/rest
+     * @return An instance of OkHttpClient
+     */
+    public ApiClient setBasePath(String basePath) {
+        this.basePath = basePath;
+        return this;
+    }
+
+    /**
+     * Get HTTP client
+     *
+     * @return An instance of OkHttpClient
+     */
+    public OkHttpClient getHttpClient() {
+        return httpClient;
+    }
+
+    /**
+     * Set HTTP client
+     *
+     * @param httpClient An instance of OkHttpClient
+     * @return Api Client
+     */
+    public ApiClient setHttpClient(OkHttpClient httpClient) {
+        this.httpClient = httpClient;
+        return this;
+    }
+
+    /**
+     * Get JSON
+     *
+     * @return JSON object
+     */
+    public JSON getJSON() {
+        return json;
+    }
+
+    /**
+     * Set JSON
+     *
+     * @param json JSON object
+     * @return Api client
+     */
+    public ApiClient setJSON(JSON json) {
+        this.json = json;
+        return this;
+    }
+
+    /**
+     * True if isVerifyingSsl flag is on
+     *
+     * @return True if isVerifySsl flag is on
+     */
+    public boolean isVerifyingSsl() {
+        return verifyingSsl;
+    }
+
+    /**
+     * Configure whether to verify certificate and hostname when making https requests.
+     * Default to true.
+     * NOTE: Do NOT set to false in production code, otherwise you would face multiple types of cryptographic attacks.
+     *
+     * @param verifyingSsl True to verify TLS/SSL connection
+     * @return ApiClient
+     */
+    public ApiClient setVerifyingSsl(boolean verifyingSsl) {
+        this.verifyingSsl = verifyingSsl;
+        applySslSettings();
+        return this;
+    }
+
+    /**
+     * Get SSL CA cert.
+     *
+     * @return Input stream to the SSL CA cert
+     */
+    public InputStream getSslCaCert() {
+        return sslCaCert;
+    }
+
+    /**
+     * Configure the CA certificate to be trusted when making https requests.
+     * Use null to reset to default.
+     *
+     * @param sslCaCert input stream for SSL CA cert
+     * @return ApiClient
+     */
+    public ApiClient setSslCaCert(InputStream sslCaCert) {
+        this.sslCaCert = sslCaCert;
+        applySslSettings();
+        return this;
+    }
+
+    public KeyManager[] getKeyManagers() {
+        return keyManagers;
+    }
+
+    /**
+     * Configure client keys to use for authorization in an SSL session.
+     * Use null to reset to default.
+     *
+     * @param managers The KeyManagers to use
+     * @return ApiClient
+     */
+    public ApiClient setKeyManagers(KeyManager[] managers) {
+        this.keyManagers = managers;
+        applySslSettings();
+        return this;
+    }
+
+    public DateFormat getDateFormat() {
+        return dateFormat;
+    }
+
+    public ApiClient setDateFormat(DateFormat dateFormat) {
+        this.json.setDateFormat(dateFormat);
+        return this;
+    }
+
+    public ApiClient setSqlDateFormat(DateFormat dateFormat) {
+        this.json.setSqlDateFormat(dateFormat);
+        return this;
+    }
+
+    public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) {
+        this.json.setOffsetDateTimeFormat(dateFormat);
+        return this;
+    }
+
+    public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) {
+        this.json.setLocalDateFormat(dateFormat);
+        return this;
+    }
+
+    public ApiClient setLenientOnJson(boolean lenientOnJson) {
+        this.json.setLenientOnJson(lenientOnJson);
+        return this;
+    }
+
+    /**
+     * Get authentications (key: authentication name, value: authentication).
+     *
+     * @return Map of authentication objects
+     */
+    public Map<String, Authentication> getAuthentications() {
+        return authentications;
+    }
+
+    /**
+     * Get authentication for the given name.
+     *
+     * @param authName The authentication name
+     * @return The authentication, null if not found
+     */
+    public Authentication getAuthentication(String authName) {
+        return authentications.get(authName);
+    }
+
+    /**
+     * Helper method to set username for the first HTTP basic authentication.
+     *
+     * @param username Username
+     */
+    public void setUsername(String username) {
+        for (Authentication auth : authentications.values()) {
+            if (auth instanceof HttpBasicAuth) {
+                ((HttpBasicAuth) auth).setUsername(username);
+                return;
+            }
+        }
+        throw new RuntimeException("No HTTP basic authentication configured!");
+    }
+
+    /**
+     * Helper method to set password for the first HTTP basic authentication.
+     *
+     * @param password Password
+     */
+    public void setPassword(String password) {
+        for (Authentication auth : authentications.values()) {
+            if (auth instanceof HttpBasicAuth) {
+                ((HttpBasicAuth) auth).setPassword(password);
+                return;
+            }
+        }
+        throw new RuntimeException("No HTTP basic authentication configured!");
+    }
+
+    /**
+     * Helper method to set API key value for the first API key authentication.
+     *
+     * @param apiKey API key
+     */
+    public void setApiKey(String apiKey) {
+        for (Authentication auth : authentications.values()) {
+            if (auth instanceof ApiKeyAuth) {
+                ((ApiKeyAuth) auth).setApiKey(apiKey);
+                return;
+            }
+        }
+        throw new RuntimeException("No API key authentication configured!");
+    }
+
+    /**
+     * Helper method to set API key prefix for the first API key authentication.
+     *
+     * @param apiKeyPrefix API key prefix
+     */
+    public void setApiKeyPrefix(String apiKeyPrefix) {
+        for (Authentication auth : authentications.values()) {
+            if (auth instanceof ApiKeyAuth) {
+                ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix);
+                return;
+            }
+        }
+        throw new RuntimeException("No API key authentication configured!");
+    }
+
+    /**
+     * Helper method to set access token for the first OAuth2 authentication.
+     *
+     * @param accessToken Access token
+     */
+    public void setAccessToken(String accessToken) {
+        for (Authentication auth : authentications.values()) {
+            if (auth instanceof OAuth) {
+                ((OAuth) auth).setAccessToken(accessToken);
+                return;
+            }
+        }
+        throw new RuntimeException("No OAuth2 authentication configured!");
+    }
+
+    /**
+     * Set the User-Agent header's value (by adding to the default header map).
+     *
+     * @param userAgent HTTP request's user agent
+     * @return ApiClient
+     */
+    public ApiClient setUserAgent(String userAgent) {
+        addDefaultHeader("User-Agent", userAgent);
+        return this;
+    }
+
+    /**
+     * Add a default header.
+     *
+     * @param key The header's key
+     * @param value The header's value
+     * @return ApiClient
+     */
+    public ApiClient addDefaultHeader(String key, String value) {
+        defaultHeaderMap.put(key, value);
+        return this;
+    }
+
+    /**
+     * Check that whether debugging is enabled for this API client.
+     *
+     * @return True if debugging is enabled, false otherwise.
+     */
+    public boolean isDebugging() {
+        return debugging;
+    }
+
+    /**
+     * Enable/disable debugging for this API client.
+     *
+     * @param debugging To enable (true) or disable (false) debugging
+     * @return ApiClient
+     */
+    public ApiClient setDebugging(boolean debugging) {
+        if (debugging != this.debugging) {
+            if (debugging) {
+                loggingInterceptor = new HttpLoggingInterceptor();
+                loggingInterceptor.setLevel(Level.BODY);
+                httpClient.interceptors().add(loggingInterceptor);
+            } else {
+                httpClient.interceptors().remove(loggingInterceptor);
+                loggingInterceptor = null;
+            }
+        }
+        this.debugging = debugging;
+        return this;
+    }
+
+    /**
+     * The path of temporary folder used to store downloaded files from endpoints
+     * with file response. The default value is <code>null</code>, i.e. using
+     * the system's default tempopary folder.
+     *
+     * @see <a href="https://docs.oracle.com/javase/7/docs/api/java/io/File.html#createTempFile">createTempFile</a>
+     * @return Temporary folder path
+     */
+    public String getTempFolderPath() {
+        return tempFolderPath;
+    }
+
+    /**
+     * Set the temporary folder path (for downloading files)
+     *
+     * @param tempFolderPath Temporary folder path
+     * @return ApiClient
+     */
+    public ApiClient setTempFolderPath(String tempFolderPath) {
+        this.tempFolderPath = tempFolderPath;
+        return this;
+    }
+
+    /**
+     * Get connection timeout (in milliseconds).
+     *
+     * @return Timeout in milliseconds
+     */
+    public int getConnectTimeout() {
+        return httpClient.getConnectTimeout();
+    }
+
+    /**
+     * Sets the connect timeout (in milliseconds).
+     * A value of 0 means no timeout, otherwise values must be between 1 and
+     * {@link Integer#MAX_VALUE}.
+     *
+     * @param connectionTimeout connection timeout in milliseconds
+     * @return Api client
+     */
+    public ApiClient setConnectTimeout(int connectionTimeout) {
+        httpClient.setConnectTimeout(connectionTimeout, TimeUnit.MILLISECONDS);
+        return this;
+    }
+
+    /**
+     * Get read timeout (in milliseconds).
+     *
+     * @return Timeout in milliseconds
+     */
+    public int getReadTimeout() {
+        return httpClient.getReadTimeout();
+    }
+
+    /**
+     * Sets the read timeout (in milliseconds).
+     * A value of 0 means no timeout, otherwise values must be between 1 and
+     * {@link Integer#MAX_VALUE}.
+     *
+     * @param readTimeout read timeout in milliseconds
+     * @return Api client
+     */
+    public ApiClient setReadTimeout(int readTimeout) {
+        httpClient.setReadTimeout(readTimeout, TimeUnit.MILLISECONDS);
+        return this;
+    }
+
+    /**
+     * Get write timeout (in milliseconds).
+     *
+     * @return Timeout in milliseconds
+     */
+    public int getWriteTimeout() {
+        return httpClient.getWriteTimeout();
+    }
+
+    /**
+     * Sets the write timeout (in milliseconds).
+     * A value of 0 means no timeout, otherwise values must be between 1 and
+     * {@link Integer#MAX_VALUE}.
+     *
+     * @param writeTimeout connection timeout in milliseconds
+     * @return Api client
+     */
+    public ApiClient setWriteTimeout(int writeTimeout) {
+        httpClient.setWriteTimeout(writeTimeout, TimeUnit.MILLISECONDS);
+        return this;
+    }
+
+    /**
+     * Format the given parameter object into string.
+     *
+     * @param param Parameter
+     * @return String representation of the parameter
+     */
+    public String parameterToString(Object param) {
+        if (param == null) {
+            return "";
+        } else if (param instanceof Date || param instanceof OffsetDateTime || param instanceof LocalDate) {
+            //Serialize to json string and remove the " enclosing characters
+            String jsonStr = json.serialize(param);
+            return jsonStr.substring(1, jsonStr.length() - 1);
+        } else if (param instanceof Collection) {
+            StringBuilder b = new StringBuilder();
+            for (Object o : (Collection)param) {
+                if (b.length() > 0) {
+                    b.append(",");
+                }
+                b.append(String.valueOf(o));
+            }
+            return b.toString();
+        } else {
+            return String.valueOf(param);
+        }
+    }
+
+    /**
+     * Formats the specified query parameter to a list containing a single {@code Pair} object.
+     *
+     * Note that {@code value} must not be a collection.
+     *
+     * @param name The name of the parameter.
+     * @param value The value of the parameter.
+     * @return A list containing a single {@code Pair} object.
+     */
+    public List<Pair> parameterToPair(String name, Object value) {
+        List<Pair> params = new ArrayList<Pair>();
+
+        // preconditions
+        if (name == null || name.isEmpty() || value == null || value instanceof Collection) return params;
+
+        params.add(new Pair(name, parameterToString(value)));
+        return params;
+    }
+
+    /**
+     * Formats the specified collection query parameters to a list of {@code Pair} objects.
+     *
+     * Note that the values of each of the returned Pair objects are percent-encoded.
+     *
+     * @param collectionFormat The collection format of the parameter.
+     * @param name The name of the parameter.
+     * @param value The value of the parameter.
+     * @return A list of {@code Pair} objects.
+     */
+    public List<Pair> parameterToPairs(String collectionFormat, String name, Collection value) {
+        List<Pair> params = new ArrayList<Pair>();
+
+        // preconditions
+        if (name == null || name.isEmpty() || value == null || value.isEmpty()) {
+            return params;
+        }
+
+        // create the params based on the collection format
+        if ("multi".equals(collectionFormat)) {
+            for (Object item : value) {
+                params.add(new Pair(name, escapeString(parameterToString(item))));
+            }
+            return params;
+        }
+
+        // collectionFormat is assumed to be "csv" by default
+        String delimiter = ",";
+
+        // escape all delimiters except commas, which are URI reserved
+        // characters
+        if ("ssv".equals(collectionFormat)) {
+            delimiter = escapeString(" ");
+        } else if ("tsv".equals(collectionFormat)) {
+            delimiter = escapeString("\t");
+        } else if ("pipes".equals(collectionFormat)) {
+            delimiter = escapeString("|");
+        }
+
+        StringBuilder sb = new StringBuilder() ;
+        for (Object item : value) {
+            sb.append(delimiter);
+            sb.append(escapeString(parameterToString(item)));
+        }
+
+        params.add(new Pair(name, sb.substring(delimiter.length())));
+
+        return params;
+    }
+
+    /**
+     * Sanitize filename by removing path.
+     * e.g. ../../sun.gif becomes sun.gif
+     *
+     * @param filename The filename to be sanitized
+     * @return The sanitized filename
+     */
+    public String sanitizeFilename(String filename) {
+        return filename.replaceAll(".*[/\\\\]", "");
+    }
+
+    /**
+     * Check if the given MIME is a JSON MIME.
+     * JSON MIME examples:
+     *   application/json
+     *   application/json; charset=UTF8
+     *   APPLICATION/JSON
+     *   application/vnd.company+json
+     * "* / *" is also default to JSON
+     * @param mime MIME (Multipurpose Internet Mail Extensions)
+     * @return True if the given MIME is JSON, false otherwise.
+     */
+    public boolean isJsonMime(String mime) {
+      String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
+      return mime != null && (mime.matches(jsonMime) || mime.equals("*/*"));
+    }
+
+    /**
+     * Select the Accept header's value from the given accepts array:
+     *   if JSON exists in the given array, use it;
+     *   otherwise use all of them (joining into a string)
+     *
+     * @param accepts The accepts array to select from
+     * @return The Accept header to use. If the given array is empty,
+     *   null will be returned (not to set the Accept header explicitly).
+     */
+    public String selectHeaderAccept(String[] accepts) {
+        if (accepts.length == 0) {
+            return null;
+        }
+        for (String accept : accepts) {
+            if (isJsonMime(accept)) {
+                return accept;
+            }
+        }
+        return StringUtil.join(accepts, ",");
+    }
+
+    /**
+     * Select the Content-Type header's value from the given array:
+     *   if JSON exists in the given array, use it;
+     *   otherwise use the first one of the array.
+     *
+     * @param contentTypes The Content-Type array to select from
+     * @return The Content-Type header to use. If the given array is empty,
+     *   or matches "any", JSON will be used.
+     */
+    public String selectHeaderContentType(String[] contentTypes) {
+        if (contentTypes.length == 0 || contentTypes[0].equals("*/*")) {
+             return "application/json";
+        }
+        for (String contentType : contentTypes) {
+            if (isJsonMime(contentType)) {
+                return contentType;
+            }
+        }
+        return contentTypes[0];
+    }
+
+    /**
+     * Escape the given string to be used as URL query value.
+     *
+     * @param str String to be escaped
+     * @return Escaped string
+     */
+    public String escapeString(String str) {
+        try {
+            return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20");
+        } catch (UnsupportedEncodingException e) {
+            return str;
+        }
+    }
+
+    /**
+     * Deserialize response body to Java object, according to the return type and
+     * the Content-Type response header.
+     *
+     * @param <T> Type
+     * @param response HTTP response
+     * @param returnType The type of the Java object
+     * @return The deserialized Java object
+     * @throws ApiException If fail to deserialize response body, i.e. cannot read response body
+     *   or the Content-Type of the response is not supported.
+     */
+    @SuppressWarnings("unchecked")
+    public <T> T deserialize(Response response, Type returnType) throws ApiException {
+        if (response == null || returnType == null) {
+            return null;
+        }
+
+        if ("byte[]".equals(returnType.toString())) {
+            // Handle binary response (byte array).
+            try {
+                return (T) response.body().bytes();
+            } catch (IOException e) {
+                throw new ApiException(e);
+            }
+        } else if (returnType.equals(File.class)) {
+            // Handle file downloading.
+            return (T) downloadFileFromResponse(response);
+        }
+
+        String respBody;
+        try {
+            if (response.body() != null)
+                respBody = response.body().string();
+            else
+                respBody = null;
+        } catch (IOException e) {
+            throw new ApiException(e);
+        }
+
+        if (respBody == null || "".equals(respBody)) {
+            return null;
+        }
+
+        String contentType = response.headers().get("Content-Type");
+        if (contentType == null) {
+            // ensuring a default content type
+            contentType = "application/json";
+        }
+        if (isJsonMime(contentType)) {
+            return json.deserialize(respBody, returnType);
+        } else if (returnType.equals(String.class)) {
+            // Expecting string, return the raw response body.
+            return (T) respBody;
+        } else {
+            throw new ApiException(
+                    "Content type \"" + contentType + "\" is not supported for type: " + returnType,
+                    response.code(),
+                    response.headers().toMultimap(),
+                    respBody);
+        }
+    }
+
+    /**
+     * Serialize the given Java object into request body according to the object's
+     * class and the request Content-Type.
+     *
+     * @param obj The Java object
+     * @param contentType The request Content-Type
+     * @return The serialized request body
+     * @throws ApiException If fail to serialize the given object
+     */
+    public RequestBody serialize(Object obj, String contentType) throws ApiException {
+        if (obj instanceof byte[]) {
+            // Binary (byte array) body parameter support.
+            return RequestBody.create(MediaType.parse(contentType), (byte[]) obj);
+        } else if (obj instanceof File) {
+            // File body parameter support.
+            return RequestBody.create(MediaType.parse(contentType), (File) obj);
+        } else if (isJsonMime(contentType)) {
+            String content;
+            if (obj != null) {
+                content = json.serialize(obj);
+            } else {
+                content = null;
+            }
+            return RequestBody.create(MediaType.parse(contentType), content);
+        } else {
+            throw new ApiException("Content type \"" + contentType + "\" is not supported");
+        }
+    }
+
+    /**
+     * Download file from the given response.
+     *
+     * @param response An instance of the Response object
+     * @throws ApiException If fail to read file content from response and write to disk
+     * @return Downloaded file
+     */
+    public File downloadFileFromResponse(Response response) throws ApiException {
+        try {
+            File file = prepareDownloadFile(response);
+            BufferedSink sink = Okio.buffer(Okio.sink(file));
+            sink.writeAll(response.body().source());
+            sink.close();
+            return file;
+        } catch (IOException e) {
+            throw new ApiException(e);
+        }
+    }
+
+    /**
+     * Prepare file for download
+     *
+     * @param response An instance of the Response object
+     * @throws IOException If fail to prepare file for download
+     * @return Prepared file for the download
+     */
+    public File prepareDownloadFile(Response response) throws IOException {
+        String filename = null;
+        String contentDisposition = response.header("Content-Disposition");
+        if (contentDisposition != null && !"".equals(contentDisposition)) {
+            // Get filename from the Content-Disposition header.
+            Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?");
+            Matcher matcher = pattern.matcher(contentDisposition);
+            if (matcher.find()) {
+                filename = sanitizeFilename(matcher.group(1));
+            }
+        }
+
+        String prefix = null;
+        String suffix = null;
+        if (filename == null) {
+            prefix = "download-";
+            suffix = "";
+        } else {
+            int pos = filename.lastIndexOf(".");
+            if (pos == -1) {
+                prefix = filename + "-";
+            } else {
+                prefix = filename.substring(0, pos) + "-";
+                suffix = filename.substring(pos);
+            }
+            // File.createTempFile requires the prefix to be at least three characters long
+            if (prefix.length() < 3)
+                prefix = "download-";
+        }
+
+        if (tempFolderPath == null)
+            return File.createTempFile(prefix, suffix);
+        else
+            return File.createTempFile(prefix, suffix, new File(tempFolderPath));
+    }
+
+    /**
+     * {@link #execute(Call, Type)}
+     *
+     * @param <T> Type
+     * @param call An instance of the Call object
+     * @throws ApiException If fail to execute the call
+     * @return ApiResponse&lt;T&gt;
+     */
+    public <T> ApiResponse<T> execute(Call call) throws ApiException {
+        return execute(call, null);
+    }
+
+    /**
+     * Execute HTTP call and deserialize the HTTP response body into the given return type.
+     *
+     * @param returnType The return type used to deserialize HTTP response body
+     * @param <T> The return type corresponding to (same with) returnType
+     * @param call Call
+     * @return ApiResponse object containing response status, headers and
+     *   data, which is a Java object deserialized from response body and would be null
+     *   when returnType is null.
+     * @throws ApiException If fail to execute the call
+     */
+    public <T> ApiResponse<T> execute(Call call, Type returnType) throws ApiException {
+        try {
+            Response response = call.execute();
+            T data = handleResponse(response, returnType);
+            return new ApiResponse<T>(response.code(), response.headers().toMultimap(), data);
+        } catch (IOException e) {
+            throw new ApiException(e);
+        }
+    }
+
+    /**
+     * {@link #executeAsync(Call, Type, ApiCallback)}
+     *
+     * @param <T> Type
+     * @param call An instance of the Call object
+     * @param callback ApiCallback&lt;T&gt;
+     */
+    public <T> void executeAsync(Call call, ApiCallback<T> callback) {
+        executeAsync(call, null, callback);
+    }
+
+    /**
+     * Execute HTTP call asynchronously.
+     *
+     * @see #execute(Call, Type)
+     * @param <T> Type
+     * @param call The callback to be executed when the API call finishes
+     * @param returnType Return type
+     * @param callback ApiCallback
+     */
+    @SuppressWarnings("unchecked")
+    public <T> void executeAsync(Call call, final Type returnType, final ApiCallback<T> callback) {
+        call.enqueue(new Callback() {
+            @Override
+            public void onFailure(Request request, IOException e) {
+                callback.onFailure(new ApiException(e), 0, null);
+            }
+
+            @Override
+            public void onResponse(Response response) throws IOException {
+                T result;
+                try {
+                    result = (T) handleResponse(response, returnType);
+                } catch (ApiException e) {
+                    callback.onFailure(e, response.code(), response.headers().toMultimap());
+                    return;
+                }
+                callback.onSuccess(result, response.code(), response.headers().toMultimap());
+            }
+        });
+    }
+
+    /**
+     * Handle the given response, return the deserialized object when the response is successful.
+     *
+     * @param <T> Type
+     * @param response Response
+     * @param returnType Return type
+     * @throws ApiException If the response has a unsuccessful status code or
+     *   fail to deserialize the response body
+     * @return Type
+     */
+    public <T> T handleResponse(Response response, Type returnType) throws ApiException {
+        if (response.isSuccessful()) {
+            if (returnType == null || response.code() == 204) {
+                // returning null if the returnType is not defined,
+                // or the status code is 204 (No Content)
+                if (response.body() != null) {
+                    try {
+                        response.body().close();
+                    } catch (IOException e) {
+                        throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap());
+                    }
+                }
+                return null;
+            } else {
+                return deserialize(response, returnType);
+            }
+        } else {
+            String respBody = null;
+            if (response.body() != null) {
+                try {
+                    respBody = response.body().string();
+                } catch (IOException e) {
+                    throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap());
+                }
+            }
+            throw new ApiException(response.message(), response.code(), response.headers().toMultimap(), respBody);
+        }
+    }
+
+    /**
+     * Build HTTP call with the given options.
+     *
+     * @param path The sub-path of the HTTP URL
+     * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE"
+     * @param queryParams The query parameters
+     * @param collectionQueryParams The collection query parameters
+     * @param body The request body object
+     * @param headerParams The header parameters
+     * @param formParams The form parameters
+     * @param authNames The authentications to apply
+     * @param progressRequestListener Progress request listener
+     * @return The HTTP call
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public Call buildCall(String path, String method, List<Pair> queryParams, List<Pair> collectionQueryParams, Object body, Map<String, String> headerParams, Map<String, Object> formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        Request request = buildRequest(path, method, queryParams, collectionQueryParams, body, headerParams, formParams, authNames, progressRequestListener);
+
+        return httpClient.newCall(request);
+    }
+
+    /**
+     * Build an HTTP request with the given options.
+     *
+     * @param path The sub-path of the HTTP URL
+     * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE"
+     * @param queryParams The query parameters
+     * @param collectionQueryParams The collection query parameters
+     * @param body The request body object
+     * @param headerParams The header parameters
+     * @param formParams The form parameters
+     * @param authNames The authentications to apply
+     * @param progressRequestListener Progress request listener
+     * @return The HTTP request 
+     * @throws ApiException If fail to serialize the request body object
+     */
+    public Request buildRequest(String path, String method, List<Pair> queryParams, List<Pair> collectionQueryParams, Object body, Map<String, String> headerParams, Map<String, Object> formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+        updateParamsForAuth(authNames, queryParams, headerParams);
+
+        final String url = buildUrl(path, queryParams, collectionQueryParams);
+        final Request.Builder reqBuilder = new Request.Builder().url(url);
+        processHeaderParams(headerParams, reqBuilder);
+
+        String contentType = (String) headerParams.get("Content-Type");
+        // ensuring a default content type
+        if (contentType == null) {
+            contentType = "application/json";
+        }
+
+        RequestBody reqBody;
+        if (!HttpMethod.permitsRequestBody(method)) {
+            reqBody = null;
+        } else if ("application/x-www-form-urlencoded".equals(contentType)) {
+            reqBody = buildRequestBodyFormEncoding(formParams);
+        } else if ("multipart/form-data".equals(contentType)) {
+            reqBody = buildRequestBodyMultipart(formParams);
+        } else if (body == null) {
+            if ("DELETE".equals(method)) {
+                // allow calling DELETE without sending a request body
+                reqBody = null;
+            } else {
+                // use an empty request body (for POST, PUT and PATCH)
+                reqBody = RequestBody.create(MediaType.parse(contentType), "");
+            }
+        } else {
+            reqBody = serialize(body, contentType);
+        }
+
+        Request request = null;
+
+        if(progressRequestListener != null && reqBody != null) {
+            ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, progressRequestListener);
+            request = reqBuilder.method(method, progressRequestBody).build();
+        } else {
+            request = reqBuilder.method(method, reqBody).build();
+        }
+
+        return request;
+    }
+
+    /**
+     * Build full URL by concatenating base path, the given sub path and query parameters.
+     *
+     * @param path The sub path
+     * @param queryParams The query parameters
+     * @param collectionQueryParams The collection query parameters
+     * @return The full URL
+     */
+    public String buildUrl(String path, List<Pair> queryParams, List<Pair> collectionQueryParams) {
+        final StringBuilder url = new StringBuilder();
+        url.append(basePath).append(path);
+
+        if (queryParams != null && !queryParams.isEmpty()) {
+            // support (constant) query string in `path`, e.g. "/posts?draft=1"
+            String prefix = path.contains("?") ? "&" : "?";
+            for (Pair param : queryParams) {
+                if (param.getValue() != null) {
+                    if (prefix != null) {
+                        url.append(prefix);
+                        prefix = null;
+                    } else {
+                        url.append("&");
+                    }
+                    String value = parameterToString(param.getValue());
+                    url.append(escapeString(param.getName())).append("=").append(escapeString(value));
+                }
+            }
+        }
+
+        if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) {
+            String prefix = url.toString().contains("?") ? "&" : "?";
+            for (Pair param : collectionQueryParams) {
+                if (param.getValue() != null) {
+                    if (prefix != null) {
+                        url.append(prefix);
+                        prefix = null;
+                    } else {
+                        url.append("&");
+                    }
+                    String value = parameterToString(param.getValue());
+                    // collection query parameter value already escaped as part of parameterToPairs
+                    url.append(escapeString(param.getName())).append("=").append(value);
+                }
+            }
+        }
+
+        return url.toString();
+    }
+
+    /**
+     * Set header parameters to the request builder, including default headers.
+     *
+     * @param headerParams Header parameters in the ofrm of Map
+     * @param reqBuilder Reqeust.Builder
+     */
+    public void processHeaderParams(Map<String, String> headerParams, Request.Builder reqBuilder) {
+        for (Entry<String, String> param : headerParams.entrySet()) {
+            reqBuilder.header(param.getKey(), parameterToString(param.getValue()));
+        }
+        for (Entry<String, String> header : defaultHeaderMap.entrySet()) {
+            if (!headerParams.containsKey(header.getKey())) {
+                reqBuilder.header(header.getKey(), parameterToString(header.getValue()));
+            }
+        }
+    }
+
+    /**
+     * Update query and header parameters based on authentication settings.
+     *
+     * @param authNames The authentications to apply
+     * @param queryParams  List of query parameters
+     * @param headerParams  Map of header parameters
+     */
+    public void updateParamsForAuth(String[] authNames, List<Pair> queryParams, Map<String, String> headerParams) {
+        for (String authName : authNames) {
+            Authentication auth = authentications.get(authName);
+            if (auth == null) throw new RuntimeException("Authentication undefined: " + authName);
+            auth.applyToParams(queryParams, headerParams);
+        }
+    }
+
+    /**
+     * Build a form-encoding request body with the given form parameters.
+     *
+     * @param formParams Form parameters in the form of Map
+     * @return RequestBody
+     */
+    public RequestBody buildRequestBodyFormEncoding(Map<String, Object> formParams) {
+        FormEncodingBuilder formBuilder  = new FormEncodingBuilder();
+        for (Entry<String, Object> param : formParams.entrySet()) {
+            formBuilder.add(param.getKey(), parameterToString(param.getValue()));
+        }
+        return formBuilder.build();
+    }
+
+    /**
+     * Build a multipart (file uploading) request body with the given form parameters,
+     * which could contain text fields and file fields.
+     *
+     * @param formParams Form parameters in the form of Map
+     * @return RequestBody
+     */
+    public RequestBody buildRequestBodyMultipart(Map<String, Object> formParams) {
+        MultipartBuilder mpBuilder = new MultipartBuilder().type(MultipartBuilder.FORM);
+        for (Entry<String, Object> param : formParams.entrySet()) {
+            if (param.getValue() instanceof File) {
+                File file = (File) param.getValue();
+                Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\"; filename=\"" + file.getName() + "\"");
+                MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file));
+                mpBuilder.addPart(partHeaders, RequestBody.create(mediaType, file));
+            } else {
+                Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\"");
+                mpBuilder.addPart(partHeaders, RequestBody.create(null, parameterToString(param.getValue())));
+            }
+        }
+        return mpBuilder.build();
+    }
+
+    /**
+     * Guess Content-Type header from the given file (defaults to "application/octet-stream").
+     *
+     * @param file The given file
+     * @return The guessed Content-Type
+     */
+    public String guessContentTypeFromFile(File file) {
+        String contentType = URLConnection.guessContentTypeFromName(file.getName());
+        if (contentType == null) {
+            return "application/octet-stream";
+        } else {
+            return contentType;
+        }
+    }
+
+    /**
+     * Apply SSL related settings to httpClient according to the current values of
+     * verifyingSsl and sslCaCert.
+     */
+    private void applySslSettings() {
+        try {
+            TrustManager[] trustManagers = null;
+            HostnameVerifier hostnameVerifier = null;
+            if (!verifyingSsl) {
+                TrustManager trustAll = new X509TrustManager() {
+                    @Override
+                    public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {}
+                    @Override
+                    public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {}
+                    @Override
+                    public X509Certificate[] getAcceptedIssuers() { return null; }
+                };
+                SSLContext sslContext = SSLContext.getInstance("TLS");
+                trustManagers = new TrustManager[]{ trustAll };
+                hostnameVerifier = new HostnameVerifier() {
+                    @Override
+                    public boolean verify(String hostname, SSLSession session) { return true; }
+                };
+            } else if (sslCaCert != null) {
+                char[] password = null; // Any password will work.
+                CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509");
+                Collection<? extends Certificate> certificates = certificateFactory.generateCertificates(sslCaCert);
+                if (certificates.isEmpty()) {
+                    throw new IllegalArgumentException("expected non-empty set of trusted certificates");
+                }
+                KeyStore caKeyStore = newEmptyKeyStore(password);
+                int index = 0;
+                for (Certificate certificate : certificates) {
+                    String certificateAlias = "ca" + Integer.toString(index++);
+                    caKeyStore.setCertificateEntry(certificateAlias, certificate);
+                }
+                TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
+                trustManagerFactory.init(caKeyStore);
+                trustManagers = trustManagerFactory.getTrustManagers();
+            }
+
+            if (keyManagers != null || trustManagers != null) {
+                SSLContext sslContext = SSLContext.getInstance("TLS");
+                sslContext.init(keyManagers, trustManagers, new SecureRandom());
+                httpClient.setSslSocketFactory(sslContext.getSocketFactory());
+            } else {
+                httpClient.setSslSocketFactory(null);
+            }
+            httpClient.setHostnameVerifier(hostnameVerifier);
+        } catch (GeneralSecurityException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException {
+        try {
+            KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
+            keyStore.load(null, password);
+            return keyStore;
+        } catch (IOException e) {
+            throw new AssertionError(e);
+        }
+    }
+}

+ 91 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/ApiException.java

@@ -0,0 +1,91 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.invoke;
+
+import java.util.Map;
+import java.util.List;
+
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-09-10T13:42:07.523+02:00")
+public class ApiException extends Exception {
+    private int code = 0;
+    private Map<String, List<String>> responseHeaders = null;
+    private String responseBody = null;
+
+    public ApiException() {}
+
+    public ApiException(Throwable throwable) {
+        super(throwable);
+    }
+
+    public ApiException(String message) {
+        super(message);
+    }
+
+    public ApiException(String message, Throwable throwable, int code, Map<String, List<String>> responseHeaders, String responseBody) {
+        super(message, throwable);
+        this.code = code;
+        this.responseHeaders = responseHeaders;
+        this.responseBody = responseBody;
+    }
+
+    public ApiException(String message, int code, Map<String, List<String>> responseHeaders, String responseBody) {
+        this(message, (Throwable) null, code, responseHeaders, responseBody);
+    }
+
+    public ApiException(String message, Throwable throwable, int code, Map<String, List<String>> responseHeaders) {
+        this(message, throwable, code, responseHeaders, null);
+    }
+
+    public ApiException(int code, Map<String, List<String>> responseHeaders, String responseBody) {
+        this((String) null, (Throwable) null, code, responseHeaders, responseBody);
+    }
+
+    public ApiException(int code, String message) {
+        super(message);
+        this.code = code;
+    }
+
+    public ApiException(int code, String message, Map<String, List<String>> responseHeaders, String responseBody) {
+        this(code, message);
+        this.responseHeaders = responseHeaders;
+        this.responseBody = responseBody;
+    }
+
+    /**
+     * Get the HTTP status code.
+     *
+     * @return HTTP status code
+     */
+    public int getCode() {
+        return code;
+    }
+
+    /**
+     * Get the HTTP response headers.
+     *
+     * @return A map of list of string
+     */
+    public Map<String, List<String>> getResponseHeaders() {
+        return responseHeaders;
+    }
+
+    /**
+     * Get the HTTP response body.
+     *
+     * @return Response body in the form of string
+     */
+    public String getResponseBody() {
+        return responseBody;
+    }
+}

+ 59 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/ApiResponse.java

@@ -0,0 +1,59 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.invoke;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * API response returned by API call.
+ *
+ * @param <T> The type of data that is deserialized from response body
+ */
+public class ApiResponse<T> {
+    final private int statusCode;
+    final private Map<String, List<String>> headers;
+    final private T data;
+
+    /**
+     * @param statusCode The status code of HTTP response
+     * @param headers The headers of HTTP response
+     */
+    public ApiResponse(int statusCode, Map<String, List<String>> headers) {
+        this(statusCode, headers, null);
+    }
+
+    /**
+     * @param statusCode The status code of HTTP response
+     * @param headers The headers of HTTP response
+     * @param data The object deserialized from response bod
+     */
+    public ApiResponse(int statusCode, Map<String, List<String>> headers, T data) {
+        this.statusCode = statusCode;
+        this.headers = headers;
+        this.data = data;
+    }
+
+    public int getStatusCode() {
+        return statusCode;
+    }
+
+    public Map<String, List<String>> getHeaders() {
+        return headers;
+    }
+
+    public T getData() {
+        return data;
+    }
+}

+ 39 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/Configuration.java

@@ -0,0 +1,39 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.invoke;
+
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-09-10T13:42:07.523+02:00")
+public class Configuration {
+    private static ApiClient defaultApiClient = new ApiClient();
+
+    /**
+     * Get the default API client, which would be used when creating API
+     * instances without providing an API client.
+     *
+     * @return Default API client
+     */
+    public static ApiClient getDefaultApiClient() {
+        return defaultApiClient;
+    }
+
+    /**
+     * Set the default API client, which would be used when creating API
+     * instances without providing an API client.
+     *
+     * @param apiClient API client
+     */
+    public static void setDefaultApiClient(ApiClient apiClient) {
+        defaultApiClient = apiClient;
+    }
+}

+ 362 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/JSON.java

@@ -0,0 +1,362 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.invoke;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapter;
+import com.google.gson.internal.bind.util.ISO8601Utils;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import com.google.gson.JsonElement;
+import io.gsonfire.GsonFireBuilder;
+import io.gsonfire.TypeSelector;
+import org.threeten.bp.LocalDate;
+import org.threeten.bp.OffsetDateTime;
+import org.threeten.bp.format.DateTimeFormatter;
+
+import net.p0f.samples.rhpam_fuse_integration.rhpam.model.*;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.lang.reflect.Type;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.ParsePosition;
+import java.util.Date;
+import java.util.Map;
+import java.util.HashMap;
+
+public class JSON {
+    private Gson gson;
+    private boolean isLenientOnJson = false;
+    private DateTypeAdapter dateTypeAdapter = new DateTypeAdapter();
+    private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter();
+    private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter();
+    private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter();
+
+    public static GsonBuilder createGson() {
+        GsonFireBuilder fireBuilder = new GsonFireBuilder()
+        ;
+        return fireBuilder.createGsonBuilder();
+    }
+
+    private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) {
+        JsonElement element = readElement.getAsJsonObject().get(discriminatorField);
+        if(null == element) {
+            throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">");
+        }
+        return element.getAsString();
+    }
+
+    private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) {
+        Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue.toUpperCase());
+        if(null == clazz) {
+            throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">");
+        }
+        return clazz;
+    }
+
+    public JSON() {
+        gson = createGson()
+            .registerTypeAdapter(Date.class, dateTypeAdapter)
+            .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter)
+            .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter)
+            .registerTypeAdapter(LocalDate.class, localDateTypeAdapter)
+            .create();
+    }
+
+    /**
+     * Get Gson.
+     *
+     * @return Gson
+     */
+    public Gson getGson() {
+        return gson;
+    }
+
+    /**
+     * Set Gson.
+     *
+     * @param gson Gson
+     * @return JSON
+     */
+    public JSON setGson(Gson gson) {
+        this.gson = gson;
+        return this;
+    }
+
+    public JSON setLenientOnJson(boolean lenientOnJson) {
+        isLenientOnJson = lenientOnJson;
+        return this;
+    }
+
+    /**
+     * Serialize the given Java object into JSON string.
+     *
+     * @param obj Object
+     * @return String representation of the JSON
+     */
+    public String serialize(Object obj) {
+        return gson.toJson(obj);
+    }
+
+    /**
+     * Deserialize the given JSON string to Java object.
+     *
+     * @param <T>        Type
+     * @param body       The JSON string
+     * @param returnType The type to deserialize into
+     * @return The deserialized Java object
+     */
+    @SuppressWarnings("unchecked")
+    public <T> T deserialize(String body, Type returnType) {
+        try {
+            if (isLenientOnJson) {
+                JsonReader jsonReader = new JsonReader(new StringReader(body));
+                // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean)
+                jsonReader.setLenient(true);
+                return gson.fromJson(jsonReader, returnType);
+            } else {
+                return gson.fromJson(body, returnType);
+            }
+        } catch (JsonParseException e) {
+            // Fallback processing when failed to parse JSON form response body:
+            // return the response body string directly for the String return type;
+            if (returnType.equals(String.class))
+                return (T) body;
+            else throw (e);
+        }
+    }
+
+    /**
+     * Gson TypeAdapter for JSR310 OffsetDateTime type
+     */
+    public static class OffsetDateTimeTypeAdapter extends TypeAdapter<OffsetDateTime> {
+
+        private DateTimeFormatter formatter;
+
+        public OffsetDateTimeTypeAdapter() {
+            this(DateTimeFormatter.ISO_OFFSET_DATE_TIME);
+        }
+
+        public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) {
+            this.formatter = formatter;
+        }
+
+        public void setFormat(DateTimeFormatter dateFormat) {
+            this.formatter = dateFormat;
+        }
+
+        @Override
+        public void write(JsonWriter out, OffsetDateTime date) throws IOException {
+            if (date == null) {
+                out.nullValue();
+            } else {
+                out.value(formatter.format(date));
+            }
+        }
+
+        @Override
+        public OffsetDateTime read(JsonReader in) throws IOException {
+            switch (in.peek()) {
+                case NULL:
+                    in.nextNull();
+                    return null;
+                default:
+                    String date = in.nextString();
+                    if (date.endsWith("+0000")) {
+                        date = date.substring(0, date.length()-5) + "Z";
+                    }
+                    return OffsetDateTime.parse(date, formatter);
+            }
+        }
+    }
+
+    /**
+     * Gson TypeAdapter for JSR310 LocalDate type
+     */
+    public class LocalDateTypeAdapter extends TypeAdapter<LocalDate> {
+
+        private DateTimeFormatter formatter;
+
+        public LocalDateTypeAdapter() {
+            this(DateTimeFormatter.ISO_LOCAL_DATE);
+        }
+
+        public LocalDateTypeAdapter(DateTimeFormatter formatter) {
+            this.formatter = formatter;
+        }
+
+        public void setFormat(DateTimeFormatter dateFormat) {
+            this.formatter = dateFormat;
+        }
+
+        @Override
+        public void write(JsonWriter out, LocalDate date) throws IOException {
+            if (date == null) {
+                out.nullValue();
+            } else {
+                out.value(formatter.format(date));
+            }
+        }
+
+        @Override
+        public LocalDate read(JsonReader in) throws IOException {
+            switch (in.peek()) {
+                case NULL:
+                    in.nextNull();
+                    return null;
+                default:
+                    String date = in.nextString();
+                    return LocalDate.parse(date, formatter);
+            }
+        }
+    }
+
+    public JSON setOffsetDateTimeFormat(DateTimeFormatter dateFormat) {
+        offsetDateTimeTypeAdapter.setFormat(dateFormat);
+        return this;
+    }
+
+    public JSON setLocalDateFormat(DateTimeFormatter dateFormat) {
+        localDateTypeAdapter.setFormat(dateFormat);
+        return this;
+    }
+
+    /**
+     * Gson TypeAdapter for java.sql.Date type
+     * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used
+     * (more efficient than SimpleDateFormat).
+     */
+    public static class SqlDateTypeAdapter extends TypeAdapter<java.sql.Date> {
+
+        private DateFormat dateFormat;
+
+        public SqlDateTypeAdapter() {
+        }
+
+        public SqlDateTypeAdapter(DateFormat dateFormat) {
+            this.dateFormat = dateFormat;
+        }
+
+        public void setFormat(DateFormat dateFormat) {
+            this.dateFormat = dateFormat;
+        }
+
+        @Override
+        public void write(JsonWriter out, java.sql.Date date) throws IOException {
+            if (date == null) {
+                out.nullValue();
+            } else {
+                String value;
+                if (dateFormat != null) {
+                    value = dateFormat.format(date);
+                } else {
+                    value = date.toString();
+                }
+                out.value(value);
+            }
+        }
+
+        @Override
+        public java.sql.Date read(JsonReader in) throws IOException {
+            switch (in.peek()) {
+                case NULL:
+                    in.nextNull();
+                    return null;
+                default:
+                    String date = in.nextString();
+                    try {
+                        if (dateFormat != null) {
+                            return new java.sql.Date(dateFormat.parse(date).getTime());
+                        }
+                        return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime());
+                    } catch (ParseException e) {
+                        throw new JsonParseException(e);
+                    }
+            }
+        }
+    }
+
+    /**
+     * Gson TypeAdapter for java.util.Date type
+     * If the dateFormat is null, ISO8601Utils will be used.
+     */
+    public static class DateTypeAdapter extends TypeAdapter<Date> {
+
+        private DateFormat dateFormat;
+
+        public DateTypeAdapter() {
+        }
+
+        public DateTypeAdapter(DateFormat dateFormat) {
+            this.dateFormat = dateFormat;
+        }
+
+        public void setFormat(DateFormat dateFormat) {
+            this.dateFormat = dateFormat;
+        }
+
+        @Override
+        public void write(JsonWriter out, Date date) throws IOException {
+            if (date == null) {
+                out.nullValue();
+            } else {
+                String value;
+                if (dateFormat != null) {
+                    value = dateFormat.format(date);
+                } else {
+                    value = ISO8601Utils.format(date, true);
+                }
+                out.value(value);
+            }
+        }
+
+        @Override
+        public Date read(JsonReader in) throws IOException {
+            try {
+                switch (in.peek()) {
+                    case NULL:
+                        in.nextNull();
+                        return null;
+                    default:
+                        String date = in.nextString();
+                        try {
+                            if (dateFormat != null) {
+                                return dateFormat.parse(date);
+                            }
+                            return ISO8601Utils.parse(date, new ParsePosition(0));
+                        } catch (ParseException e) {
+                            throw new JsonParseException(e);
+                        }
+                }
+            } catch (IllegalArgumentException e) {
+                throw new JsonParseException(e);
+            }
+        }
+    }
+
+    public JSON setDateFormat(DateFormat dateFormat) {
+        dateTypeAdapter.setFormat(dateFormat);
+        return this;
+    }
+
+    public JSON setSqlDateFormat(DateFormat dateFormat) {
+        sqlDateTypeAdapter.setFormat(dateFormat);
+        return this;
+    }
+
+}

+ 52 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/Pair.java

@@ -0,0 +1,52 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.invoke;
+
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-09-10T13:42:07.523+02:00")
+public class Pair {
+    private String name = "";
+    private String value = "";
+
+    public Pair (String name, String value) {
+        setName(name);
+        setValue(value);
+    }
+
+    private void setName(String name) {
+        if (!isValidString(name)) return;
+
+        this.name = name;
+    }
+
+    private void setValue(String value) {
+        if (!isValidString(value)) return;
+
+        this.value = value;
+    }
+
+    public String getName() {
+        return this.name;
+    }
+
+    public String getValue() {
+        return this.value;
+    }
+
+    private boolean isValidString(String arg) {
+        if (arg == null) return false;
+        if (arg.trim().isEmpty()) return false;
+
+        return true;
+    }
+}

+ 77 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/ProgressRequestBody.java

@@ -0,0 +1,77 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.invoke;
+
+import com.squareup.okhttp.MediaType;
+import com.squareup.okhttp.RequestBody;
+
+import java.io.IOException;
+
+import okio.Buffer;
+import okio.BufferedSink;
+import okio.ForwardingSink;
+import okio.Okio;
+import okio.Sink;
+
+public class ProgressRequestBody extends RequestBody {
+
+    public interface ProgressRequestListener {
+        void onRequestProgress(long bytesWritten, long contentLength, boolean done);
+    }
+
+    private final RequestBody requestBody;
+
+    private final ProgressRequestListener progressListener;
+
+    public ProgressRequestBody(RequestBody requestBody, ProgressRequestListener progressListener) {
+        this.requestBody = requestBody;
+        this.progressListener = progressListener;
+    }
+
+    @Override
+    public MediaType contentType() {
+        return requestBody.contentType();
+    }
+
+    @Override
+    public long contentLength() throws IOException {
+        return requestBody.contentLength();
+    }
+
+    @Override
+    public void writeTo(BufferedSink sink) throws IOException {
+        BufferedSink bufferedSink = Okio.buffer(sink(sink));
+        requestBody.writeTo(bufferedSink);
+        bufferedSink.flush();
+    }
+
+    private Sink sink(Sink sink) {
+        return new ForwardingSink(sink) {
+
+            long bytesWritten = 0L;
+            long contentLength = 0L;
+
+            @Override
+            public void write(Buffer source, long byteCount) throws IOException {
+                super.write(source, byteCount);
+                if (contentLength == 0) {
+                    contentLength = contentLength();
+                }
+
+                bytesWritten += byteCount;
+                progressListener.onRequestProgress(bytesWritten, contentLength, bytesWritten == contentLength);
+            }
+        };
+    }
+}

+ 76 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/ProgressResponseBody.java

@@ -0,0 +1,76 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.invoke;
+
+import com.squareup.okhttp.MediaType;
+import com.squareup.okhttp.ResponseBody;
+
+import java.io.IOException;
+
+import okio.Buffer;
+import okio.BufferedSource;
+import okio.ForwardingSource;
+import okio.Okio;
+import okio.Source;
+
+public class ProgressResponseBody extends ResponseBody {
+
+    public interface ProgressListener {
+        void update(long bytesRead, long contentLength, boolean done);
+    }
+
+    private final ResponseBody responseBody;
+    private final ProgressListener progressListener;
+    private BufferedSource bufferedSource;
+
+    public ProgressResponseBody(ResponseBody responseBody, ProgressListener progressListener) {
+        this.responseBody = responseBody;
+        this.progressListener = progressListener;
+    }
+
+    @Override
+    public MediaType contentType() {
+        return responseBody.contentType();
+    }
+
+    @Override
+    public long contentLength() throws IOException {
+        return responseBody.contentLength();
+    }
+
+    @Override
+    public BufferedSource source() throws IOException {
+        if (bufferedSource == null) {
+            bufferedSource = Okio.buffer(source(responseBody.source()));
+        }
+        return bufferedSource;
+    }
+
+    private Source source(Source source) {
+        return new ForwardingSource(source) {
+            long totalBytesRead = 0L;
+
+            @Override
+            public long read(Buffer sink, long byteCount) throws IOException {
+                long bytesRead = super.read(sink, byteCount);
+                // read() returns the number of bytes read, or -1 if this source is exhausted.
+                totalBytesRead += bytesRead != -1 ? bytesRead : 0;
+                progressListener.update(totalBytesRead, responseBody.contentLength(), bytesRead == -1);
+                return bytesRead;
+            }
+        };
+    }
+}
+
+

+ 55 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/StringUtil.java

@@ -0,0 +1,55 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.invoke;
+
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-09-10T13:42:07.523+02:00")
+public class StringUtil {
+  /**
+   * Check if the given array contains the given value (with case-insensitive comparison).
+   *
+   * @param array The array
+   * @param value The value to search
+   * @return true if the array contains the value
+   */
+  public static boolean containsIgnoreCase(String[] array, String value) {
+    for (String str : array) {
+      if (value == null && str == null) return true;
+      if (value != null && value.equalsIgnoreCase(str)) return true;
+    }
+    return false;
+  }
+
+  /**
+   * Join an array of strings with the given separator.
+   * <p>
+   * Note: This might be replaced by utility method from commons-lang or guava someday
+   * if one of those libraries is added as dependency.
+   * </p>
+   *
+   * @param array     The array of strings
+   * @param separator The separator
+   * @return the resulting string
+   */
+  public static String join(String[] array, String separator) {
+    int len = array.length;
+    if (len == 0) return "";
+
+    StringBuilder out = new StringBuilder();
+    out.append(array[0]);
+    for (int i = 1; i < len; i++) {
+      out.append(separator).append(array[i]);
+    }
+    return out.toString();
+  }
+}

+ 75 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/auth/ApiKeyAuth.java

@@ -0,0 +1,75 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.auth;
+
+import net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.Pair;
+
+import java.util.Map;
+import java.util.List;
+
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-09-10T13:42:07.523+02:00")
+public class ApiKeyAuth implements Authentication {
+  private final String location;
+  private final String paramName;
+
+  private String apiKey;
+  private String apiKeyPrefix;
+
+  public ApiKeyAuth(String location, String paramName) {
+    this.location = location;
+    this.paramName = paramName;
+  }
+
+  public String getLocation() {
+    return location;
+  }
+
+  public String getParamName() {
+    return paramName;
+  }
+
+  public String getApiKey() {
+    return apiKey;
+  }
+
+  public void setApiKey(String apiKey) {
+    this.apiKey = apiKey;
+  }
+
+  public String getApiKeyPrefix() {
+    return apiKeyPrefix;
+  }
+
+  public void setApiKeyPrefix(String apiKeyPrefix) {
+    this.apiKeyPrefix = apiKeyPrefix;
+  }
+
+  @Override
+  public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams) {
+    if (apiKey == null) {
+      return;
+    }
+    String value;
+    if (apiKeyPrefix != null) {
+      value = apiKeyPrefix + " " + apiKey;
+    } else {
+      value = apiKey;
+    }
+    if ("query".equals(location)) {
+      queryParams.add(new Pair(paramName, value));
+    } else if ("header".equals(location)) {
+      headerParams.put(paramName, value);
+    }
+  }
+}

+ 29 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/auth/Authentication.java

@@ -0,0 +1,29 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.auth;
+
+import net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.Pair;
+
+import java.util.Map;
+import java.util.List;
+
+public interface Authentication {
+    /**
+     * Apply authentication settings to header and query params.
+     *
+     * @param queryParams List of query parameters
+     * @param headerParams Map of header parameters
+     */
+    void applyToParams(List<Pair> queryParams, Map<String, String> headerParams);
+}

+ 54 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/auth/HttpBasicAuth.java

@@ -0,0 +1,54 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.auth;
+
+import net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.Pair;
+
+import com.squareup.okhttp.Credentials;
+
+import java.util.Map;
+import java.util.List;
+
+import java.io.UnsupportedEncodingException;
+
+public class HttpBasicAuth implements Authentication {
+    private String username;
+    private String password;
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    @Override
+    public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams) {
+        if (username == null && password == null) {
+            return;
+        }
+        headerParams.put("Authorization", Credentials.basic(
+            username == null ? "" : username,
+            password == null ? "" : password));
+    }
+}

+ 39 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/invoke/auth/OAuth.java

@@ -0,0 +1,39 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.auth;
+
+import net.p0f.samples.rhpam_fuse_integration.rhpam.invoke.Pair;
+
+import java.util.Map;
+import java.util.List;
+
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-09-10T13:42:07.523+02:00")
+public class OAuth implements Authentication {
+  private String accessToken;
+
+  public String getAccessToken() {
+    return accessToken;
+  }
+
+  public void setAccessToken(String accessToken) {
+    this.accessToken = accessToken;
+  }
+
+  @Override
+  public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams) {
+    if (accessToken != null) {
+      headerParams.put("Authorization", "Bearer " + accessToken);
+    }
+  }
+}

+ 162 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/NodeDefinition.java

@@ -0,0 +1,162 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+
+/**
+ * NodeDefinition
+ */
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-09-10T13:42:07.523+02:00")
+public class NodeDefinition {
+  @SerializedName("id")
+  private Long id = null;
+
+  @SerializedName("name")
+  private String name = null;
+
+  @SerializedName("unique-id")
+  private String uniqueId = null;
+
+  @SerializedName("type")
+  private String type = null;
+
+  public NodeDefinition id(Long id) {
+    this.id = id;
+    return this;
+  }
+
+   /**
+   * Get id
+   * @return id
+  **/
+  @ApiModelProperty(value = "")
+  public Long getId() {
+    return id;
+  }
+
+  public void setId(Long id) {
+    this.id = id;
+  }
+
+  public NodeDefinition name(String name) {
+    this.name = name;
+    return this;
+  }
+
+   /**
+   * Get name
+   * @return name
+  **/
+  @ApiModelProperty(value = "")
+  public String getName() {
+    return name;
+  }
+
+  public void setName(String name) {
+    this.name = name;
+  }
+
+  public NodeDefinition uniqueId(String uniqueId) {
+    this.uniqueId = uniqueId;
+    return this;
+  }
+
+   /**
+   * Get uniqueId
+   * @return uniqueId
+  **/
+  @ApiModelProperty(value = "")
+  public String getUniqueId() {
+    return uniqueId;
+  }
+
+  public void setUniqueId(String uniqueId) {
+    this.uniqueId = uniqueId;
+  }
+
+  public NodeDefinition type(String type) {
+    this.type = type;
+    return this;
+  }
+
+   /**
+   * Get type
+   * @return type
+  **/
+  @ApiModelProperty(value = "")
+  public String getType() {
+    return type;
+  }
+
+  public void setType(String type) {
+    this.type = type;
+  }
+
+
+  @Override
+  public boolean equals(java.lang.Object o) {
+    if (this == o) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
+    NodeDefinition nodeDefinition = (NodeDefinition) o;
+    return Objects.equals(this.id, nodeDefinition.id) &&
+        Objects.equals(this.name, nodeDefinition.name) &&
+        Objects.equals(this.uniqueId, nodeDefinition.uniqueId) &&
+        Objects.equals(this.type, nodeDefinition.type);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(id, name, uniqueId, type);
+  }
+
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder();
+    sb.append("class NodeDefinition {\n");
+    
+    sb.append("    id: ").append(toIndentedString(id)).append("\n");
+    sb.append("    name: ").append(toIndentedString(name)).append("\n");
+    sb.append("    uniqueId: ").append(toIndentedString(uniqueId)).append("\n");
+    sb.append("    type: ").append(toIndentedString(type)).append("\n");
+    sb.append("}");
+    return sb.toString();
+  }
+
+  /**
+   * Convert the given object to string with each line indented by 4 spaces
+   * (except the first line).
+   */
+  private String toIndentedString(java.lang.Object o) {
+    if (o == null) {
+      return "null";
+    }
+    return o.toString().replace("\n", "\n    ");
+  }
+
+}
+

+ 370 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/NodeInstance.java

@@ -0,0 +1,370 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import org.threeten.bp.OffsetDateTime;
+
+/**
+ * NodeInstance
+ */
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-09-10T13:42:07.523+02:00")
+public class NodeInstance {
+  @SerializedName("node-instance-id")
+  private Long nodeInstanceId = null;
+
+  @SerializedName("node-name")
+  private String nodeName = null;
+
+  @SerializedName("process-instance-id")
+  private Long processInstanceId = null;
+
+  @SerializedName("work-item-id")
+  private Long workItemId = null;
+
+  @SerializedName("container-id")
+  private String containerId = null;
+
+  @SerializedName("start-date")
+  private OffsetDateTime startDate = null;
+
+  @SerializedName("node-id")
+  private String nodeId = null;
+
+  @SerializedName("node-type")
+  private String nodeType = null;
+
+  @SerializedName("node-connection")
+  private String nodeConnection = null;
+
+  @SerializedName("node-completed")
+  private Boolean nodeCompleted = null;
+
+  @SerializedName("reference-id")
+  private Long referenceId = null;
+
+  @SerializedName("sla-compliance")
+  private Integer slaCompliance = null;
+
+  @SerializedName("sla-due-date")
+  private OffsetDateTime slaDueDate = null;
+
+  public NodeInstance nodeInstanceId(Long nodeInstanceId) {
+    this.nodeInstanceId = nodeInstanceId;
+    return this;
+  }
+
+   /**
+   * Get nodeInstanceId
+   * @return nodeInstanceId
+  **/
+  @ApiModelProperty(value = "")
+  public Long getNodeInstanceId() {
+    return nodeInstanceId;
+  }
+
+  public void setNodeInstanceId(Long nodeInstanceId) {
+    this.nodeInstanceId = nodeInstanceId;
+  }
+
+  public NodeInstance nodeName(String nodeName) {
+    this.nodeName = nodeName;
+    return this;
+  }
+
+   /**
+   * Get nodeName
+   * @return nodeName
+  **/
+  @ApiModelProperty(value = "")
+  public String getNodeName() {
+    return nodeName;
+  }
+
+  public void setNodeName(String nodeName) {
+    this.nodeName = nodeName;
+  }
+
+  public NodeInstance processInstanceId(Long processInstanceId) {
+    this.processInstanceId = processInstanceId;
+    return this;
+  }
+
+   /**
+   * Get processInstanceId
+   * @return processInstanceId
+  **/
+  @ApiModelProperty(value = "")
+  public Long getProcessInstanceId() {
+    return processInstanceId;
+  }
+
+  public void setProcessInstanceId(Long processInstanceId) {
+    this.processInstanceId = processInstanceId;
+  }
+
+  public NodeInstance workItemId(Long workItemId) {
+    this.workItemId = workItemId;
+    return this;
+  }
+
+   /**
+   * Get workItemId
+   * @return workItemId
+  **/
+  @ApiModelProperty(value = "")
+  public Long getWorkItemId() {
+    return workItemId;
+  }
+
+  public void setWorkItemId(Long workItemId) {
+    this.workItemId = workItemId;
+  }
+
+  public NodeInstance containerId(String containerId) {
+    this.containerId = containerId;
+    return this;
+  }
+
+   /**
+   * Get containerId
+   * @return containerId
+  **/
+  @ApiModelProperty(value = "")
+  public String getContainerId() {
+    return containerId;
+  }
+
+  public void setContainerId(String containerId) {
+    this.containerId = containerId;
+  }
+
+  public NodeInstance startDate(OffsetDateTime startDate) {
+    this.startDate = startDate;
+    return this;
+  }
+
+   /**
+   * Get startDate
+   * @return startDate
+  **/
+  @ApiModelProperty(value = "")
+  public OffsetDateTime getStartDate() {
+    return startDate;
+  }
+
+  public void setStartDate(OffsetDateTime startDate) {
+    this.startDate = startDate;
+  }
+
+  public NodeInstance nodeId(String nodeId) {
+    this.nodeId = nodeId;
+    return this;
+  }
+
+   /**
+   * Get nodeId
+   * @return nodeId
+  **/
+  @ApiModelProperty(value = "")
+  public String getNodeId() {
+    return nodeId;
+  }
+
+  public void setNodeId(String nodeId) {
+    this.nodeId = nodeId;
+  }
+
+  public NodeInstance nodeType(String nodeType) {
+    this.nodeType = nodeType;
+    return this;
+  }
+
+   /**
+   * Get nodeType
+   * @return nodeType
+  **/
+  @ApiModelProperty(value = "")
+  public String getNodeType() {
+    return nodeType;
+  }
+
+  public void setNodeType(String nodeType) {
+    this.nodeType = nodeType;
+  }
+
+  public NodeInstance nodeConnection(String nodeConnection) {
+    this.nodeConnection = nodeConnection;
+    return this;
+  }
+
+   /**
+   * Get nodeConnection
+   * @return nodeConnection
+  **/
+  @ApiModelProperty(value = "")
+  public String getNodeConnection() {
+    return nodeConnection;
+  }
+
+  public void setNodeConnection(String nodeConnection) {
+    this.nodeConnection = nodeConnection;
+  }
+
+  public NodeInstance nodeCompleted(Boolean nodeCompleted) {
+    this.nodeCompleted = nodeCompleted;
+    return this;
+  }
+
+   /**
+   * Get nodeCompleted
+   * @return nodeCompleted
+  **/
+  @ApiModelProperty(value = "")
+  public Boolean isNodeCompleted() {
+    return nodeCompleted;
+  }
+
+  public void setNodeCompleted(Boolean nodeCompleted) {
+    this.nodeCompleted = nodeCompleted;
+  }
+
+  public NodeInstance referenceId(Long referenceId) {
+    this.referenceId = referenceId;
+    return this;
+  }
+
+   /**
+   * Get referenceId
+   * @return referenceId
+  **/
+  @ApiModelProperty(value = "")
+  public Long getReferenceId() {
+    return referenceId;
+  }
+
+  public void setReferenceId(Long referenceId) {
+    this.referenceId = referenceId;
+  }
+
+  public NodeInstance slaCompliance(Integer slaCompliance) {
+    this.slaCompliance = slaCompliance;
+    return this;
+  }
+
+   /**
+   * Get slaCompliance
+   * @return slaCompliance
+  **/
+  @ApiModelProperty(value = "")
+  public Integer getSlaCompliance() {
+    return slaCompliance;
+  }
+
+  public void setSlaCompliance(Integer slaCompliance) {
+    this.slaCompliance = slaCompliance;
+  }
+
+  public NodeInstance slaDueDate(OffsetDateTime slaDueDate) {
+    this.slaDueDate = slaDueDate;
+    return this;
+  }
+
+   /**
+   * Get slaDueDate
+   * @return slaDueDate
+  **/
+  @ApiModelProperty(value = "")
+  public OffsetDateTime getSlaDueDate() {
+    return slaDueDate;
+  }
+
+  public void setSlaDueDate(OffsetDateTime slaDueDate) {
+    this.slaDueDate = slaDueDate;
+  }
+
+
+  @Override
+  public boolean equals(java.lang.Object o) {
+    if (this == o) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
+    NodeInstance nodeInstance = (NodeInstance) o;
+    return Objects.equals(this.nodeInstanceId, nodeInstance.nodeInstanceId) &&
+        Objects.equals(this.nodeName, nodeInstance.nodeName) &&
+        Objects.equals(this.processInstanceId, nodeInstance.processInstanceId) &&
+        Objects.equals(this.workItemId, nodeInstance.workItemId) &&
+        Objects.equals(this.containerId, nodeInstance.containerId) &&
+        Objects.equals(this.startDate, nodeInstance.startDate) &&
+        Objects.equals(this.nodeId, nodeInstance.nodeId) &&
+        Objects.equals(this.nodeType, nodeInstance.nodeType) &&
+        Objects.equals(this.nodeConnection, nodeInstance.nodeConnection) &&
+        Objects.equals(this.nodeCompleted, nodeInstance.nodeCompleted) &&
+        Objects.equals(this.referenceId, nodeInstance.referenceId) &&
+        Objects.equals(this.slaCompliance, nodeInstance.slaCompliance) &&
+        Objects.equals(this.slaDueDate, nodeInstance.slaDueDate);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(nodeInstanceId, nodeName, processInstanceId, workItemId, containerId, startDate, nodeId, nodeType, nodeConnection, nodeCompleted, referenceId, slaCompliance, slaDueDate);
+  }
+
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder();
+    sb.append("class NodeInstance {\n");
+    
+    sb.append("    nodeInstanceId: ").append(toIndentedString(nodeInstanceId)).append("\n");
+    sb.append("    nodeName: ").append(toIndentedString(nodeName)).append("\n");
+    sb.append("    processInstanceId: ").append(toIndentedString(processInstanceId)).append("\n");
+    sb.append("    workItemId: ").append(toIndentedString(workItemId)).append("\n");
+    sb.append("    containerId: ").append(toIndentedString(containerId)).append("\n");
+    sb.append("    startDate: ").append(toIndentedString(startDate)).append("\n");
+    sb.append("    nodeId: ").append(toIndentedString(nodeId)).append("\n");
+    sb.append("    nodeType: ").append(toIndentedString(nodeType)).append("\n");
+    sb.append("    nodeConnection: ").append(toIndentedString(nodeConnection)).append("\n");
+    sb.append("    nodeCompleted: ").append(toIndentedString(nodeCompleted)).append("\n");
+    sb.append("    referenceId: ").append(toIndentedString(referenceId)).append("\n");
+    sb.append("    slaCompliance: ").append(toIndentedString(slaCompliance)).append("\n");
+    sb.append("    slaDueDate: ").append(toIndentedString(slaDueDate)).append("\n");
+    sb.append("}");
+    return sb.toString();
+  }
+
+  /**
+   * Convert the given object to string with each line indented by 4 spaces
+   * (except the first line).
+   */
+  private String toIndentedString(java.lang.Object o) {
+    if (o == null) {
+      return "null";
+    }
+    return o.toString().replace("\n", "\n    ");
+  }
+
+}
+

+ 104 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/NodeInstanceList.java

@@ -0,0 +1,104 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.model.NodeInstance;
+
+/**
+ * NodeInstanceList
+ */
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-09-10T13:42:07.523+02:00")
+public class NodeInstanceList {
+  @SerializedName("node-instance")
+  private List<NodeInstance> nodeInstance = null;
+
+  public NodeInstanceList nodeInstance(List<NodeInstance> nodeInstance) {
+    this.nodeInstance = nodeInstance;
+    return this;
+  }
+
+  public NodeInstanceList addNodeInstanceItem(NodeInstance nodeInstanceItem) {
+    if (this.nodeInstance == null) {
+      this.nodeInstance = new ArrayList<NodeInstance>();
+    }
+    this.nodeInstance.add(nodeInstanceItem);
+    return this;
+  }
+
+   /**
+   * Get nodeInstance
+   * @return nodeInstance
+  **/
+  @ApiModelProperty(value = "")
+  public List<NodeInstance> getNodeInstance() {
+    return nodeInstance;
+  }
+
+  public void setNodeInstance(List<NodeInstance> nodeInstance) {
+    this.nodeInstance = nodeInstance;
+  }
+
+
+  @Override
+  public boolean equals(java.lang.Object o) {
+    if (this == o) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
+    NodeInstanceList nodeInstanceList = (NodeInstanceList) o;
+    return Objects.equals(this.nodeInstance, nodeInstanceList.nodeInstance);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(nodeInstance);
+  }
+
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder();
+    sb.append("class NodeInstanceList {\n");
+    
+    sb.append("    nodeInstance: ").append(toIndentedString(nodeInstance)).append("\n");
+    sb.append("}");
+    return sb.toString();
+  }
+
+  /**
+   * Convert the given object to string with each line indented by 4 spaces
+   * (except the first line).
+   */
+  private String toIndentedString(java.lang.Object o) {
+    if (o == null) {
+      return "null";
+    }
+    return o.toString().replace("\n", "\n    ");
+  }
+
+}
+

+ 431 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/ProcessDefinition.java

@@ -0,0 +1,431 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.model.NodeDefinition;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.model.TimerDefinition;
+
+/**
+ * ProcessDefinition
+ */
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-09-10T13:42:07.523+02:00")
+public class ProcessDefinition {
+  @SerializedName("associatedEntities")
+  private Map<String, List<String>> associatedEntities = null;
+
+  @SerializedName("serviceTasks")
+  private Map<String, String> serviceTasks = null;
+
+  @SerializedName("processVariables")
+  private Map<String, String> processVariables = null;
+
+  @SerializedName("reusableSubProcesses")
+  private List<String> reusableSubProcesses = null;
+
+  @SerializedName("nodes")
+  private List<NodeDefinition> nodes = null;
+
+  @SerializedName("timers")
+  private List<TimerDefinition> timers = null;
+
+  @SerializedName("tagsByVariable")
+  private Map<String, List<String>> tagsByVariable = null;
+
+  @SerializedName("process-id")
+  private String processId = null;
+
+  @SerializedName("process-name")
+  private String processName = null;
+
+  @SerializedName("process-version")
+  private String processVersion = null;
+
+  @SerializedName("package")
+  private String _package = null;
+
+  @SerializedName("container-id")
+  private String containerId = null;
+
+  @SerializedName("dynamic")
+  private Boolean dynamic = null;
+
+  public ProcessDefinition associatedEntities(Map<String, List<String>> associatedEntities) {
+    this.associatedEntities = associatedEntities;
+    return this;
+  }
+
+  public ProcessDefinition putAssociatedEntitiesItem(String key, List<String> associatedEntitiesItem) {
+    if (this.associatedEntities == null) {
+      this.associatedEntities = new HashMap<String, List<String>>();
+    }
+    this.associatedEntities.put(key, associatedEntitiesItem);
+    return this;
+  }
+
+   /**
+   * Get associatedEntities
+   * @return associatedEntities
+  **/
+  @ApiModelProperty(value = "")
+  public Map<String, List<String>> getAssociatedEntities() {
+    return associatedEntities;
+  }
+
+  public void setAssociatedEntities(Map<String, List<String>> associatedEntities) {
+    this.associatedEntities = associatedEntities;
+  }
+
+  public ProcessDefinition serviceTasks(Map<String, String> serviceTasks) {
+    this.serviceTasks = serviceTasks;
+    return this;
+  }
+
+  public ProcessDefinition putServiceTasksItem(String key, String serviceTasksItem) {
+    if (this.serviceTasks == null) {
+      this.serviceTasks = new HashMap<String, String>();
+    }
+    this.serviceTasks.put(key, serviceTasksItem);
+    return this;
+  }
+
+   /**
+   * Get serviceTasks
+   * @return serviceTasks
+  **/
+  @ApiModelProperty(value = "")
+  public Map<String, String> getServiceTasks() {
+    return serviceTasks;
+  }
+
+  public void setServiceTasks(Map<String, String> serviceTasks) {
+    this.serviceTasks = serviceTasks;
+  }
+
+  public ProcessDefinition processVariables(Map<String, String> processVariables) {
+    this.processVariables = processVariables;
+    return this;
+  }
+
+  public ProcessDefinition putProcessVariablesItem(String key, String processVariablesItem) {
+    if (this.processVariables == null) {
+      this.processVariables = new HashMap<String, String>();
+    }
+    this.processVariables.put(key, processVariablesItem);
+    return this;
+  }
+
+   /**
+   * Get processVariables
+   * @return processVariables
+  **/
+  @ApiModelProperty(value = "")
+  public Map<String, String> getProcessVariables() {
+    return processVariables;
+  }
+
+  public void setProcessVariables(Map<String, String> processVariables) {
+    this.processVariables = processVariables;
+  }
+
+  public ProcessDefinition reusableSubProcesses(List<String> reusableSubProcesses) {
+    this.reusableSubProcesses = reusableSubProcesses;
+    return this;
+  }
+
+  public ProcessDefinition addReusableSubProcessesItem(String reusableSubProcessesItem) {
+    if (this.reusableSubProcesses == null) {
+      this.reusableSubProcesses = new ArrayList<String>();
+    }
+    this.reusableSubProcesses.add(reusableSubProcessesItem);
+    return this;
+  }
+
+   /**
+   * Get reusableSubProcesses
+   * @return reusableSubProcesses
+  **/
+  @ApiModelProperty(value = "")
+  public List<String> getReusableSubProcesses() {
+    return reusableSubProcesses;
+  }
+
+  public void setReusableSubProcesses(List<String> reusableSubProcesses) {
+    this.reusableSubProcesses = reusableSubProcesses;
+  }
+
+  public ProcessDefinition nodes(List<NodeDefinition> nodes) {
+    this.nodes = nodes;
+    return this;
+  }
+
+  public ProcessDefinition addNodesItem(NodeDefinition nodesItem) {
+    if (this.nodes == null) {
+      this.nodes = new ArrayList<NodeDefinition>();
+    }
+    this.nodes.add(nodesItem);
+    return this;
+  }
+
+   /**
+   * Get nodes
+   * @return nodes
+  **/
+  @ApiModelProperty(value = "")
+  public List<NodeDefinition> getNodes() {
+    return nodes;
+  }
+
+  public void setNodes(List<NodeDefinition> nodes) {
+    this.nodes = nodes;
+  }
+
+  public ProcessDefinition timers(List<TimerDefinition> timers) {
+    this.timers = timers;
+    return this;
+  }
+
+  public ProcessDefinition addTimersItem(TimerDefinition timersItem) {
+    if (this.timers == null) {
+      this.timers = new ArrayList<TimerDefinition>();
+    }
+    this.timers.add(timersItem);
+    return this;
+  }
+
+   /**
+   * Get timers
+   * @return timers
+  **/
+  @ApiModelProperty(value = "")
+  public List<TimerDefinition> getTimers() {
+    return timers;
+  }
+
+  public void setTimers(List<TimerDefinition> timers) {
+    this.timers = timers;
+  }
+
+  public ProcessDefinition tagsByVariable(Map<String, List<String>> tagsByVariable) {
+    this.tagsByVariable = tagsByVariable;
+    return this;
+  }
+
+  public ProcessDefinition putTagsByVariableItem(String key, List<String> tagsByVariableItem) {
+    if (this.tagsByVariable == null) {
+      this.tagsByVariable = new HashMap<String, List<String>>();
+    }
+    this.tagsByVariable.put(key, tagsByVariableItem);
+    return this;
+  }
+
+   /**
+   * Get tagsByVariable
+   * @return tagsByVariable
+  **/
+  @ApiModelProperty(value = "")
+  public Map<String, List<String>> getTagsByVariable() {
+    return tagsByVariable;
+  }
+
+  public void setTagsByVariable(Map<String, List<String>> tagsByVariable) {
+    this.tagsByVariable = tagsByVariable;
+  }
+
+  public ProcessDefinition processId(String processId) {
+    this.processId = processId;
+    return this;
+  }
+
+   /**
+   * Get processId
+   * @return processId
+  **/
+  @ApiModelProperty(value = "")
+  public String getProcessId() {
+    return processId;
+  }
+
+  public void setProcessId(String processId) {
+    this.processId = processId;
+  }
+
+  public ProcessDefinition processName(String processName) {
+    this.processName = processName;
+    return this;
+  }
+
+   /**
+   * Get processName
+   * @return processName
+  **/
+  @ApiModelProperty(value = "")
+  public String getProcessName() {
+    return processName;
+  }
+
+  public void setProcessName(String processName) {
+    this.processName = processName;
+  }
+
+  public ProcessDefinition processVersion(String processVersion) {
+    this.processVersion = processVersion;
+    return this;
+  }
+
+   /**
+   * Get processVersion
+   * @return processVersion
+  **/
+  @ApiModelProperty(value = "")
+  public String getProcessVersion() {
+    return processVersion;
+  }
+
+  public void setProcessVersion(String processVersion) {
+    this.processVersion = processVersion;
+  }
+
+  public ProcessDefinition _package(String _package) {
+    this._package = _package;
+    return this;
+  }
+
+   /**
+   * Get _package
+   * @return _package
+  **/
+  @ApiModelProperty(value = "")
+  public String getPackage() {
+    return _package;
+  }
+
+  public void setPackage(String _package) {
+    this._package = _package;
+  }
+
+  public ProcessDefinition containerId(String containerId) {
+    this.containerId = containerId;
+    return this;
+  }
+
+   /**
+   * Get containerId
+   * @return containerId
+  **/
+  @ApiModelProperty(value = "")
+  public String getContainerId() {
+    return containerId;
+  }
+
+  public void setContainerId(String containerId) {
+    this.containerId = containerId;
+  }
+
+  public ProcessDefinition dynamic(Boolean dynamic) {
+    this.dynamic = dynamic;
+    return this;
+  }
+
+   /**
+   * Get dynamic
+   * @return dynamic
+  **/
+  @ApiModelProperty(value = "")
+  public Boolean isDynamic() {
+    return dynamic;
+  }
+
+  public void setDynamic(Boolean dynamic) {
+    this.dynamic = dynamic;
+  }
+
+
+  @Override
+  public boolean equals(java.lang.Object o) {
+    if (this == o) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
+    ProcessDefinition processDefinition = (ProcessDefinition) o;
+    return Objects.equals(this.associatedEntities, processDefinition.associatedEntities) &&
+        Objects.equals(this.serviceTasks, processDefinition.serviceTasks) &&
+        Objects.equals(this.processVariables, processDefinition.processVariables) &&
+        Objects.equals(this.reusableSubProcesses, processDefinition.reusableSubProcesses) &&
+        Objects.equals(this.nodes, processDefinition.nodes) &&
+        Objects.equals(this.timers, processDefinition.timers) &&
+        Objects.equals(this.tagsByVariable, processDefinition.tagsByVariable) &&
+        Objects.equals(this.processId, processDefinition.processId) &&
+        Objects.equals(this.processName, processDefinition.processName) &&
+        Objects.equals(this.processVersion, processDefinition.processVersion) &&
+        Objects.equals(this._package, processDefinition._package) &&
+        Objects.equals(this.containerId, processDefinition.containerId) &&
+        Objects.equals(this.dynamic, processDefinition.dynamic);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(associatedEntities, serviceTasks, processVariables, reusableSubProcesses, nodes, timers, tagsByVariable, processId, processName, processVersion, _package, containerId, dynamic);
+  }
+
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder();
+    sb.append("class ProcessDefinition {\n");
+    
+    sb.append("    associatedEntities: ").append(toIndentedString(associatedEntities)).append("\n");
+    sb.append("    serviceTasks: ").append(toIndentedString(serviceTasks)).append("\n");
+    sb.append("    processVariables: ").append(toIndentedString(processVariables)).append("\n");
+    sb.append("    reusableSubProcesses: ").append(toIndentedString(reusableSubProcesses)).append("\n");
+    sb.append("    nodes: ").append(toIndentedString(nodes)).append("\n");
+    sb.append("    timers: ").append(toIndentedString(timers)).append("\n");
+    sb.append("    tagsByVariable: ").append(toIndentedString(tagsByVariable)).append("\n");
+    sb.append("    processId: ").append(toIndentedString(processId)).append("\n");
+    sb.append("    processName: ").append(toIndentedString(processName)).append("\n");
+    sb.append("    processVersion: ").append(toIndentedString(processVersion)).append("\n");
+    sb.append("    _package: ").append(toIndentedString(_package)).append("\n");
+    sb.append("    containerId: ").append(toIndentedString(containerId)).append("\n");
+    sb.append("    dynamic: ").append(toIndentedString(dynamic)).append("\n");
+    sb.append("}");
+    return sb.toString();
+  }
+
+  /**
+   * Convert the given object to string with each line indented by 4 spaces
+   * (except the first line).
+   */
+  private String toIndentedString(java.lang.Object o) {
+    if (o == null) {
+      return "null";
+    }
+    return o.toString().replace("\n", "\n    ");
+  }
+
+}
+

+ 104 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/ProcessDefinitions.java

@@ -0,0 +1,104 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.model.ProcessDefinition;
+
+/**
+ * ProcessDefinitions
+ */
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-09-10T13:42:07.523+02:00")
+public class ProcessDefinitions {
+  @SerializedName("processes")
+  private List<ProcessDefinition> processes = null;
+
+  public ProcessDefinitions processes(List<ProcessDefinition> processes) {
+    this.processes = processes;
+    return this;
+  }
+
+  public ProcessDefinitions addProcessesItem(ProcessDefinition processesItem) {
+    if (this.processes == null) {
+      this.processes = new ArrayList<ProcessDefinition>();
+    }
+    this.processes.add(processesItem);
+    return this;
+  }
+
+   /**
+   * Get processes
+   * @return processes
+  **/
+  @ApiModelProperty(value = "")
+  public List<ProcessDefinition> getProcesses() {
+    return processes;
+  }
+
+  public void setProcesses(List<ProcessDefinition> processes) {
+    this.processes = processes;
+  }
+
+
+  @Override
+  public boolean equals(java.lang.Object o) {
+    if (this == o) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
+    ProcessDefinitions processDefinitions = (ProcessDefinitions) o;
+    return Objects.equals(this.processes, processDefinitions.processes);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(processes);
+  }
+
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder();
+    sb.append("class ProcessDefinitions {\n");
+    
+    sb.append("    processes: ").append(toIndentedString(processes)).append("\n");
+    sb.append("}");
+    return sb.toString();
+  }
+
+  /**
+   * Convert the given object to string with each line indented by 4 spaces
+   * (except the first line).
+   */
+  private String toIndentedString(java.lang.Object o) {
+    if (o == null) {
+      return "null";
+    }
+    return o.toString().replace("\n", "\n    ");
+  }
+
+}
+

+ 428 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/ProcessInstance.java

@@ -0,0 +1,428 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.model.TaskSummaryList;
+import org.threeten.bp.OffsetDateTime;
+
+/**
+ * ProcessInstance
+ */
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-09-10T13:42:07.523+02:00")
+public class ProcessInstance {
+  @SerializedName("process-instance-id")
+  private Long processInstanceId = null;
+
+  @SerializedName("process-id")
+  private String processId = null;
+
+  @SerializedName("process-name")
+  private String processName = null;
+
+  @SerializedName("process-version")
+  private String processVersion = null;
+
+  @SerializedName("process-instance-state")
+  private Integer processInstanceState = null;
+
+  @SerializedName("container-id")
+  private String containerId = null;
+
+  @SerializedName("initiator")
+  private String initiator = null;
+
+  @SerializedName("start-date")
+  private OffsetDateTime startDate = null;
+
+  @SerializedName("process-instance-desc")
+  private String processInstanceDesc = null;
+
+  @SerializedName("correlation-key")
+  private String correlationKey = null;
+
+  @SerializedName("parent-instance-id")
+  private Long parentInstanceId = null;
+
+  @SerializedName("sla-compliance")
+  private Integer slaCompliance = null;
+
+  @SerializedName("sla-due-date")
+  private OffsetDateTime slaDueDate = null;
+
+  @SerializedName("active-user-tasks")
+  private TaskSummaryList activeUserTasks = null;
+
+  @SerializedName("process-instance-variables")
+  private Map<String, Object> processInstanceVariables = null;
+
+  public ProcessInstance processInstanceId(Long processInstanceId) {
+    this.processInstanceId = processInstanceId;
+    return this;
+  }
+
+   /**
+   * Get processInstanceId
+   * @return processInstanceId
+  **/
+  @ApiModelProperty(value = "")
+  public Long getProcessInstanceId() {
+    return processInstanceId;
+  }
+
+  public void setProcessInstanceId(Long processInstanceId) {
+    this.processInstanceId = processInstanceId;
+  }
+
+  public ProcessInstance processId(String processId) {
+    this.processId = processId;
+    return this;
+  }
+
+   /**
+   * Get processId
+   * @return processId
+  **/
+  @ApiModelProperty(value = "")
+  public String getProcessId() {
+    return processId;
+  }
+
+  public void setProcessId(String processId) {
+    this.processId = processId;
+  }
+
+  public ProcessInstance processName(String processName) {
+    this.processName = processName;
+    return this;
+  }
+
+   /**
+   * Get processName
+   * @return processName
+  **/
+  @ApiModelProperty(value = "")
+  public String getProcessName() {
+    return processName;
+  }
+
+  public void setProcessName(String processName) {
+    this.processName = processName;
+  }
+
+  public ProcessInstance processVersion(String processVersion) {
+    this.processVersion = processVersion;
+    return this;
+  }
+
+   /**
+   * Get processVersion
+   * @return processVersion
+  **/
+  @ApiModelProperty(value = "")
+  public String getProcessVersion() {
+    return processVersion;
+  }
+
+  public void setProcessVersion(String processVersion) {
+    this.processVersion = processVersion;
+  }
+
+  public ProcessInstance processInstanceState(Integer processInstanceState) {
+    this.processInstanceState = processInstanceState;
+    return this;
+  }
+
+   /**
+   * Get processInstanceState
+   * @return processInstanceState
+  **/
+  @ApiModelProperty(value = "")
+  public Integer getProcessInstanceState() {
+    return processInstanceState;
+  }
+
+  public void setProcessInstanceState(Integer processInstanceState) {
+    this.processInstanceState = processInstanceState;
+  }
+
+  public ProcessInstance containerId(String containerId) {
+    this.containerId = containerId;
+    return this;
+  }
+
+   /**
+   * Get containerId
+   * @return containerId
+  **/
+  @ApiModelProperty(value = "")
+  public String getContainerId() {
+    return containerId;
+  }
+
+  public void setContainerId(String containerId) {
+    this.containerId = containerId;
+  }
+
+  public ProcessInstance initiator(String initiator) {
+    this.initiator = initiator;
+    return this;
+  }
+
+   /**
+   * Get initiator
+   * @return initiator
+  **/
+  @ApiModelProperty(value = "")
+  public String getInitiator() {
+    return initiator;
+  }
+
+  public void setInitiator(String initiator) {
+    this.initiator = initiator;
+  }
+
+  public ProcessInstance startDate(OffsetDateTime startDate) {
+    this.startDate = startDate;
+    return this;
+  }
+
+   /**
+   * Get startDate
+   * @return startDate
+  **/
+  @ApiModelProperty(value = "")
+  public OffsetDateTime getStartDate() {
+    return startDate;
+  }
+
+  public void setStartDate(OffsetDateTime startDate) {
+    this.startDate = startDate;
+  }
+
+  public ProcessInstance processInstanceDesc(String processInstanceDesc) {
+    this.processInstanceDesc = processInstanceDesc;
+    return this;
+  }
+
+   /**
+   * Get processInstanceDesc
+   * @return processInstanceDesc
+  **/
+  @ApiModelProperty(value = "")
+  public String getProcessInstanceDesc() {
+    return processInstanceDesc;
+  }
+
+  public void setProcessInstanceDesc(String processInstanceDesc) {
+    this.processInstanceDesc = processInstanceDesc;
+  }
+
+  public ProcessInstance correlationKey(String correlationKey) {
+    this.correlationKey = correlationKey;
+    return this;
+  }
+
+   /**
+   * Get correlationKey
+   * @return correlationKey
+  **/
+  @ApiModelProperty(value = "")
+  public String getCorrelationKey() {
+    return correlationKey;
+  }
+
+  public void setCorrelationKey(String correlationKey) {
+    this.correlationKey = correlationKey;
+  }
+
+  public ProcessInstance parentInstanceId(Long parentInstanceId) {
+    this.parentInstanceId = parentInstanceId;
+    return this;
+  }
+
+   /**
+   * Get parentInstanceId
+   * @return parentInstanceId
+  **/
+  @ApiModelProperty(value = "")
+  public Long getParentInstanceId() {
+    return parentInstanceId;
+  }
+
+  public void setParentInstanceId(Long parentInstanceId) {
+    this.parentInstanceId = parentInstanceId;
+  }
+
+  public ProcessInstance slaCompliance(Integer slaCompliance) {
+    this.slaCompliance = slaCompliance;
+    return this;
+  }
+
+   /**
+   * Get slaCompliance
+   * @return slaCompliance
+  **/
+  @ApiModelProperty(value = "")
+  public Integer getSlaCompliance() {
+    return slaCompliance;
+  }
+
+  public void setSlaCompliance(Integer slaCompliance) {
+    this.slaCompliance = slaCompliance;
+  }
+
+  public ProcessInstance slaDueDate(OffsetDateTime slaDueDate) {
+    this.slaDueDate = slaDueDate;
+    return this;
+  }
+
+   /**
+   * Get slaDueDate
+   * @return slaDueDate
+  **/
+  @ApiModelProperty(value = "")
+  public OffsetDateTime getSlaDueDate() {
+    return slaDueDate;
+  }
+
+  public void setSlaDueDate(OffsetDateTime slaDueDate) {
+    this.slaDueDate = slaDueDate;
+  }
+
+  public ProcessInstance activeUserTasks(TaskSummaryList activeUserTasks) {
+    this.activeUserTasks = activeUserTasks;
+    return this;
+  }
+
+   /**
+   * Get activeUserTasks
+   * @return activeUserTasks
+  **/
+  @ApiModelProperty(value = "")
+  public TaskSummaryList getActiveUserTasks() {
+    return activeUserTasks;
+  }
+
+  public void setActiveUserTasks(TaskSummaryList activeUserTasks) {
+    this.activeUserTasks = activeUserTasks;
+  }
+
+  public ProcessInstance processInstanceVariables(Map<String, Object> processInstanceVariables) {
+    this.processInstanceVariables = processInstanceVariables;
+    return this;
+  }
+
+  public ProcessInstance putProcessInstanceVariablesItem(String key, Object processInstanceVariablesItem) {
+    if (this.processInstanceVariables == null) {
+      this.processInstanceVariables = new HashMap<String, Object>();
+    }
+    this.processInstanceVariables.put(key, processInstanceVariablesItem);
+    return this;
+  }
+
+   /**
+   * Get processInstanceVariables
+   * @return processInstanceVariables
+  **/
+  @ApiModelProperty(value = "")
+  public Map<String, Object> getProcessInstanceVariables() {
+    return processInstanceVariables;
+  }
+
+  public void setProcessInstanceVariables(Map<String, Object> processInstanceVariables) {
+    this.processInstanceVariables = processInstanceVariables;
+  }
+
+
+  @Override
+  public boolean equals(java.lang.Object o) {
+    if (this == o) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
+    ProcessInstance processInstance = (ProcessInstance) o;
+    return Objects.equals(this.processInstanceId, processInstance.processInstanceId) &&
+        Objects.equals(this.processId, processInstance.processId) &&
+        Objects.equals(this.processName, processInstance.processName) &&
+        Objects.equals(this.processVersion, processInstance.processVersion) &&
+        Objects.equals(this.processInstanceState, processInstance.processInstanceState) &&
+        Objects.equals(this.containerId, processInstance.containerId) &&
+        Objects.equals(this.initiator, processInstance.initiator) &&
+        Objects.equals(this.startDate, processInstance.startDate) &&
+        Objects.equals(this.processInstanceDesc, processInstance.processInstanceDesc) &&
+        Objects.equals(this.correlationKey, processInstance.correlationKey) &&
+        Objects.equals(this.parentInstanceId, processInstance.parentInstanceId) &&
+        Objects.equals(this.slaCompliance, processInstance.slaCompliance) &&
+        Objects.equals(this.slaDueDate, processInstance.slaDueDate) &&
+        Objects.equals(this.activeUserTasks, processInstance.activeUserTasks) &&
+        Objects.equals(this.processInstanceVariables, processInstance.processInstanceVariables);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(processInstanceId, processId, processName, processVersion, processInstanceState, containerId, initiator, startDate, processInstanceDesc, correlationKey, parentInstanceId, slaCompliance, slaDueDate, activeUserTasks, processInstanceVariables);
+  }
+
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder();
+    sb.append("class ProcessInstance {\n");
+    
+    sb.append("    processInstanceId: ").append(toIndentedString(processInstanceId)).append("\n");
+    sb.append("    processId: ").append(toIndentedString(processId)).append("\n");
+    sb.append("    processName: ").append(toIndentedString(processName)).append("\n");
+    sb.append("    processVersion: ").append(toIndentedString(processVersion)).append("\n");
+    sb.append("    processInstanceState: ").append(toIndentedString(processInstanceState)).append("\n");
+    sb.append("    containerId: ").append(toIndentedString(containerId)).append("\n");
+    sb.append("    initiator: ").append(toIndentedString(initiator)).append("\n");
+    sb.append("    startDate: ").append(toIndentedString(startDate)).append("\n");
+    sb.append("    processInstanceDesc: ").append(toIndentedString(processInstanceDesc)).append("\n");
+    sb.append("    correlationKey: ").append(toIndentedString(correlationKey)).append("\n");
+    sb.append("    parentInstanceId: ").append(toIndentedString(parentInstanceId)).append("\n");
+    sb.append("    slaCompliance: ").append(toIndentedString(slaCompliance)).append("\n");
+    sb.append("    slaDueDate: ").append(toIndentedString(slaDueDate)).append("\n");
+    sb.append("    activeUserTasks: ").append(toIndentedString(activeUserTasks)).append("\n");
+    sb.append("    processInstanceVariables: ").append(toIndentedString(processInstanceVariables)).append("\n");
+    sb.append("}");
+    return sb.toString();
+  }
+
+  /**
+   * Convert the given object to string with each line indented by 4 spaces
+   * (except the first line).
+   */
+  private String toIndentedString(java.lang.Object o) {
+    if (o == null) {
+      return "null";
+    }
+    return o.toString().replace("\n", "\n    ");
+  }
+
+}
+

+ 104 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/ProcessInstanceList.java

@@ -0,0 +1,104 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.model.ProcessInstance;
+
+/**
+ * ProcessInstanceList
+ */
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-09-10T13:42:07.523+02:00")
+public class ProcessInstanceList {
+  @SerializedName("process-instance")
+  private List<ProcessInstance> processInstance = null;
+
+  public ProcessInstanceList processInstance(List<ProcessInstance> processInstance) {
+    this.processInstance = processInstance;
+    return this;
+  }
+
+  public ProcessInstanceList addProcessInstanceItem(ProcessInstance processInstanceItem) {
+    if (this.processInstance == null) {
+      this.processInstance = new ArrayList<ProcessInstance>();
+    }
+    this.processInstance.add(processInstanceItem);
+    return this;
+  }
+
+   /**
+   * Get processInstance
+   * @return processInstance
+  **/
+  @ApiModelProperty(value = "")
+  public List<ProcessInstance> getProcessInstance() {
+    return processInstance;
+  }
+
+  public void setProcessInstance(List<ProcessInstance> processInstance) {
+    this.processInstance = processInstance;
+  }
+
+
+  @Override
+  public boolean equals(java.lang.Object o) {
+    if (this == o) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
+    ProcessInstanceList processInstanceList = (ProcessInstanceList) o;
+    return Objects.equals(this.processInstance, processInstanceList.processInstance);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(processInstance);
+  }
+
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder();
+    sb.append("class ProcessInstanceList {\n");
+    
+    sb.append("    processInstance: ").append(toIndentedString(processInstance)).append("\n");
+    sb.append("}");
+    return sb.toString();
+  }
+
+  /**
+   * Convert the given object to string with each line indented by 4 spaces
+   * (except the first line).
+   */
+  private String toIndentedString(java.lang.Object o) {
+    if (o == null) {
+      return "null";
+    }
+    return o.toString().replace("\n", "\n    ");
+  }
+
+}
+

+ 485 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/TaskSummary.java

@@ -0,0 +1,485 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import org.threeten.bp.OffsetDateTime;
+
+/**
+ * TaskSummary
+ */
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-09-10T13:42:07.523+02:00")
+public class TaskSummary {
+  @SerializedName("task-id")
+  private Long taskId = null;
+
+  @SerializedName("task-name")
+  private String taskName = null;
+
+  @SerializedName("task-subject")
+  private String taskSubject = null;
+
+  @SerializedName("task-description")
+  private String taskDescription = null;
+
+  @SerializedName("task-status")
+  private String taskStatus = null;
+
+  @SerializedName("task-priority")
+  private Integer taskPriority = null;
+
+  @SerializedName("task-is-skipable")
+  private Boolean taskIsSkipable = null;
+
+  @SerializedName("task-actual-owner")
+  private String taskActualOwner = null;
+
+  @SerializedName("task-created-by")
+  private String taskCreatedBy = null;
+
+  @SerializedName("task-created-on")
+  private OffsetDateTime taskCreatedOn = null;
+
+  @SerializedName("task-activation-time")
+  private OffsetDateTime taskActivationTime = null;
+
+  @SerializedName("task-expiration-time")
+  private OffsetDateTime taskExpirationTime = null;
+
+  @SerializedName("task-proc-inst-id")
+  private Long taskProcInstId = null;
+
+  @SerializedName("task-proc-def-id")
+  private String taskProcDefId = null;
+
+  @SerializedName("task-container-id")
+  private String taskContainerId = null;
+
+  @SerializedName("task-parent-id")
+  private Long taskParentId = null;
+
+  @SerializedName("correlation-key")
+  private String correlationKey = null;
+
+  @SerializedName("process-type")
+  private Integer processType = null;
+
+  public TaskSummary taskId(Long taskId) {
+    this.taskId = taskId;
+    return this;
+  }
+
+   /**
+   * Get taskId
+   * @return taskId
+  **/
+  @ApiModelProperty(value = "")
+  public Long getTaskId() {
+    return taskId;
+  }
+
+  public void setTaskId(Long taskId) {
+    this.taskId = taskId;
+  }
+
+  public TaskSummary taskName(String taskName) {
+    this.taskName = taskName;
+    return this;
+  }
+
+   /**
+   * Get taskName
+   * @return taskName
+  **/
+  @ApiModelProperty(value = "")
+  public String getTaskName() {
+    return taskName;
+  }
+
+  public void setTaskName(String taskName) {
+    this.taskName = taskName;
+  }
+
+  public TaskSummary taskSubject(String taskSubject) {
+    this.taskSubject = taskSubject;
+    return this;
+  }
+
+   /**
+   * Get taskSubject
+   * @return taskSubject
+  **/
+  @ApiModelProperty(value = "")
+  public String getTaskSubject() {
+    return taskSubject;
+  }
+
+  public void setTaskSubject(String taskSubject) {
+    this.taskSubject = taskSubject;
+  }
+
+  public TaskSummary taskDescription(String taskDescription) {
+    this.taskDescription = taskDescription;
+    return this;
+  }
+
+   /**
+   * Get taskDescription
+   * @return taskDescription
+  **/
+  @ApiModelProperty(value = "")
+  public String getTaskDescription() {
+    return taskDescription;
+  }
+
+  public void setTaskDescription(String taskDescription) {
+    this.taskDescription = taskDescription;
+  }
+
+  public TaskSummary taskStatus(String taskStatus) {
+    this.taskStatus = taskStatus;
+    return this;
+  }
+
+   /**
+   * Get taskStatus
+   * @return taskStatus
+  **/
+  @ApiModelProperty(value = "")
+  public String getTaskStatus() {
+    return taskStatus;
+  }
+
+  public void setTaskStatus(String taskStatus) {
+    this.taskStatus = taskStatus;
+  }
+
+  public TaskSummary taskPriority(Integer taskPriority) {
+    this.taskPriority = taskPriority;
+    return this;
+  }
+
+   /**
+   * Get taskPriority
+   * @return taskPriority
+  **/
+  @ApiModelProperty(value = "")
+  public Integer getTaskPriority() {
+    return taskPriority;
+  }
+
+  public void setTaskPriority(Integer taskPriority) {
+    this.taskPriority = taskPriority;
+  }
+
+  public TaskSummary taskIsSkipable(Boolean taskIsSkipable) {
+    this.taskIsSkipable = taskIsSkipable;
+    return this;
+  }
+
+   /**
+   * Get taskIsSkipable
+   * @return taskIsSkipable
+  **/
+  @ApiModelProperty(value = "")
+  public Boolean isTaskIsSkipable() {
+    return taskIsSkipable;
+  }
+
+  public void setTaskIsSkipable(Boolean taskIsSkipable) {
+    this.taskIsSkipable = taskIsSkipable;
+  }
+
+  public TaskSummary taskActualOwner(String taskActualOwner) {
+    this.taskActualOwner = taskActualOwner;
+    return this;
+  }
+
+   /**
+   * Get taskActualOwner
+   * @return taskActualOwner
+  **/
+  @ApiModelProperty(value = "")
+  public String getTaskActualOwner() {
+    return taskActualOwner;
+  }
+
+  public void setTaskActualOwner(String taskActualOwner) {
+    this.taskActualOwner = taskActualOwner;
+  }
+
+  public TaskSummary taskCreatedBy(String taskCreatedBy) {
+    this.taskCreatedBy = taskCreatedBy;
+    return this;
+  }
+
+   /**
+   * Get taskCreatedBy
+   * @return taskCreatedBy
+  **/
+  @ApiModelProperty(value = "")
+  public String getTaskCreatedBy() {
+    return taskCreatedBy;
+  }
+
+  public void setTaskCreatedBy(String taskCreatedBy) {
+    this.taskCreatedBy = taskCreatedBy;
+  }
+
+  public TaskSummary taskCreatedOn(OffsetDateTime taskCreatedOn) {
+    this.taskCreatedOn = taskCreatedOn;
+    return this;
+  }
+
+   /**
+   * Get taskCreatedOn
+   * @return taskCreatedOn
+  **/
+  @ApiModelProperty(value = "")
+  public OffsetDateTime getTaskCreatedOn() {
+    return taskCreatedOn;
+  }
+
+  public void setTaskCreatedOn(OffsetDateTime taskCreatedOn) {
+    this.taskCreatedOn = taskCreatedOn;
+  }
+
+  public TaskSummary taskActivationTime(OffsetDateTime taskActivationTime) {
+    this.taskActivationTime = taskActivationTime;
+    return this;
+  }
+
+   /**
+   * Get taskActivationTime
+   * @return taskActivationTime
+  **/
+  @ApiModelProperty(value = "")
+  public OffsetDateTime getTaskActivationTime() {
+    return taskActivationTime;
+  }
+
+  public void setTaskActivationTime(OffsetDateTime taskActivationTime) {
+    this.taskActivationTime = taskActivationTime;
+  }
+
+  public TaskSummary taskExpirationTime(OffsetDateTime taskExpirationTime) {
+    this.taskExpirationTime = taskExpirationTime;
+    return this;
+  }
+
+   /**
+   * Get taskExpirationTime
+   * @return taskExpirationTime
+  **/
+  @ApiModelProperty(value = "")
+  public OffsetDateTime getTaskExpirationTime() {
+    return taskExpirationTime;
+  }
+
+  public void setTaskExpirationTime(OffsetDateTime taskExpirationTime) {
+    this.taskExpirationTime = taskExpirationTime;
+  }
+
+  public TaskSummary taskProcInstId(Long taskProcInstId) {
+    this.taskProcInstId = taskProcInstId;
+    return this;
+  }
+
+   /**
+   * Get taskProcInstId
+   * @return taskProcInstId
+  **/
+  @ApiModelProperty(value = "")
+  public Long getTaskProcInstId() {
+    return taskProcInstId;
+  }
+
+  public void setTaskProcInstId(Long taskProcInstId) {
+    this.taskProcInstId = taskProcInstId;
+  }
+
+  public TaskSummary taskProcDefId(String taskProcDefId) {
+    this.taskProcDefId = taskProcDefId;
+    return this;
+  }
+
+   /**
+   * Get taskProcDefId
+   * @return taskProcDefId
+  **/
+  @ApiModelProperty(value = "")
+  public String getTaskProcDefId() {
+    return taskProcDefId;
+  }
+
+  public void setTaskProcDefId(String taskProcDefId) {
+    this.taskProcDefId = taskProcDefId;
+  }
+
+  public TaskSummary taskContainerId(String taskContainerId) {
+    this.taskContainerId = taskContainerId;
+    return this;
+  }
+
+   /**
+   * Get taskContainerId
+   * @return taskContainerId
+  **/
+  @ApiModelProperty(value = "")
+  public String getTaskContainerId() {
+    return taskContainerId;
+  }
+
+  public void setTaskContainerId(String taskContainerId) {
+    this.taskContainerId = taskContainerId;
+  }
+
+  public TaskSummary taskParentId(Long taskParentId) {
+    this.taskParentId = taskParentId;
+    return this;
+  }
+
+   /**
+   * Get taskParentId
+   * @return taskParentId
+  **/
+  @ApiModelProperty(value = "")
+  public Long getTaskParentId() {
+    return taskParentId;
+  }
+
+  public void setTaskParentId(Long taskParentId) {
+    this.taskParentId = taskParentId;
+  }
+
+  public TaskSummary correlationKey(String correlationKey) {
+    this.correlationKey = correlationKey;
+    return this;
+  }
+
+   /**
+   * Get correlationKey
+   * @return correlationKey
+  **/
+  @ApiModelProperty(value = "")
+  public String getCorrelationKey() {
+    return correlationKey;
+  }
+
+  public void setCorrelationKey(String correlationKey) {
+    this.correlationKey = correlationKey;
+  }
+
+  public TaskSummary processType(Integer processType) {
+    this.processType = processType;
+    return this;
+  }
+
+   /**
+   * Get processType
+   * @return processType
+  **/
+  @ApiModelProperty(value = "")
+  public Integer getProcessType() {
+    return processType;
+  }
+
+  public void setProcessType(Integer processType) {
+    this.processType = processType;
+  }
+
+
+  @Override
+  public boolean equals(java.lang.Object o) {
+    if (this == o) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
+    TaskSummary taskSummary = (TaskSummary) o;
+    return Objects.equals(this.taskId, taskSummary.taskId) &&
+        Objects.equals(this.taskName, taskSummary.taskName) &&
+        Objects.equals(this.taskSubject, taskSummary.taskSubject) &&
+        Objects.equals(this.taskDescription, taskSummary.taskDescription) &&
+        Objects.equals(this.taskStatus, taskSummary.taskStatus) &&
+        Objects.equals(this.taskPriority, taskSummary.taskPriority) &&
+        Objects.equals(this.taskIsSkipable, taskSummary.taskIsSkipable) &&
+        Objects.equals(this.taskActualOwner, taskSummary.taskActualOwner) &&
+        Objects.equals(this.taskCreatedBy, taskSummary.taskCreatedBy) &&
+        Objects.equals(this.taskCreatedOn, taskSummary.taskCreatedOn) &&
+        Objects.equals(this.taskActivationTime, taskSummary.taskActivationTime) &&
+        Objects.equals(this.taskExpirationTime, taskSummary.taskExpirationTime) &&
+        Objects.equals(this.taskProcInstId, taskSummary.taskProcInstId) &&
+        Objects.equals(this.taskProcDefId, taskSummary.taskProcDefId) &&
+        Objects.equals(this.taskContainerId, taskSummary.taskContainerId) &&
+        Objects.equals(this.taskParentId, taskSummary.taskParentId) &&
+        Objects.equals(this.correlationKey, taskSummary.correlationKey) &&
+        Objects.equals(this.processType, taskSummary.processType);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(taskId, taskName, taskSubject, taskDescription, taskStatus, taskPriority, taskIsSkipable, taskActualOwner, taskCreatedBy, taskCreatedOn, taskActivationTime, taskExpirationTime, taskProcInstId, taskProcDefId, taskContainerId, taskParentId, correlationKey, processType);
+  }
+
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder();
+    sb.append("class TaskSummary {\n");
+    
+    sb.append("    taskId: ").append(toIndentedString(taskId)).append("\n");
+    sb.append("    taskName: ").append(toIndentedString(taskName)).append("\n");
+    sb.append("    taskSubject: ").append(toIndentedString(taskSubject)).append("\n");
+    sb.append("    taskDescription: ").append(toIndentedString(taskDescription)).append("\n");
+    sb.append("    taskStatus: ").append(toIndentedString(taskStatus)).append("\n");
+    sb.append("    taskPriority: ").append(toIndentedString(taskPriority)).append("\n");
+    sb.append("    taskIsSkipable: ").append(toIndentedString(taskIsSkipable)).append("\n");
+    sb.append("    taskActualOwner: ").append(toIndentedString(taskActualOwner)).append("\n");
+    sb.append("    taskCreatedBy: ").append(toIndentedString(taskCreatedBy)).append("\n");
+    sb.append("    taskCreatedOn: ").append(toIndentedString(taskCreatedOn)).append("\n");
+    sb.append("    taskActivationTime: ").append(toIndentedString(taskActivationTime)).append("\n");
+    sb.append("    taskExpirationTime: ").append(toIndentedString(taskExpirationTime)).append("\n");
+    sb.append("    taskProcInstId: ").append(toIndentedString(taskProcInstId)).append("\n");
+    sb.append("    taskProcDefId: ").append(toIndentedString(taskProcDefId)).append("\n");
+    sb.append("    taskContainerId: ").append(toIndentedString(taskContainerId)).append("\n");
+    sb.append("    taskParentId: ").append(toIndentedString(taskParentId)).append("\n");
+    sb.append("    correlationKey: ").append(toIndentedString(correlationKey)).append("\n");
+    sb.append("    processType: ").append(toIndentedString(processType)).append("\n");
+    sb.append("}");
+    return sb.toString();
+  }
+
+  /**
+   * Convert the given object to string with each line indented by 4 spaces
+   * (except the first line).
+   */
+  private String toIndentedString(java.lang.Object o) {
+    if (o == null) {
+      return "null";
+    }
+    return o.toString().replace("\n", "\n    ");
+  }
+
+}
+

+ 104 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/TaskSummaryList.java

@@ -0,0 +1,104 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.model.TaskSummary;
+
+/**
+ * TaskSummaryList
+ */
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-09-10T13:42:07.523+02:00")
+public class TaskSummaryList {
+  @SerializedName("task-summary")
+  private List<TaskSummary> taskSummary = null;
+
+  public TaskSummaryList taskSummary(List<TaskSummary> taskSummary) {
+    this.taskSummary = taskSummary;
+    return this;
+  }
+
+  public TaskSummaryList addTaskSummaryItem(TaskSummary taskSummaryItem) {
+    if (this.taskSummary == null) {
+      this.taskSummary = new ArrayList<TaskSummary>();
+    }
+    this.taskSummary.add(taskSummaryItem);
+    return this;
+  }
+
+   /**
+   * Get taskSummary
+   * @return taskSummary
+  **/
+  @ApiModelProperty(value = "")
+  public List<TaskSummary> getTaskSummary() {
+    return taskSummary;
+  }
+
+  public void setTaskSummary(List<TaskSummary> taskSummary) {
+    this.taskSummary = taskSummary;
+  }
+
+
+  @Override
+  public boolean equals(java.lang.Object o) {
+    if (this == o) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
+    TaskSummaryList taskSummaryList = (TaskSummaryList) o;
+    return Objects.equals(this.taskSummary, taskSummaryList.taskSummary);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(taskSummary);
+  }
+
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder();
+    sb.append("class TaskSummaryList {\n");
+    
+    sb.append("    taskSummary: ").append(toIndentedString(taskSummary)).append("\n");
+    sb.append("}");
+    return sb.toString();
+  }
+
+  /**
+   * Convert the given object to string with each line indented by 4 spaces
+   * (except the first line).
+   */
+  private String toIndentedString(java.lang.Object o) {
+    if (o == null) {
+      return "null";
+    }
+    return o.toString().replace("\n", "\n    ");
+  }
+
+}
+

+ 162 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/TimerDefinition.java

@@ -0,0 +1,162 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+
+/**
+ * TimerDefinition
+ */
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-09-10T13:42:07.523+02:00")
+public class TimerDefinition {
+  @SerializedName("id")
+  private Long id = null;
+
+  @SerializedName("node-name")
+  private String nodeName = null;
+
+  @SerializedName("unique-id")
+  private String uniqueId = null;
+
+  @SerializedName("nodeId")
+  private Long nodeId = null;
+
+  public TimerDefinition id(Long id) {
+    this.id = id;
+    return this;
+  }
+
+   /**
+   * Get id
+   * @return id
+  **/
+  @ApiModelProperty(value = "")
+  public Long getId() {
+    return id;
+  }
+
+  public void setId(Long id) {
+    this.id = id;
+  }
+
+  public TimerDefinition nodeName(String nodeName) {
+    this.nodeName = nodeName;
+    return this;
+  }
+
+   /**
+   * Get nodeName
+   * @return nodeName
+  **/
+  @ApiModelProperty(value = "")
+  public String getNodeName() {
+    return nodeName;
+  }
+
+  public void setNodeName(String nodeName) {
+    this.nodeName = nodeName;
+  }
+
+  public TimerDefinition uniqueId(String uniqueId) {
+    this.uniqueId = uniqueId;
+    return this;
+  }
+
+   /**
+   * Get uniqueId
+   * @return uniqueId
+  **/
+  @ApiModelProperty(value = "")
+  public String getUniqueId() {
+    return uniqueId;
+  }
+
+  public void setUniqueId(String uniqueId) {
+    this.uniqueId = uniqueId;
+  }
+
+  public TimerDefinition nodeId(Long nodeId) {
+    this.nodeId = nodeId;
+    return this;
+  }
+
+   /**
+   * Get nodeId
+   * @return nodeId
+  **/
+  @ApiModelProperty(value = "")
+  public Long getNodeId() {
+    return nodeId;
+  }
+
+  public void setNodeId(Long nodeId) {
+    this.nodeId = nodeId;
+  }
+
+
+  @Override
+  public boolean equals(java.lang.Object o) {
+    if (this == o) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
+    TimerDefinition timerDefinition = (TimerDefinition) o;
+    return Objects.equals(this.id, timerDefinition.id) &&
+        Objects.equals(this.nodeName, timerDefinition.nodeName) &&
+        Objects.equals(this.uniqueId, timerDefinition.uniqueId) &&
+        Objects.equals(this.nodeId, timerDefinition.nodeId);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(id, nodeName, uniqueId, nodeId);
+  }
+
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder();
+    sb.append("class TimerDefinition {\n");
+    
+    sb.append("    id: ").append(toIndentedString(id)).append("\n");
+    sb.append("    nodeName: ").append(toIndentedString(nodeName)).append("\n");
+    sb.append("    uniqueId: ").append(toIndentedString(uniqueId)).append("\n");
+    sb.append("    nodeId: ").append(toIndentedString(nodeId)).append("\n");
+    sb.append("}");
+    return sb.toString();
+  }
+
+  /**
+   * Convert the given object to string with each line indented by 4 spaces
+   * (except the first line).
+   */
+  private String toIndentedString(java.lang.Object o) {
+    if (o == null) {
+      return "null";
+    }
+    return o.toString().replace("\n", "\n    ");
+  }
+
+}
+

+ 186 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/VariableInstance.java

@@ -0,0 +1,186 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import org.threeten.bp.OffsetDateTime;
+
+/**
+ * VariableInstance
+ */
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-09-10T13:42:07.523+02:00")
+public class VariableInstance {
+  @SerializedName("name")
+  private String name = null;
+
+  @SerializedName("old-value")
+  private String oldValue = null;
+
+  @SerializedName("value")
+  private String value = null;
+
+  @SerializedName("process-instance-id")
+  private Long processInstanceId = null;
+
+  @SerializedName("modification-date")
+  private OffsetDateTime modificationDate = null;
+
+  public VariableInstance name(String name) {
+    this.name = name;
+    return this;
+  }
+
+   /**
+   * Get name
+   * @return name
+  **/
+  @ApiModelProperty(value = "")
+  public String getName() {
+    return name;
+  }
+
+  public void setName(String name) {
+    this.name = name;
+  }
+
+  public VariableInstance oldValue(String oldValue) {
+    this.oldValue = oldValue;
+    return this;
+  }
+
+   /**
+   * Get oldValue
+   * @return oldValue
+  **/
+  @ApiModelProperty(value = "")
+  public String getOldValue() {
+    return oldValue;
+  }
+
+  public void setOldValue(String oldValue) {
+    this.oldValue = oldValue;
+  }
+
+  public VariableInstance value(String value) {
+    this.value = value;
+    return this;
+  }
+
+   /**
+   * Get value
+   * @return value
+  **/
+  @ApiModelProperty(value = "")
+  public String getValue() {
+    return value;
+  }
+
+  public void setValue(String value) {
+    this.value = value;
+  }
+
+  public VariableInstance processInstanceId(Long processInstanceId) {
+    this.processInstanceId = processInstanceId;
+    return this;
+  }
+
+   /**
+   * Get processInstanceId
+   * @return processInstanceId
+  **/
+  @ApiModelProperty(value = "")
+  public Long getProcessInstanceId() {
+    return processInstanceId;
+  }
+
+  public void setProcessInstanceId(Long processInstanceId) {
+    this.processInstanceId = processInstanceId;
+  }
+
+  public VariableInstance modificationDate(OffsetDateTime modificationDate) {
+    this.modificationDate = modificationDate;
+    return this;
+  }
+
+   /**
+   * Get modificationDate
+   * @return modificationDate
+  **/
+  @ApiModelProperty(value = "")
+  public OffsetDateTime getModificationDate() {
+    return modificationDate;
+  }
+
+  public void setModificationDate(OffsetDateTime modificationDate) {
+    this.modificationDate = modificationDate;
+  }
+
+
+  @Override
+  public boolean equals(java.lang.Object o) {
+    if (this == o) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
+    VariableInstance variableInstance = (VariableInstance) o;
+    return Objects.equals(this.name, variableInstance.name) &&
+        Objects.equals(this.oldValue, variableInstance.oldValue) &&
+        Objects.equals(this.value, variableInstance.value) &&
+        Objects.equals(this.processInstanceId, variableInstance.processInstanceId) &&
+        Objects.equals(this.modificationDate, variableInstance.modificationDate);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(name, oldValue, value, processInstanceId, modificationDate);
+  }
+
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder();
+    sb.append("class VariableInstance {\n");
+    
+    sb.append("    name: ").append(toIndentedString(name)).append("\n");
+    sb.append("    oldValue: ").append(toIndentedString(oldValue)).append("\n");
+    sb.append("    value: ").append(toIndentedString(value)).append("\n");
+    sb.append("    processInstanceId: ").append(toIndentedString(processInstanceId)).append("\n");
+    sb.append("    modificationDate: ").append(toIndentedString(modificationDate)).append("\n");
+    sb.append("}");
+    return sb.toString();
+  }
+
+  /**
+   * Convert the given object to string with each line indented by 4 spaces
+   * (except the first line).
+   */
+  private String toIndentedString(java.lang.Object o) {
+    if (o == null) {
+      return "null";
+    }
+    return o.toString().replace("\n", "\n    ");
+  }
+
+}
+

+ 104 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/VariableInstanceList.java

@@ -0,0 +1,104 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.model.VariableInstance;
+
+/**
+ * VariableInstanceList
+ */
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-09-10T13:42:07.523+02:00")
+public class VariableInstanceList {
+  @SerializedName("variable-instance")
+  private List<VariableInstance> variableInstance = null;
+
+  public VariableInstanceList variableInstance(List<VariableInstance> variableInstance) {
+    this.variableInstance = variableInstance;
+    return this;
+  }
+
+  public VariableInstanceList addVariableInstanceItem(VariableInstance variableInstanceItem) {
+    if (this.variableInstance == null) {
+      this.variableInstance = new ArrayList<VariableInstance>();
+    }
+    this.variableInstance.add(variableInstanceItem);
+    return this;
+  }
+
+   /**
+   * Get variableInstance
+   * @return variableInstance
+  **/
+  @ApiModelProperty(value = "")
+  public List<VariableInstance> getVariableInstance() {
+    return variableInstance;
+  }
+
+  public void setVariableInstance(List<VariableInstance> variableInstance) {
+    this.variableInstance = variableInstance;
+  }
+
+
+  @Override
+  public boolean equals(java.lang.Object o) {
+    if (this == o) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
+    VariableInstanceList variableInstanceList = (VariableInstanceList) o;
+    return Objects.equals(this.variableInstance, variableInstanceList.variableInstance);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(variableInstance);
+  }
+
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder();
+    sb.append("class VariableInstanceList {\n");
+    
+    sb.append("    variableInstance: ").append(toIndentedString(variableInstance)).append("\n");
+    sb.append("}");
+    return sb.toString();
+  }
+
+  /**
+   * Convert the given object to string with each line indented by 4 spaces
+   * (except the first line).
+   */
+  private String toIndentedString(java.lang.Object o) {
+    if (o == null) {
+      return "null";
+    }
+    return o.toString().replace("\n", "\n    ");
+  }
+
+}
+

+ 265 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/WorkItemInstance.java

@@ -0,0 +1,265 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * WorkItemInstance
+ */
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-09-10T13:42:07.523+02:00")
+public class WorkItemInstance {
+  @SerializedName("work-item-id")
+  private Long workItemId = null;
+
+  @SerializedName("work-item-name")
+  private String workItemName = null;
+
+  @SerializedName("work-item-state")
+  private Integer workItemState = null;
+
+  @SerializedName("work-item-params")
+  private Map<String, Object> workItemParams = null;
+
+  @SerializedName("process-instance-id")
+  private Long processInstanceId = null;
+
+  @SerializedName("container-id")
+  private String containerId = null;
+
+  @SerializedName("node-instance-id")
+  private Long nodeInstanceId = null;
+
+  @SerializedName("node-id")
+  private Long nodeId = null;
+
+  public WorkItemInstance workItemId(Long workItemId) {
+    this.workItemId = workItemId;
+    return this;
+  }
+
+   /**
+   * Get workItemId
+   * @return workItemId
+  **/
+  @ApiModelProperty(value = "")
+  public Long getWorkItemId() {
+    return workItemId;
+  }
+
+  public void setWorkItemId(Long workItemId) {
+    this.workItemId = workItemId;
+  }
+
+  public WorkItemInstance workItemName(String workItemName) {
+    this.workItemName = workItemName;
+    return this;
+  }
+
+   /**
+   * Get workItemName
+   * @return workItemName
+  **/
+  @ApiModelProperty(value = "")
+  public String getWorkItemName() {
+    return workItemName;
+  }
+
+  public void setWorkItemName(String workItemName) {
+    this.workItemName = workItemName;
+  }
+
+  public WorkItemInstance workItemState(Integer workItemState) {
+    this.workItemState = workItemState;
+    return this;
+  }
+
+   /**
+   * Get workItemState
+   * @return workItemState
+  **/
+  @ApiModelProperty(value = "")
+  public Integer getWorkItemState() {
+    return workItemState;
+  }
+
+  public void setWorkItemState(Integer workItemState) {
+    this.workItemState = workItemState;
+  }
+
+  public WorkItemInstance workItemParams(Map<String, Object> workItemParams) {
+    this.workItemParams = workItemParams;
+    return this;
+  }
+
+  public WorkItemInstance putWorkItemParamsItem(String key, Object workItemParamsItem) {
+    if (this.workItemParams == null) {
+      this.workItemParams = new HashMap<String, Object>();
+    }
+    this.workItemParams.put(key, workItemParamsItem);
+    return this;
+  }
+
+   /**
+   * Get workItemParams
+   * @return workItemParams
+  **/
+  @ApiModelProperty(value = "")
+  public Map<String, Object> getWorkItemParams() {
+    return workItemParams;
+  }
+
+  public void setWorkItemParams(Map<String, Object> workItemParams) {
+    this.workItemParams = workItemParams;
+  }
+
+  public WorkItemInstance processInstanceId(Long processInstanceId) {
+    this.processInstanceId = processInstanceId;
+    return this;
+  }
+
+   /**
+   * Get processInstanceId
+   * @return processInstanceId
+  **/
+  @ApiModelProperty(value = "")
+  public Long getProcessInstanceId() {
+    return processInstanceId;
+  }
+
+  public void setProcessInstanceId(Long processInstanceId) {
+    this.processInstanceId = processInstanceId;
+  }
+
+  public WorkItemInstance containerId(String containerId) {
+    this.containerId = containerId;
+    return this;
+  }
+
+   /**
+   * Get containerId
+   * @return containerId
+  **/
+  @ApiModelProperty(value = "")
+  public String getContainerId() {
+    return containerId;
+  }
+
+  public void setContainerId(String containerId) {
+    this.containerId = containerId;
+  }
+
+  public WorkItemInstance nodeInstanceId(Long nodeInstanceId) {
+    this.nodeInstanceId = nodeInstanceId;
+    return this;
+  }
+
+   /**
+   * Get nodeInstanceId
+   * @return nodeInstanceId
+  **/
+  @ApiModelProperty(value = "")
+  public Long getNodeInstanceId() {
+    return nodeInstanceId;
+  }
+
+  public void setNodeInstanceId(Long nodeInstanceId) {
+    this.nodeInstanceId = nodeInstanceId;
+  }
+
+  public WorkItemInstance nodeId(Long nodeId) {
+    this.nodeId = nodeId;
+    return this;
+  }
+
+   /**
+   * Get nodeId
+   * @return nodeId
+  **/
+  @ApiModelProperty(value = "")
+  public Long getNodeId() {
+    return nodeId;
+  }
+
+  public void setNodeId(Long nodeId) {
+    this.nodeId = nodeId;
+  }
+
+
+  @Override
+  public boolean equals(java.lang.Object o) {
+    if (this == o) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
+    WorkItemInstance workItemInstance = (WorkItemInstance) o;
+    return Objects.equals(this.workItemId, workItemInstance.workItemId) &&
+        Objects.equals(this.workItemName, workItemInstance.workItemName) &&
+        Objects.equals(this.workItemState, workItemInstance.workItemState) &&
+        Objects.equals(this.workItemParams, workItemInstance.workItemParams) &&
+        Objects.equals(this.processInstanceId, workItemInstance.processInstanceId) &&
+        Objects.equals(this.containerId, workItemInstance.containerId) &&
+        Objects.equals(this.nodeInstanceId, workItemInstance.nodeInstanceId) &&
+        Objects.equals(this.nodeId, workItemInstance.nodeId);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(workItemId, workItemName, workItemState, workItemParams, processInstanceId, containerId, nodeInstanceId, nodeId);
+  }
+
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder();
+    sb.append("class WorkItemInstance {\n");
+    
+    sb.append("    workItemId: ").append(toIndentedString(workItemId)).append("\n");
+    sb.append("    workItemName: ").append(toIndentedString(workItemName)).append("\n");
+    sb.append("    workItemState: ").append(toIndentedString(workItemState)).append("\n");
+    sb.append("    workItemParams: ").append(toIndentedString(workItemParams)).append("\n");
+    sb.append("    processInstanceId: ").append(toIndentedString(processInstanceId)).append("\n");
+    sb.append("    containerId: ").append(toIndentedString(containerId)).append("\n");
+    sb.append("    nodeInstanceId: ").append(toIndentedString(nodeInstanceId)).append("\n");
+    sb.append("    nodeId: ").append(toIndentedString(nodeId)).append("\n");
+    sb.append("}");
+    return sb.toString();
+  }
+
+  /**
+   * Convert the given object to string with each line indented by 4 spaces
+   * (except the first line).
+   */
+  private String toIndentedString(java.lang.Object o) {
+    if (o == null) {
+      return "null";
+    }
+    return o.toString().replace("\n", "\n    ");
+  }
+
+}
+

+ 104 - 0
src/main/java/net/p0f/samples/rhpam_fuse_integration/rhpam/model/WorkItemInstanceList.java

@@ -0,0 +1,104 @@
+/*
+ * KIE Server
+ * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+ *
+ * OpenAPI spec version: 7.0
+ * 
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package net.p0f.samples.rhpam_fuse_integration.rhpam.model;
+
+import java.util.Objects;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import net.p0f.samples.rhpam_fuse_integration.rhpam.model.WorkItemInstance;
+
+/**
+ * WorkItemInstanceList
+ */
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-09-10T13:42:07.523+02:00")
+public class WorkItemInstanceList {
+  @SerializedName("work-item-instance")
+  private List<WorkItemInstance> workItemInstance = null;
+
+  public WorkItemInstanceList workItemInstance(List<WorkItemInstance> workItemInstance) {
+    this.workItemInstance = workItemInstance;
+    return this;
+  }
+
+  public WorkItemInstanceList addWorkItemInstanceItem(WorkItemInstance workItemInstanceItem) {
+    if (this.workItemInstance == null) {
+      this.workItemInstance = new ArrayList<WorkItemInstance>();
+    }
+    this.workItemInstance.add(workItemInstanceItem);
+    return this;
+  }
+
+   /**
+   * Get workItemInstance
+   * @return workItemInstance
+  **/
+  @ApiModelProperty(value = "")
+  public List<WorkItemInstance> getWorkItemInstance() {
+    return workItemInstance;
+  }
+
+  public void setWorkItemInstance(List<WorkItemInstance> workItemInstance) {
+    this.workItemInstance = workItemInstance;
+  }
+
+
+  @Override
+  public boolean equals(java.lang.Object o) {
+    if (this == o) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
+    WorkItemInstanceList workItemInstanceList = (WorkItemInstanceList) o;
+    return Objects.equals(this.workItemInstance, workItemInstanceList.workItemInstance);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(workItemInstance);
+  }
+
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder();
+    sb.append("class WorkItemInstanceList {\n");
+    
+    sb.append("    workItemInstance: ").append(toIndentedString(workItemInstance)).append("\n");
+    sb.append("}");
+    return sb.toString();
+  }
+
+  /**
+   * Convert the given object to string with each line indented by 4 spaces
+   * (except the first line).
+   */
+  private String toIndentedString(java.lang.Object o) {
+    if (o == null) {
+      return "null";
+    }
+    return o.toString().replace("\n", "\n    ");
+  }
+
+}
+

+ 4 - 0
src/main/resources/rhpam-rest-client.properties

@@ -0,0 +1,4 @@
+# Contains endpoint and authentication properties for REST clients.
+rhpam.endpoint = http://localhost:8080/kie-server/services/rest/server
+rhpam.username = rhpamAdmin
+rhpam.password = jboss#1!