Class InOutCamelWorkItemHandler
- java.lang.Object
-
- org.jbpm.process.workitem.core.AbstractLogOrThrowWorkItemHandler
-
- org.apache.camel.component.jbpm.workitem.AbstractCamelWorkItemHandler
-
- org.apache.camel.component.jbpm.workitem.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 jBPMWorkItemHandler
that sendsExchanges
with anInOut
Message Exchange Pattern. This handler parses the response message from the given Camel route and completes theWorkItem
. The use-case for this handler is synchronous, request-response style, communication. The handler creates a Camel Exchange and sets theWorkItem
as the body of theMessage
. Furthermore, the following message headers are set:- deploymentId
- processInstanceId
- workItemId
-
-
Constructor Summary
Constructors Constructor Description InOutCamelWorkItemHandler()
InOutCamelWorkItemHandler(String camelEndpointId)
InOutCamelWorkItemHandler(org.kie.api.runtime.manager.RuntimeManager runtimeManager)
InOutCamelWorkItemHandler(org.kie.api.runtime.manager.RuntimeManager runtimeManager, String camelEndpointId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.camel.Exchange
buildExchange(org.apache.camel.ProducerTemplate template, org.kie.api.runtime.process.WorkItem workItem)
protected void
handleResponse(org.apache.camel.Exchange responseExchange, org.kie.api.runtime.process.WorkItem workItem, org.kie.api.runtime.process.WorkItemManager manager)
-
Methods inherited from class org.apache.camel.component.jbpm.workitem.AbstractCamelWorkItemHandler
abortWorkItem, close, executeWorkItem, getCamelEndpointId
-
-
-
-
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 classAbstractCamelWorkItemHandler
-
buildExchange
protected org.apache.camel.Exchange buildExchange(org.apache.camel.ProducerTemplate template, org.kie.api.runtime.process.WorkItem workItem)
- Specified by:
buildExchange
in classAbstractCamelWorkItemHandler
-
-