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));
}
Aggregations