public abstract class AbstractCamelCommand extends Object implements org.kie.api.executor.Command, org.kie.internal.runtime.Cacheable
Command which allows to call Camel routes with a direct endpoint.
The command passes the retrieved from the CommandContext to the route that has a consumer on the endpoint-id
that can be passed with the camel-endpoint-id WorkItem parameter. E.g. when a the value "myCamelEndpoint" is passed to the
{link WorkItem} via the camel-endpoint-id parameter, this Command will send the WorkItem to
the Camel URI direct:myCamelEndpoint.
The body of the result Message of the invocation is returned via the Response parameter. Access to the raw response
Message is provided via the Message parameter. This gives the user access to more advanced fields like message headers
and attachments.| Constructor and Description |
|---|
AbstractCamelCommand() |
| Modifier and Type | Method and 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) |
public org.kie.api.executor.ExecutionResults execute(org.kie.api.executor.CommandContext ctx)
throws Exception
execute in interface org.kie.api.executor.CommandExceptionprotected abstract org.apache.camel.ProducerTemplate getProducerTemplate(org.kie.api.executor.CommandContext ctx)
Apache Camel