Search in sources :

Example 1 with BonitaAPI

use of org.apache.camel.component.bonita.api.BonitaAPI in project camel by apache.

the class BonitaStartProducer method process.

public void process(Exchange exchange) throws Exception {
    // Setup access type (HTTP on local host)
    String hostname = this.configuration.getHostname();
    String port = this.configuration.getPort();
    String processName = this.configuration.getProcessName();
    String username = this.configuration.getUsername();
    String password = this.configuration.getPassword();
    BonitaAPIConfig bonitaAPIConfig = new BonitaAPIConfig(hostname, port, username, password);
    BonitaAPI bonitaApi = BonitaAPIBuilder.build(bonitaAPIConfig);
    ProcessDefinitionResponse processDefinition = bonitaApi.getProcessDefinition(processName);
    bonitaApi.startCase(processDefinition, exchange.getIn().getBody(Map.class));
}
Also used : ProcessDefinitionResponse(org.apache.camel.component.bonita.api.model.ProcessDefinitionResponse) BonitaAPIConfig(org.apache.camel.component.bonita.api.util.BonitaAPIConfig) BonitaAPI(org.apache.camel.component.bonita.api.BonitaAPI) Map(java.util.Map)

Aggregations

Map (java.util.Map)1 BonitaAPI (org.apache.camel.component.bonita.api.BonitaAPI)1 ProcessDefinitionResponse (org.apache.camel.component.bonita.api.model.ProcessDefinitionResponse)1 BonitaAPIConfig (org.apache.camel.component.bonita.api.util.BonitaAPIConfig)1