Class InOutCamelWorkItemHandler

  • All Implemented Interfaces:
    org.kie.api.runtime.process.WorkItemHandler, org.kie.internal.runtime.Cacheable

    @Wid(widfile="InOutCamelConnector.wid",name="InOutCamelConnector",displayName="InOutCamelConnector",category="Camel",defaultHandler="mvel: new org.apache.camel.component.jbpm.workitem.InOutCamelWorkItemHandler()",documentation="${artifactId}/index.html",parameters=@WidParameter(name="CamelEndpointId"),results={@WidResult(name="Response"),@WidResult(name="Message")},mavenDepends=@WidMavenDepends(group="${groupId}",artifact="${artifactId}",version="${version}"),serviceInfo=@WidService(category="${name}",description="${description}",keywords="apache,camel,payload,route,connector",action=@WidAction(title="Send payload to a Camel endpoint")),icon="InOutCamelConnector.png")
    public class InOutCamelWorkItemHandler
    extends AbstractCamelWorkItemHandler
    Camel jBPM WorkItemHandler that sends Exchanges with an InOut Message Exchange Pattern.

    This handler parses the response message from the given Camel route and completes the WorkItem. The use-case for this handler is synchronous, request-response style, communication.

    The handler creates a Camel Exchange and sets the WorkItem as the body of the Message. Furthermore, the following message headers are set:

    • deploymentId
    • processInstanceId
    • workItemId
    • Constructor Detail

      • InOutCamelWorkItemHandler

        public InOutCamelWorkItemHandler()
      • InOutCamelWorkItemHandler

        public InOutCamelWorkItemHandler​(String camelEndpointId)
      • InOutCamelWorkItemHandler

        public InOutCamelWorkItemHandler​(org.kie.api.runtime.manager.RuntimeManager runtimeManager)
      • InOutCamelWorkItemHandler

        public InOutCamelWorkItemHandler​(org.kie.api.runtime.manager.RuntimeManager runtimeManager,
                                         String camelEndpointId)
    • Method Detail

      • handleResponse

        protected void handleResponse​(org.apache.camel.Exchange responseExchange,
                                      org.kie.api.runtime.process.WorkItem workItem,
                                      org.kie.api.runtime.process.WorkItemManager manager)
        Specified by:
        handleResponse in class AbstractCamelWorkItemHandler
      • buildExchange

        protected org.apache.camel.Exchange buildExchange​(org.apache.camel.ProducerTemplate template,
                                                          org.kie.api.runtime.process.WorkItem workItem)
        Specified by:
        buildExchange in class AbstractCamelWorkItemHandler