Invoking web services

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2011 09:23 AM
I'have seen about invoke ws in a step of activiti workflow configuration, I'don't find it.
Is it possibile to do and including parameters too ?
thanks.
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2011 11:01 AM
Maybe this acticle can help you: http://www.bpm-guide.de/2010/12/09/how-to-call-a-webservice-from-bpmn/
Regards
michael

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2011 11:34 AM
I try to call a webservice the standard way like its discribed in the article. But I have some problems with the target and source references. In the article Bernd Rücker use a ioSpecification element at the process element. Is this some kind of a hack to define the needed references?
Is there some other way to define these references, if my process has no inputs and outputs?
Regards
Daniel
<serviceTask name="Call A" startQuantity="1" implementation="##WebService" operationRef="tns:requestA">
<ioSpecification>
<dataInput itemSubjectRef="tns:RequestAItem" id="dataInputOfServiceTask" />
<dataOutput itemSubjectRef="tns:ResponseAItem" id="dataOutputOfServiceTask" />
<inputSet>
<dataInputRefs>dataInputOfServiceTask</dataInputRefs>
</inputSet>
<outputSet>
<dataOutputRefs>dataOutputOfServiceTask</dataOutputRefs>
</outputSet>
</ioSpecification>
<dataInputAssociation>
<sourceRef>???</sourceRef>
<targetRef>dataInputOfServiceTask</targetRef>
<assignment>
<from>${someProcessProperty}</from>
<to>${dataInputOfServiceTask.value}</to>
</assignment>
</dataInputAssociation>
<dataOutputAssociation>
<targetRef>???</targetRef>
<transformation>${dataOutputOfServiceTask.response}</transformation>
</dataOutputAssociation>
</serviceTask>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2011 02:24 AM
See http://activiti.org/userguide/index.html#bpmnWebserviceTask

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2011 04:11 AM
…
<process id="asyncWebServiceInvocationWithDataFlowUEL">
<!–
The Data Inputs and Outputs of a Process have to be explicitly
declared with their type to be valid BPMN 2.0
–>
<ioSpecification>
<dataInput id="dataInputOfProcess" itemSubjectRef="tns:setToRequestItem" />
<inputSet>
<dataInputRefs>dataInputOfProcess</dataInputRefs>
</inputSet>
<outputSet />
</ioSpecification>
…
<serviceTask id="webService"
name="Call WS"
implementation="##WebService"
operationRef="tns:setToOperation">
<!– The BPMN 2.0 Meta Model requires an Input/Output Specification –>
<ioSpecification>
<dataInput itemSubjectRef="tns:setToRequestItem" id="dataInputOfServiceTask" />
<inputSet>
<dataInputRefs>dataInputOfServiceTask</dataInputRefs>
</inputSet>
<outputSet />
</ioSpecification>
<dataInputAssociation>
<sourceRef>dataInputOfProcess</sourceRef>
<targetRef>dataInputOfServiceTask</targetRef>
<assignment>
<from>${dataInputOfProcess.newCounterValue}</from>
<to>${dataInputOfServiceTask.value}</to>
</assignment>
</dataInputAssociation>
</serviceTask>
…
</process>
…
The ioSpecification inside the process element defines that the process has inputs and outputs. But what if my process has no inputs and outputs? What if these references are defined in my process? Normaly I need dataobjects but these elements are not documented in the userguide. Are dataobjects nevertheless supported by activiti?An webservice example with complexe objects would be very helpful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2011 08:43 AM
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definitions"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn"
targetNamespace="org.activiti.enginge.impl.webservice" xmlns:tns="org.activiti.enginge.impl.webservice"
xmlns:counter="http://webservice.activiti.org/">
<import importType="http://schemas.xmlsoap.org/wsdl/" location="http://localhost:63081/counter?wsdl"
namespace="http://webservice.activiti.org/" />
<process id="webServiceInvocationWithParametersFromTask">
<dataObject id="dataInputOfProcess" name="Input for webservice" itemSubjectRef="tns:setToRequestItem"/>
<startEvent id="theStart" />
<sequenceFlow id="flow1" sourceRef="theStart" targetRef="theScriptTask" />
<scriptTask id="theScriptTask" scriptFormat="groovy" name="Execute script">
<script>
def scriptVar = "10"
execution.setVariable("dataInputOfProcess", scriptVar)
</script>
</scriptTask>
<sequenceFlow id="flow1a" sourceRef="theScriptTask" targetRef="webService" />
<serviceTask id="webService" name="Call WS"
implementation="##WebService" operationRef="tns:setToOperation">
<!– The BPMN 2.0 Meta Model requires an Input/Output Specification –>
<ioSpecification>
<dataInput itemSubjectRef="tns:setToRequestItem" id="dataInputOfServiceTask" />
<inputSet>
<dataInputRefs>dataInputOfServiceTask</dataInputRefs>
</inputSet>
<outputSet />
</ioSpecification>
<dataInputAssociation>
<sourceRef>dataInputOfProcess</sourceRef>
<targetRef>dataInputOfServiceTask</targetRef>
<assignment>
<from>${dataInputOfProcess}</from>
<to>${dataInputOfServiceTask.value}</to>
</assignment>
</dataInputAssociation>
</serviceTask>
<sequenceFlow id="flow2" sourceRef="webService"
targetRef="waitState" />
<receiveTask id="waitState" />
<sequenceFlow id="flow3" sourceRef="waitState" targetRef="theEnd" />
<endEvent id="theEnd" />
</process>
<!– Interface: implementationRef = QName of WSDL Port Type –>
<interface name="Counter Interface" implementationRef="counter:Counter">
<!– Operation: implementationRef = QName of WSDL Operation –>
<operation id="setToOperation" name="setTo Operation"
implementationRef="counter:setTo">
<inMessageRef>tns:setToRequestMessage</inMessageRef>
</operation>
</interface>
<message id="setToRequestMessage" itemRef="tns:setToRequestItem" />
<itemDefinition id="setToRequestItem" structureRef="counter:setTo" /><!–
QName of input element –>
</definitions>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2011 05:22 AM
The webservice stuff is only limited documented, as we still haver to expand our coverage there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2014 06:26 AM
" one of the attribute class, delegate expression, type , operation is mandatory on service task"
When I am using the above method, Why activiti explorer gives me this error ? This is mandatory for the java service task as
<serviceTask id="javaService" name="Java service invocation" activiti:class="myservice.servicetask.MyJavaDelegate">
but here we are doing <serviceTask id="myServ" name="CallService" implementation="##WebService" operationRef="tns:sayHello">
In this case, why activiti explorer is producing this error ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2014 04:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2014 05:11 AM
but still I get the same error. Will there be any other JAR missing ?? Why activiti explorer is not invoking it ?
