Class InOnlyCamelWorkItemHandler

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

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

    This handler does NOT complete the WorkItem, and will not parse any response from the Camel route, other than possible exceptions. The use-case for this handler is asynchronous, one-way, communication, where an external party is responsible for completing the WorkItem at a later point in time.

    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

      • InOnlyCamelWorkItemHandler

        public InOnlyCamelWorkItemHandler()
      • InOnlyCamelWorkItemHandler

        public InOnlyCamelWorkItemHandler​(String camelEndpointId)
      • InOnlyCamelWorkItemHandler

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

        public InOnlyCamelWorkItemHandler​(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