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 jBPMCommand
which allows to call Camel routes with adirect
endpoint. The command passes the retrieved from theCommandContext
to the route that has a consumer on the endpoint-id that can be passed with thecamel-endpoint-id
WorkItem
parameter. E.g. when a the value "myCamelEndpoint" is passed to the {link WorkItem} via thecamel-endpoint-id
parameter, thisCommand
will send theWorkItem
to the Camel URIdirect:myCamelEndpoint
. The body of the resultMessage
of the invocation is returned via theResponse
parameter. Access to the raw responseMessage
is provided via theMessage
parameter. 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.ExecutionResults
execute(org.kie.api.executor.CommandContext ctx)
protected abstract org.apache.camel.ProducerTemplate
getProducerTemplate(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:
execute
in interfaceorg.kie.api.executor.Command
- Throws:
Exception
-
getProducerTemplate
protected abstract org.apache.camel.ProducerTemplate getProducerTemplate(org.kie.api.executor.CommandContext ctx)
-
-