Class AbstractCamelCommand
- java.lang.Object
-
- org.apache.camel.component.jbpm.workitem.AbstractCamelCommand
-
- All Implemented Interfaces:
org.kie.api.executor.Command,org.kie.internal.runtime.Cacheable
- Direct Known Subclasses:
DeploymentContextCamelCommand,GlobalContextCamelCommand
public abstract class AbstractCamelCommand extends Object implements org.kie.api.executor.Command, org.kie.internal.runtime.Cacheable
Camel jBPMCommandwhich allows to call Camel routes with adirectendpoint. The command passes the retrieved from theCommandContextto the route that has a consumer on the endpoint-id that can be passed with thecamel-endpoint-idWorkItemparameter. E.g. when a the value "myCamelEndpoint" is passed to the {link WorkItem} via thecamel-endpoint-idparameter, thisCommandwill send theWorkItemto the Camel URIdirect:myCamelEndpoint. The body of the resultMessageof the invocation is returned via theResponseparameter. Access to the raw responseMessageis provided via theMessageparameter. This gives the user access to more advanced fields like message headers and attachments.
-
-
Constructor Summary
Constructors Constructor Description AbstractCamelCommand()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.kie.api.executor.ExecutionResultsexecute(org.kie.api.executor.CommandContext ctx)protected abstract org.apache.camel.ProducerTemplategetProducerTemplate(org.kie.api.executor.CommandContext ctx)
-
-
-
Method Detail
-
execute
public org.kie.api.executor.ExecutionResults execute(org.kie.api.executor.CommandContext ctx) throws Exception- Specified by:
executein interfaceorg.kie.api.executor.Command- Throws:
Exception
-
getProducerTemplate
protected abstract org.apache.camel.ProducerTemplate getProducerTemplate(org.kie.api.executor.CommandContext ctx)
-
-