Class WebServiceWorkItemHandler
- java.lang.Object
-
- org.jbpm.process.workitem.core.AbstractLogOrThrowWorkItemHandler
-
- org.jbpm.process.workitem.webservice.WebServiceWorkItemHandler
-
- All Implemented Interfaces:
org.kie.api.runtime.process.WorkItemHandler,org.kie.internal.runtime.Cacheable
@Wid(widfile="WebServiceDefinitions.wid",name="WebService",displayName="WebService",defaultHandler="mvel: new org.jbpm.process.workitem.webservice.WebServiceWorkItemHandler()",documentation="jbpm-workitems-webservice/index.html",category="jbpm-workitems-webservice",icon="defaultwebserviceicon.png",parameters={@WidParameter(name="Url"),@WidParameter(name="Namespace"),@WidParameter(name="Interface"),@WidParameter(name="Operation"),@WidParameter(name="Endpoint"),@WidParameter(name="Parameter"),@WidParameter(name="Mode"),@WidParameter(name="Wrapped"),@WidParameter(name="Username"),@WidParameter(name="Password")},results=@WidResult(name="Result",runtimeType="java.lang.Object"),mavenDepends=@WidMavenDepends(group="org.jbpm",artifact="jbpm-workitems-webservice",version="7.73.0.Final"),serviceInfo=@WidService(category="WebService",description="Perform WebService operations",keywords="webservice,call",action=@WidAction(title="Perform a WebService call"),authinfo=@WidAuth)) public class WebServiceWorkItemHandler extends org.jbpm.process.workitem.core.AbstractLogOrThrowWorkItemHandler implements org.kie.internal.runtime.CacheableWeb Service Work Item Handler that performs a WebService call.
-
-
Field Summary
Fields Modifier and Type Field Description static StringWSDL_IMPORT_TYPE
-
Constructor Summary
Constructors Constructor Description WebServiceWorkItemHandler()Default constructor - no authentication nor ksessionWebServiceWorkItemHandler(String handlingProcessId, String handlingStrategy, org.kie.api.runtime.KieSession ksession)Used when no authentication is requiredWebServiceWorkItemHandler(String handlingProcessId, String handlingStrategy, org.kie.api.runtime.KieSession ksession, int timeout)Used when no authentication is requiredWebServiceWorkItemHandler(String handlingProcessId, String handlingStrategy, org.kie.api.runtime.KieSession ksession, int timeout, String username, String password)Dedicated constructor when BASIC authentication method shall be usedWebServiceWorkItemHandler(String handlingProcessId, String handlingStrategy, org.kie.api.runtime.KieSession ksession, ClassLoader classloader)Used when no authentication is requiredWebServiceWorkItemHandler(String handlingProcessId, String handlingStrategy, org.kie.api.runtime.KieSession ksession, ClassLoader classloader, String username, String password)Dedicated constructor when BASIC authentication method shall be usedWebServiceWorkItemHandler(String handlingProcessId, String handlingStrategy, org.kie.api.runtime.KieSession kieSession, String username, String password)Dedicated constructor when BASIC authentication method shall be usedWebServiceWorkItemHandler(org.kie.api.runtime.KieSession ksession)Used when no authentication is requiredWebServiceWorkItemHandler(org.kie.api.runtime.KieSession ksession, int timeout)Used when no authentication is requiredWebServiceWorkItemHandler(org.kie.api.runtime.KieSession ksession, int timeout, String username, String password)Dedicated constructor when BASIC authentication method shall be usedWebServiceWorkItemHandler(org.kie.api.runtime.KieSession ksession, ClassLoader classloader)Used when no authentication is requiredWebServiceWorkItemHandler(org.kie.api.runtime.KieSession ksession, ClassLoader classloader, String username, String password)Dedicated constructor when BASIC authentication method shall be usedWebServiceWorkItemHandler(org.kie.api.runtime.KieSession kieSession, String username, String password)Dedicated constructor when BASIC authentication method shall be used
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabortWorkItem(org.kie.api.runtime.process.WorkItem workItem, org.kie.api.runtime.process.WorkItemManager manager)protected voidapplyAuthorization(String userName, String password, org.apache.cxf.endpoint.Client client)voidclose()static ObjectcreateEscapeHandler(org.apache.cxf.jaxb.JAXBDataBinding binding, String escapeHandler)voidexecuteWorkItem(org.kie.api.runtime.process.WorkItem workItem, org.kie.api.runtime.process.WorkItemManager manager)ClassLoadergetClassLoader()protected org.apache.cxf.endpoint.dynamic.DynamicClientFactorygetDynamicClientFactory()protected org.apache.cxf.endpoint.ClientgetWSClient(org.kie.api.runtime.process.WorkItem workItem, String interfaceRef)protected StringnonNull(String value)voidsetClassLoader(ClassLoader classLoader)voidsetClients(ConcurrentHashMap<String,org.apache.cxf.endpoint.Client> clients)
-
-
-
Field Detail
-
WSDL_IMPORT_TYPE
public static final String WSDL_IMPORT_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WebServiceWorkItemHandler
public WebServiceWorkItemHandler()
Default constructor - no authentication nor ksession
-
WebServiceWorkItemHandler
public WebServiceWorkItemHandler(org.kie.api.runtime.KieSession ksession)
Used when no authentication is required- Parameters:
ksession- - kie session
-
WebServiceWorkItemHandler
public WebServiceWorkItemHandler(org.kie.api.runtime.KieSession kieSession, String username, String password)Dedicated constructor when BASIC authentication method shall be used- Parameters:
kieSession- - kie sessionusername- - basic auth usernamepassword- - basic auth password
-
WebServiceWorkItemHandler
public WebServiceWorkItemHandler(org.kie.api.runtime.KieSession ksession, ClassLoader classloader)Used when no authentication is required- Parameters:
ksession- - kie sessionclassloader- - classloader to use
-
WebServiceWorkItemHandler
public WebServiceWorkItemHandler(org.kie.api.runtime.KieSession ksession, ClassLoader classloader, String username, String password)Dedicated constructor when BASIC authentication method shall be used- Parameters:
ksession- - kie sessionclassloader- - classloader to useusername- - basic auth usernamepassword- - basic auth password
-
WebServiceWorkItemHandler
public WebServiceWorkItemHandler(org.kie.api.runtime.KieSession ksession, int timeout)Used when no authentication is required- Parameters:
ksession- - kie sessiontimeout- - connection timeout
-
WebServiceWorkItemHandler
public WebServiceWorkItemHandler(org.kie.api.runtime.KieSession ksession, int timeout, String username, String password)Dedicated constructor when BASIC authentication method shall be used- Parameters:
ksession- - kie sessiontimeout- - connection timeoutusername- - basic auth usernamepassword- - basic auth password
-
WebServiceWorkItemHandler
public WebServiceWorkItemHandler(String handlingProcessId, String handlingStrategy, org.kie.api.runtime.KieSession ksession)
Used when no authentication is required- Parameters:
handlingProcessId- - process id to handle exceptionhandlingStrategy- - strategy to be applied after handling exception process is completedksession- - kie session
-
WebServiceWorkItemHandler
public WebServiceWorkItemHandler(String handlingProcessId, String handlingStrategy, org.kie.api.runtime.KieSession kieSession, String username, String password)
Dedicated constructor when BASIC authentication method shall be used- Parameters:
handlingProcessId- - process id to handle exceptionhandlingStrategy- - strategy to be applied after handling exception process is completedkieSession- - kie sessionusername- - basic auth usernamepassword- - basic auth password
-
WebServiceWorkItemHandler
public WebServiceWorkItemHandler(String handlingProcessId, String handlingStrategy, org.kie.api.runtime.KieSession ksession, ClassLoader classloader)
Used when no authentication is required- Parameters:
handlingProcessId- - process id to handle exceptionhandlingStrategy- - strategy to be applied after handling exception process is completedksession- - kie sessionclassloader- - classloader to use
-
WebServiceWorkItemHandler
public WebServiceWorkItemHandler(String handlingProcessId, String handlingStrategy, org.kie.api.runtime.KieSession ksession, ClassLoader classloader, String username, String password)
Dedicated constructor when BASIC authentication method shall be used- Parameters:
handlingProcessId- - process id to handle exceptionhandlingStrategy- - strategy to be applied after handling exception process is completedksession- - kie sessionclassloader- - classloader to useusername- - basic auth usernamepassword- - basic auth password
-
WebServiceWorkItemHandler
public WebServiceWorkItemHandler(String handlingProcessId, String handlingStrategy, org.kie.api.runtime.KieSession ksession, int timeout)
Used when no authentication is required- Parameters:
handlingProcessId- - process id to handle exceptionhandlingStrategy- - strategy to be applied after handling exception process is completedksession- - kie sessiontimeout- - connection timeout
-
WebServiceWorkItemHandler
public WebServiceWorkItemHandler(String handlingProcessId, String handlingStrategy, org.kie.api.runtime.KieSession ksession, int timeout, String username, String password)
Dedicated constructor when BASIC authentication method shall be used- Parameters:
handlingProcessId- - process id to handle exceptionhandlingStrategy- - strategy to be applied after handling exception process is completedksession- - kie sessiontimeout- - connection timeoutusername- - basic auth usernamepassword- - basic auth password
-
-
Method Detail
-
executeWorkItem
public void executeWorkItem(org.kie.api.runtime.process.WorkItem workItem, org.kie.api.runtime.process.WorkItemManager manager)- Specified by:
executeWorkItemin interfaceorg.kie.api.runtime.process.WorkItemHandler
-
getWSClient
protected org.apache.cxf.endpoint.Client getWSClient(org.kie.api.runtime.process.WorkItem workItem, String interfaceRef)
-
createEscapeHandler
public static Object createEscapeHandler(org.apache.cxf.jaxb.JAXBDataBinding binding, String escapeHandler)
-
getDynamicClientFactory
protected org.apache.cxf.endpoint.dynamic.DynamicClientFactory getDynamicClientFactory()
-
abortWorkItem
public void abortWorkItem(org.kie.api.runtime.process.WorkItem workItem, org.kie.api.runtime.process.WorkItemManager manager)- Specified by:
abortWorkItemin interfaceorg.kie.api.runtime.process.WorkItemHandler
-
getClassLoader
public ClassLoader getClassLoader()
-
setClassLoader
public void setClassLoader(ClassLoader classLoader)
-
close
public void close()
- Specified by:
closein interfaceorg.kie.internal.runtime.Cacheable
-
applyAuthorization
protected void applyAuthorization(String userName, String password, org.apache.cxf.endpoint.Client client)
-
setClients
public void setClients(ConcurrentHashMap<String,org.apache.cxf.endpoint.Client> clients)
-
-