[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-user
Subject:    [jboss-user] [jBPM] - Re: How to call external web service in jbpm process.
From:       snowstorm tech <do-not-reply () jboss ! com>
Date:       2013-01-31 5:02:14
Message-ID: 2-794918-3-119631-1359471123556-2-795330-3-119631-1359608513533.jivesbs.jivemailuser () https://community ! jboss ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


snowstorm tech [https://community.jboss.org/people/snowstormuser] created the \
discussion

"Re: How to call external web service in jbpm process."

To view the discussion, visit: https://community.jboss.org/message/795330#795330

--------------------------------------------------------------
Thanks for relpy,

I have already used the above link example that you have provided.But i am facing an \
error while execuation of the code. here i'm proving the *bpmn file*, *java code* and \
*error*

The web service that i used is:-*
*
> http://schemas.xmlsoap.org/wsdl/" \
> location="http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" \
> namespace="http://ws.cdyne.com/WeatherWS/

And i also used the class which are genrated for the webservice above specified in my \
project class path.

*bpmn file:-*
*
*
> <?xml version="1.0" encoding="UTF-8"?> 
> <definitions id="Definition"
> targetNamespace=" http://www.example.org/MinimalExample \
> http://www.example.org/MinimalExample" typeLanguage=" http://www.java.com/javaTypes \
> http://www.java.com/javaTypes" expressionLanguage=" http://www.mvel.org/2.0 \
> http://www.mvel.org/2.0" xmlns=" http://www.omg.org/spec/BPMN/20100524/MODEL \
> http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi=" \
> http://www.w3.org/2001/XMLSchema-instance \
> http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" \
> http://www.omg.org/spec/BPMN/20100524/MODEL \
> http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" xmlns:g=" \
> http://www.jboss.org/drools/flow/gpd http://www.jboss.org/drools/flow/gpd" \
> xmlns:bpmndi=" http://www.omg.org/spec/BPMN/20100524/DI \
> http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc=" \
> http://www.omg.org/spec/DD/20100524/DC http://www.omg.org/spec/DD/20100524/DC" \
> xmlns:di=" http://www.omg.org/spec/DD/20100524/DI \
> http://www.omg.org/spec/DD/20100524/DI" xmlns:tns=" http://www.jboss.org/drools \
> http://www.jboss.org/drools"> 
> <import importType=" http://schemas.xmlsoap.org/wsdl/ \
> http://schemas.xmlsoap.org/wsdl/" location=" \
> http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL \
> http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" namespace=" \
> http://ws.cdyne.com/WeatherWS/ http://ws.cdyne.com/WeatherWS/"/> 
> 
> <itemDefinition id="_sItem"/>
> 
> 
> <itemDefinition id="_listItem" structureRef="java.util.Collection"/>
> 
> <itemDefinition id="_listItemOut" structureRef="java.util.Collection"/>
> <itemDefinition id="_map" structureRef="java.util.Map"/>
> 
> 
> <itemDefinition id="_2-2-4-itemItem" />
> 
> 
> <itemDefinition id="_5-listItem" />
> 
> 
> <itemDefinition id="_2_multiInstanceItemType" />
> 
> <itemDefinition id="_2_multiInstanceItemOutType"/>
> 
> 
> <itemDefinition id="_2-2-4_InMessageType" />
> <message id="_2-2-4_InMessage" itemRef="_2-2-4_InMessageType" />
> <interface id="_2-2-4_ServiceInterface" name="" implementationRef="WeatherSoap">
> <operation id="_2-2-4_ServiceOperation" implementationRef="GetCityWeatherByZIP" \
> name=""> <inMessageRef>_2-2-4_InMessage</inMessageRef>
> </operation>
> </interface>
> 
> 
> <process processType="Private" isExecutable="true" id="WeatherWSServiceProcess" \
> name="WeatherWSServiceProcess" tns:packageName="defaultPackage"> 
> 
> <!-- process variables -->
> <property id="list" itemSubjectRef="_listItem"/>
> <property id="listOut" itemSubjectRef="_listItemOut"/>
> <property id="mode" itemSubjectRef="_sItem"/>
> <property id="map" itemSubjectRef="_map"/>
> 
> 
> <!-- nodes -->
> <startEvent id="_1" name="StartProcess" >
> </startEvent>
> <scriptTask id="_21" name="Prepare input" scriptFormat=" http://www.java.com/java \
> http://www.java.com/java" > <script>
> System.out.println("Get zip code result is " + map);
> list =   new java.util.ArrayList(map.values());
> list.remove("Complete");
> listOut =   new java.util.ArrayList();
> kcontext.setVariable("list", list);
> kcontext.setVariable("listOut", listOut);
> </script>
> </scriptTask>
> <serviceTask id="_2" name="Get weather forecast" \
> operationRef="_2-2-4_ServiceOperation" implementation="##WebService" > \
> <extensionElements> <tns:onEntry-script scriptFormat=" http://www.java.com/java \
> http://www.java.com/java"> <script>System.out.println("WS1");</script>
> </tns:onEntry-script>
> <tns:onExit-script>
> <script>System.out.println("WS2");</script>
> </tns:onExit-script>
> </extensionElements>
> <ioSpecification>
> <dataInput id="_2-2-4_param" name="Parameter" />
> <dataInput id="DataInput_1" name="mode"/>
> 
> <dataInput id="_2_listInput" name="list"/>
> <dataOutput id="_2_listOutOutput" name="listOut"/>
> <dataOutput id="_2-2-4_result" name="Result" />
> <inputSet>
> <dataInputRefs>_2-2-4_param</dataInputRefs>
> <dataInputRefs>DataInput_1</dataInputRefs>
> </inputSet>
> <outputSet>
> <dataOutputRefs>_2_listOutOutput</dataOutputRefs>
> </outputSet>
> </ioSpecification>
> <dataInputAssociation>
> <targetRef>_2-2-4_param</targetRef>
> <assignment>
> <from xsi:type="tFormalExpression">#{item}</from>
> <to xsi:type="tFormalExpression">_2-2-4_param</to>
> </assignment>
> </dataInputAssociation>
> <dataInputAssociation>
> <sourceRef>mode</sourceRef>
> <targetRef>DataInput_1</targetRef>
> </dataInputAssociation>
> <dataInputAssociation id="DataInputAssociation_1">
> <sourceRef>list</sourceRef>
> <targetRef>_2_listInput</targetRef>
> </dataInputAssociation>
> <dataOutputAssociation>
> <sourceRef>_2-2-4_result</sourceRef>
> <targetRef>itemOut</targetRef>
> </dataOutputAssociation>
> <multiInstanceLoopCharacteristics>
> <loopDataInputRef>_2_input</loopDataInputRef>
> <loopDataOutputRef>_2_listOutOutput</loopDataOutputRef>
> <inputDataItem id="item" itemSubjectRef="_2_multiInstanceItemType"/>
> <outputDataItem id="itemOut" itemSubjectRef="_2_multiInstanceItemOutType"/>
> </multiInstanceLoopCharacteristics>
> </serviceTask>
> 
> <scriptTask id="_3" name="Log result" >
> <script>System.out.println("Service result " + listOut);</script>
> </scriptTask>
> <endEvent id="_4" name="EndProcess" >
> <terminateEventDefinition/>
> </endEvent>
> <userTask id="_5" name="Get zip codes" >
> <ioSpecification>
> <dataInput id="_2_CommentInput" name="Comment" />
> <dataInput id="_2_SkippableInput" name="Skippable" />
> <dataInput id="_2_TaskNameInput" name="TaskName" />
> <dataInput id="_2_GroupIdInput" name="GroupId" />
> <dataInput id="_2_PriorityInput" name="Priority" />
> <dataOutput id="_2_ResultOutput" name="Result" />
> <inputSet>
> <dataInputRefs>_2_CommentInput</dataInputRefs>
> <dataInputRefs>_2_SkippableInput</dataInputRefs>
> <dataInputRefs>_2_TaskNameInput</dataInputRefs>
> <dataInputRefs>_2_GroupIdInput</dataInputRefs>
> <dataInputRefs>_2_PriorityInput</dataInputRefs>
> </inputSet>
> <outputSet>
> <dataOutputRefs>_2_ResultOutput</dataOutputRefs>
> </outputSet>
> </ioSpecification>
> <dataInputAssociation>
> <targetRef>_2_CommentInput</targetRef>
> <assignment>
> <from xsi:type="tFormalExpression"></from>
> <to xsi:type="tFormalExpression">_2_CommentInput</to>
> </assignment>
> </dataInputAssociation>
> <dataInputAssociation>
> <targetRef>_2_SkippableInput</targetRef>
> <assignment>
> <from xsi:type="tFormalExpression">false</from>
> <to xsi:type="tFormalExpression">_2_SkippableInput</to>
> </assignment>
> </dataInputAssociation>
> <dataInputAssociation>
> <targetRef>_2_TaskNameInput</targetRef>
> <assignment>
> <from xsi:type="tFormalExpression">firstTask</from>
> <to xsi:type="tFormalExpression">_2_TaskNameInput</to>
> </assignment>
> </dataInputAssociation>
> <dataInputAssociation>
> <targetRef>_2_GroupIdInput</targetRef>
> <assignment>
> <from xsi:type="tFormalExpression"></from>
> <to xsi:type="tFormalExpression">_2_GroupIdInput</to>
> </assignment>
> </dataInputAssociation>
> <dataInputAssociation>
> <targetRef>_2_PriorityInput</targetRef>
> <assignment>
> <from xsi:type="tFormalExpression"></from>
> <to xsi:type="tFormalExpression">_2_PriorityInput</to>
> </assignment>
> </dataInputAssociation>
> <dataOutputAssociation>
> <sourceRef>_2_ResultOutput</sourceRef>
> <targetRef>map</targetRef>
> </dataOutputAssociation>
> <potentialOwner>
> <resourceAssignmentExpression>
> <formalExpression>john</formalExpression>
> </resourceAssignmentExpression>
> </potentialOwner>
> </userTask>
> 
> <userTask id="_6" name="Show forecast" >
> <ioSpecification>
> <dataInput id="_4_outputInput" name="output" />
> <dataInput id="_4_CommentInput" name="Comment" />
> <dataInput id="_4_SkippableInput" name="Skippable" />
> <dataInput id="_4_TaskNameInput" name="TaskName" />
> <dataInput id="_4_GroupIdInput" name="GroupId" />
> <dataInput id="_4_PriorityInput" name="Priority" />
> <inputSet>
> <dataInputRefs>_4_outputInput</dataInputRefs>
> <dataInputRefs>_4_CommentInput</dataInputRefs>
> <dataInputRefs>_4_SkippableInput</dataInputRefs>
> <dataInputRefs>_4_TaskNameInput</dataInputRefs>
> <dataInputRefs>_4_GroupIdInput</dataInputRefs>
> <dataInputRefs>_4_PriorityInput</dataInputRefs>
> </inputSet>
> <outputSet>
> </outputSet>
> </ioSpecification>
> <dataInputAssociation>
> <sourceRef>listOut</sourceRef>
> <targetRef>_4_outputInput</targetRef>
> </dataInputAssociation>
> <dataInputAssociation>
> <targetRef>_4_CommentInput</targetRef>
> <assignment>
> <from xsi:type="tFormalExpression"></from>
> <to xsi:type="tFormalExpression">_4_CommentInput</to>
> </assignment>
> </dataInputAssociation>
> <dataInputAssociation>
> <targetRef>_4_SkippableInput</targetRef>
> <assignment>
> <from xsi:type="tFormalExpression">false</from>
> <to xsi:type="tFormalExpression">_4_SkippableInput</to>
> </assignment>
> </dataInputAssociation>
> <dataInputAssociation>
> <targetRef>_4_TaskNameInput</targetRef>
> <assignment>
> <from xsi:type="tFormalExpression">secondTask</from>
> <to xsi:type="tFormalExpression">_4_TaskNameInput</to>
> </assignment>
> </dataInputAssociation>
> <dataInputAssociation>
> <targetRef>_4_GroupIdInput</targetRef>
> <assignment>
> <from xsi:type="tFormalExpression"></from>
> <to xsi:type="tFormalExpression">_4_GroupIdInput</to>
> </assignment>
> </dataInputAssociation>
> <dataInputAssociation>
> <targetRef>_4_PriorityInput</targetRef>
> <assignment>
> <from xsi:type="tFormalExpression"></from>
> <to xsi:type="tFormalExpression">_4_PriorityInput</to>
> </assignment>
> </dataInputAssociation>
> <potentialOwner>
> <resourceAssignmentExpression>
> <formalExpression>john</formalExpression>
> </resourceAssignmentExpression>
> </potentialOwner>
> </userTask>
> 
> 
> <!-- connections -->
> <sequenceFlow id="_21-_2" sourceRef="_21" targetRef="_2" />
> <sequenceFlow id="_2-_3" sourceRef="_2" targetRef="_3" />
> <sequenceFlow id="_3-_6" sourceRef="_3" targetRef="_6" />
> <sequenceFlow id="_1-_5" sourceRef="_1" targetRef="_5" />
> <sequenceFlow id="_5-_21" sourceRef="_5" targetRef="_21" />
> <sequenceFlow id="_6-_4" sourceRef="_6" targetRef="_4" />
> 
> 
> </process>
> 
> 
> <bpmndi:BPMNDiagram>
> <bpmndi:BPMNPlane bpmnElement="WeatherWSServiceProcess" >
> <bpmndi:BPMNShape bpmnElement="_1" >
> <dc:Bounds x="16" y="67" width="48" height="48" />
> </bpmndi:BPMNShape>
> <bpmndi:BPMNShape bpmnElement="_2" >
> <dc:Bounds x="228" y="16" width="200" height="150" />
> </bpmndi:BPMNShape>
> <bpmndi:BPMNShape bpmnElement="_21" >
> <dc:Bounds x="128" y="26" width="200" height="150" />
> </bpmndi:BPMNShape>
> <bpmndi:BPMNShape bpmnElement="_3" >
> <dc:Bounds x="460" y="67" width="92" height="48" />
> </bpmndi:BPMNShape>
> <bpmndi:BPMNShape bpmnElement="_4" >
> <dc:Bounds x="584" y="67" width="48" height="48" />
> </bpmndi:BPMNShape>
> <bpmndi:BPMNShape bpmnElement="_5" >
> <dc:Bounds x="96" y="67" width="100" height="48" />
> </bpmndi:BPMNShape>
> <bpmndi:BPMNShape bpmnElement="_6" >
> <dc:Bounds x="96" y="67" width="140" height="148" />
> </bpmndi:BPMNShape>
> <bpmndi:BPMNEdge bpmnElement="_21-_2" >
> <di:waypoint x="140" y="50" />
> <di:waypoint x="144" y="117" />
> </bpmndi:BPMNEdge>
> <bpmndi:BPMNEdge bpmnElement="_2-_3" >
> <di:waypoint x="42" y="49" />
> <di:waypoint x="140" y="50" />
> </bpmndi:BPMNEdge>
> <bpmndi:BPMNEdge bpmnElement="_3-_6" >
> <di:waypoint x="146" y="91" />
> <di:waypoint x="328" y="91" />
> </bpmndi:BPMNEdge>
> <bpmndi:BPMNEdge bpmnElement="_1-_5" >
> <di:waypoint x="328" y="91" />
> <di:waypoint x="506" y="91" />
> </bpmndi:BPMNEdge>
> <bpmndi:BPMNEdge bpmnElement="_5-_21" >
> <di:waypoint x="506" y="91" />
> <di:waypoint x="608" y="91" />
> </bpmndi:BPMNEdge>
> <bpmndi:BPMNEdge bpmnElement="_6-_4" >
> <di:waypoint x="40" y="91" />
> <di:waypoint x="146" y="91" />
> </bpmndi:BPMNEdge>
> </bpmndi:BPMNPlane>
> </bpmndi:BPMNDiagram>
> 
> 
> </definitions>

*Java code:-*
*
*
> import java.util.*;
> 
> 
> import javax.xml.ws.Endpoint;
> 
> 
> import org.drools.KnowledgeBase;
> import org.drools.builder.KnowledgeBuilder;
> import org.drools.builder.KnowledgeBuilderFactory;
> import org.drools.builder.ResourceType;
> import org.drools.definition.process.Connection;
> import org.drools.definition.process.Node;
> import org.drools.io.ResourceFactory;
> import org.drools.runtime.StatefulKnowledgeSession;
> import org.drools.runtime.process.NodeInstance;
> import org.drools.runtime.process.WorkItem;
> import org.drools.runtime.process.WorkItemHandler;
> import org.drools.runtime.process.WorkItemManager;
> import org.jbpm.bpmn2.handler.ServiceTaskHandler;
> import org.jbpm.process.instance.ProcessInstance;
> import org.jbpm.process.workitem.wsht.CommandBasedWSHumanTaskHandler;
> import org.jbpm.task.service.TaskClientHandler;
> import org.jbpm.workflow.core.node.HumanTaskNode;
> import org.jbpm.workflow.instance.WorkflowProcessInstance;
> import org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl;
> 
> 
> public class ProcessMain {
> 
> public static void main(String[] args) throws Exception {
> 
> 
> 
> 
> KnowledgeBase kbase = readKnowledgeBase();
> StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
> TestWorkItemHandler htHandler = new TestWorkItemHandler();
> ksession.getWorkItemManager().registerWorkItemHandler("Service Task", new \
> ServiceTaskHandler()); ksession.getWorkItemManager().registerWorkItemHandler("Human \
> Task", htHandler); Map<String, Object> params = new HashMap<String, Object>();
> params.put("mode", "async");
> WorkflowProcessInstance processInstance = (WorkflowProcessInstance) \
> ksession.startProcess("WeatherWSServiceProcess", params); params = new \
> HashMap<String, Object>(); params.put("r1", "14025");
> HashMap<String, Object> results = new HashMap<String, Object>();
> results.put("Result", params);
> ksession.getWorkItemManager().completeWorkItem(htHandler.getWorkItem().getId(), \
> results); Thread.sleep(5000);
> ksession.getWorkItemManager().completeWorkItem(htHandler.getWorkItem().getId(), \
> null); 
> }
> static class TestWorkItemHandler implements WorkItemHandler {
> 
> 
> private static TestWorkItemHandler INSTANCE = new TestWorkItemHandler();
> 
> 
> private WorkItem workItem;
> private WorkItem aborted;
> 
> 
> public static TestWorkItemHandler getInstance() {
> return INSTANCE;
> }
> 
> 
> public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
> this.workItem = workItem;
> }
> 
> 
> public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {
> this.aborted = workItem;
> }
> 
> 
> public WorkItem getWorkItem() {
> WorkItem result = workItem;
> workItem = null;
> return result;
> }
> 
> 
> public WorkItem getAbortedWorkItem() {
> WorkItem result = aborted;
> aborted = null;
> return result;
> }
> 
> 
> }
> }
> 

*Error:-*
*
*> Get zip code result is {r1=14025}
> 
> java.lang.ClassNotFoundException: 
> 
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/795330#795330]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]



[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; \
margin: 0; padding: 20px;">

<div>
	<table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: \
1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tbody>
			<tr>

				<td>

					<table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" \
style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: \
6px; -webkit-border-radius: 6px;">  <tbody>
							<tr>
								<td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px \
solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; \
-moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; \
                -webkit-border-top-left-radius: 5px;">
									<h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; \
                margin: 0; display: block !important;">
									<!-- To have a header image/logo replace the name below with your img tag \
                -->
									<!-- Email clients will render the images when the message is read so any \
                image -->
									<!-- must be made available on a public server, so that all recipients can \
                load the image. -->
									<a href="https://community.jboss.org/index.jspa" style="text-decoration: \
none; color: #E1E1E1">JBoss Community</a></h1>  </td>

							</tr>
							<tr>
								<td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; \
color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; \
-moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; \
-webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: \
17px; font-weight: normal;">  Re: How to call external web service in jbpm process.
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/snowstormuser">snowstorm \
tech</a> in <i>jBPM</i> - <a \
href="https://community.jboss.org/message/795330#795330">View the full discussion</a> \
</span> <hr style="margin: 20px 0; border: none; background-color: #dadada; height: \
1px;">

<div class="jive-rendered-content"><p>Thanks for relpy,</p><p style="min-height: 8pt; \
height: 8pt; padding: 0px;">&#160;</p><p>I have already used the above link example \
that you have provided.But i am facing an error while execuation of the \
code.</p><p>here i'm proving the <strong>bpmn file</strong>, <strong>java \
code</strong> and <strong>error</strong></p><p style="min-height: 8pt; height: 8pt; \
padding: 0px;">&#160;</p><p>The web service that i used \
is:-<strong><br/></strong></p><blockquote class="jive-quote"><p><span \
style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: \
#ffffff;"><a class="jive-link-external-small" href="http://schemas.xmlsoap.org/wsdl/" \
rel="nofollow" target="_blank">http://schemas.xmlsoap.org/wsdl/</a><span>" \
location="</span><a class="jive-link-external-small" \
href="http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" rel="nofollow" \
target="_blank">http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL</a><span>" \
namespace="</span><a class="jive-link-external-small" \
href="http://ws.cdyne.com/WeatherWS/" rel="nofollow" \
target="_blank">http://ws.cdyne.com/WeatherWS/</a></span></p></blockquote><p \
style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>And i also used the \
class which are genrated for the webservice above specified in my project class \
path.</p><p style="min-height: 8pt; height: 8pt; padding: \
0px;">&#160;</p><p><strong>bpmn \
file:-</strong></p><p><strong><br/></strong></p><blockquote \
class="jive-quote"><p>&lt;?xml version="1.0" encoding="UTF-8"?&gt; \
</p><p>&lt;definitions \
id="Definition"</p><p><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
targetNamespace="</span><a class="jive-link-external-small" \
href="http://www.example.org/MinimalExample" rel="nofollow" \
target="_blank">http://www.example.org/MinimalExample</a><span>"</span></p><p><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
typeLanguage="</span><a class="jive-link-external-small" \
href="http://www.java.com/javaTypes" rel="nofollow" \
target="_blank">http://www.java.com/javaTypes</a><span>"</span></p><p><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
expressionLanguage="</span><a class="jive-link-external-small" \
href="http://www.mvel.org/2.0" rel="nofollow" \
target="_blank">http://www.mvel.org/2.0</a><span>"</span></p><p><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
xmlns="</span><a class="jive-link-external-small" \
href="http://www.omg.org/spec/BPMN/20100524/MODEL" rel="nofollow" \
target="_blank">http://www.omg.org/spec/BPMN/20100524/MODEL</a><span>"</span></p><p><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
xmlns:xsi="</span><a class="jive-link-external-small" \
href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow" \
target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>"</span></p><p><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
xsi:schemaLocation="</span><a class="jive-link-external-small" \
href="http://www.omg.org/spec/BPMN/20100524/MODEL" rel="nofollow" \
target="_blank">http://www.omg.org/spec/BPMN/20100524/MODEL</a><span> \
BPMN20.xsd"</span></p><p><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
xmlns:g="</span><a class="jive-link-external-small" \
href="http://www.jboss.org/drools/flow/gpd" rel="nofollow" \
target="_blank">http://www.jboss.org/drools/flow/gpd</a><span>"</span></p><p><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
xmlns:bpmndi="</span><a class="jive-link-external-small" \
href="http://www.omg.org/spec/BPMN/20100524/DI" rel="nofollow" \
target="_blank">http://www.omg.org/spec/BPMN/20100524/DI</a><span>"</span></p><p><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
xmlns:dc="</span><a class="jive-link-external-small" \
href="http://www.omg.org/spec/DD/20100524/DC" rel="nofollow" \
target="_blank">http://www.omg.org/spec/DD/20100524/DC</a><span>"</span></p><p><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
xmlns:di="</span><a class="jive-link-external-small" \
href="http://www.omg.org/spec/DD/20100524/DI" rel="nofollow" \
target="_blank">http://www.omg.org/spec/DD/20100524/DI</a><span>"</span></p><p><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
xmlns:tns="</span><a class="jive-link-external-small" \
href="http://www.jboss.org/drools" rel="nofollow" \
target="_blank">http://www.jboss.org/drools</a><span>"&gt;</span></p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
</p><p><span>&#160; &lt;import importType="</span><a class="jive-link-external-small" \
href="http://schemas.xmlsoap.org/wsdl/" rel="nofollow" \
target="_blank">http://schemas.xmlsoap.org/wsdl/</a><span>" location="</span><a \
class="jive-link-external-small" \
href="http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL" rel="nofollow" \
target="_blank">http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL</a><span>" \
namespace="</span><a class="jive-link-external-small" \
href="http://ws.cdyne.com/WeatherWS/" rel="nofollow" \
target="_blank">http://ws.cdyne.com/WeatherWS/</a><span>"/&gt;</span></p><p \
style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: \
8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160; &lt;itemDefinition \
id="_sItem"/&gt;</p><p style="min-height: 8pt; height: 8pt; padding: \
0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: \
0px;">&#160;</p><p>&#160; &lt;itemDefinition id="_listItem" \
structureRef="java.util.Collection"/&gt;</p><p>&#160; </p><p>&#160; \
&lt;itemDefinition id="_listItemOut" \
structureRef="java.util.Collection"/&gt;</p><p>&#160; &lt;itemDefinition id="_map" \
structureRef="java.util.Map"/&gt;</p><p style="min-height: 8pt; height: 8pt; padding: \
0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: \
0px;">&#160;</p><p>&#160; &lt;itemDefinition id="_2-2-4-itemItem" /&gt;</p><p \
style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: \
8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160; &lt;itemDefinition \
id="_5-listItem" /&gt;</p><p style="min-height: 8pt; height: 8pt; padding: \
0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: \
0px;">&#160;</p><p>&#160; &lt;itemDefinition id="_2_multiInstanceItemType" \
/&gt;</p><p>&#160; </p><p>&#160; &lt;itemDefinition \
id="_2_multiInstanceItemOutType"/&gt;</p><p style="min-height: 8pt; height: 8pt; \
padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: \
0px;">&#160;</p><p>&#160; &lt;itemDefinition id="_2-2-4_InMessageType" \
/&gt;</p><p>&#160; &lt;message id="_2-2-4_InMessage" itemRef="_2-2-4_InMessageType" \
/&gt;</p><p>&#160; &lt;interface id="_2-2-4_ServiceInterface" name="" \
implementationRef="WeatherSoap"&gt;</p><p>&#160;&#160;&#160; &lt;operation \
id="_2-2-4_ServiceOperation" implementationRef="GetCityWeatherByZIP" \
name=""&gt;</p><p>&#160;&#160;&#160;&#160;&#160; \
&lt;inMessageRef&gt;_2-2-4_InMessage&lt;/inMessageRef&gt;</p><p>&#160;&#160;&#160; \
&lt;/operation&gt;</p><p>&#160; &lt;/interface&gt;</p><p style="min-height: 8pt; \
height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; \
padding: 0px;">&#160;</p><p>&#160; &lt;process processType="Private" \
isExecutable="true" id="WeatherWSServiceProcess" name="WeatherWSServiceProcess" \
tns:packageName="defaultPackage"&gt;</p><p style="min-height: 8pt; height: 8pt; \
padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: \
0px;">&#160;</p><p>&#160;&#160;&#160; &lt;!-- process variables \
--&gt;</p><p>&#160;&#160;&#160; &lt;property id="list" \
itemSubjectRef="_listItem"/&gt;</p><p>&#160;&#160;&#160; &lt;property id="listOut" \
itemSubjectRef="_listItemOut"/&gt;</p><p>&#160;&#160;&#160; &lt;property id="mode" \
itemSubjectRef="_sItem"/&gt;</p><p>&#160;&#160;&#160; &lt;property id="map" \
itemSubjectRef="_map"/&gt;</p><p style="min-height: 8pt; height: 8pt; padding: \
0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: \
0px;">&#160;</p><p>&#160;&#160;&#160; &lt;!-- nodes --&gt;</p><p>&#160;&#160;&#160; \
&lt;startEvent id="_1" name="StartProcess" &gt;</p><p>&#160;&#160;&#160; \
&lt;/startEvent&gt;</p><p><span>&#160;&#160;&#160;&#160; &lt;scriptTask id="_21" \
name="Prepare input" scriptFormat="</span><a class="jive-link-external-small" \
href="http://www.java.com/java" rel="nofollow" \
target="_blank">http://www.java.com/java</a><span>" \
&gt;</span></p><p>&#160;&#160;&#160;&#160;&#160; \
&lt;script&gt;</p><p>&#160;&#160;&#160;&#160;&#160; System.out.println("Get zip code \
result is " + map);</p><p>&#160;&#160;&#160;&#160;&#160; list =&#160; new \
java.util.ArrayList(map.values());</p><p>&#160;&#160;&#160;&#160;&#160; \
list.remove("Complete");</p><p>&#160;&#160;&#160;&#160;&#160; listOut =&#160; new \
java.util.ArrayList();</p><p>&#160;&#160;&#160;&#160;&#160; \
kcontext.setVariable("list", list);</p><p>&#160;&#160;&#160;&#160;&#160; \
kcontext.setVariable("listOut", listOut);</p><p>&#160;&#160;&#160;&#160; \
&lt;/script&gt;</p><p>&#160;&#160;&#160; &lt;/scriptTask&gt;</p><p>&#160;&#160;&#160; \
&lt;serviceTask id="_2" name="Get weather forecast" \
operationRef="_2-2-4_ServiceOperation" implementation="##WebService" \
&gt;</p><p>&#160;&#160;&#160; \
&lt;extensionElements&gt;</p><p><span>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;tns:onEntry-script scriptFormat="</span><a class="jive-link-external-small" \
href="http://www.java.com/java" rel="nofollow" \
target="_blank">http://www.java.com/java</a><span>"&gt;</span></p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;script&gt;System.out.println("WS1");&lt;/script&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;/tns:onEntry-script&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;tns:onExit-script&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;script&gt;System.out.println("WS2");&lt;/script&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;/tns:onExit-script&gt;</p><p>&#160;&#160;&#160;&#160;&#160; \
&lt;/extensionElements&gt;</p><p>&#160;&#160;&#160;&#160;&#160; \
&lt;ioSpecification&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;dataInput id="_2-2-4_param" name="Parameter" \
/&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;dataInput id="DataInput_1" \
name="mode"/&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;dataInput id="_2_listInput" \
name="list"/&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;dataOutput \
id="_2_listOutOutput" \
name="listOut"/&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;dataOutput \
id="_2-2-4_result" name="Result" \
/&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;inputSet&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;dataInputRefs&gt;_2-2-4_param&lt;/dataInputRefs&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;dataInputRefs&gt;DataInput_1&lt;/dataInputRefs&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;/inputSet&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;outputSet&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;dataOutputRefs&gt;_2_listOutOutput&lt;/dataOutputRefs&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;/outputSet&gt;</p><p>&#160;&#160;&#160;&#160;&#160; \
&lt;/ioSpecification&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;dataInputAssociation&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;targetRef&gt;_2-2-4_param&lt;/targetRef&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;assignment&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;from xsi:type="tFormalExpression"&gt;#{item}&lt;/from&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;to xsi:type="tFormalExpression"&gt;_2-2-4_param&lt;/to&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;/assignment&gt;</p><p>&#160;&#160;&#160;&#160;&#160; \
&lt;/dataInputAssociation&gt;</p><p>&#160;&#160;&#160;&#160;&#160; \
&lt;dataInputAssociation&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;sourceRef&gt;mode&lt;/sourceRef&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;targetRef&gt;DataInput_1&lt;/targetRef&gt;</p><p>&#160;&#160;&#160;&#160;&#160; \
&lt;/dataInputAssociation&gt;</p><p>&#160;&#160;&#160;&#160;&#160; \
&lt;dataInputAssociation \
id="DataInputAssociation_1"&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;sourceRef&gt;list&lt;/sourceRef&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;targetRef&gt;_2_listInput&lt;/targetRef&gt;</p><p>&#160;&#160;&#160;&#160;&#160; \
&lt;/dataInputAssociation&gt;</p><p>&#160;&#160;&#160;&#160;&#160; \
&lt;dataOutputAssociation&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;sourceRef&gt;_2-2-4_result&lt;/sourceRef&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;targetRef&gt;itemOut&lt;/targetRef&gt;</p><p>&#160;&#160;&#160;&#160;&#160; \
&lt;/dataOutputAssociation&gt;</p><p>&#160;&#160;&#160;&#160;&#160; \
&lt;multiInstanceLoopCharacteristics&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;loopDataInputRef&gt;_2_input&lt;/loopDataInputRef&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;loopDataOutputRef&gt;_2_listOutOutput&lt;/loopDataOutputRef&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;inputDataItem id="item" \
itemSubjectRef="_2_multiInstanceItemType"/&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;outputDataItem id="itemOut" \
itemSubjectRef="_2_multiInstanceItemOutType"/&gt;</p><p>&#160;&#160;&#160;&#160;&#160; \
&lt;/multiInstanceLoopCharacteristics&gt;</p><p>&#160;&#160;&#160; \
&lt;/serviceTask&gt;</p><p>&#160;&#160;&#160; </p><p>&#160;&#160;&#160; \
&lt;scriptTask id="_3" name="Log result" &gt;</p><p>&#160;&#160;&#160;&#160;&#160; \
&lt;script&gt;System.out.println("Service result " + \
listOut);&lt;/script&gt;</p><p>&#160;&#160;&#160; \
&lt;/scriptTask&gt;</p><p>&#160;&#160;&#160; &lt;endEvent id="_4" name="EndProcess" \
&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;terminateEventDefinition/&gt;</p><p>&#160;&#160;&#160; \
&lt;/endEvent&gt;</p><p>&#160;&#160;&#160; &lt;userTask id="_5" name="Get zip codes" \
&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&lt;ioSpecification&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
&lt;dataInput id="_2_CommentInput" name="Comment" \
/&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;dataInput \
id="_2_SkippableInput" name="Skippable" \
/&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;dataInput \
id="_2_TaskNameInput" name="TaskName" \
/&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;dataInput \
id="_2_GroupIdInput" name="GroupId" \
/&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;dataInput \
id="_2_PriorityInput" name="Priority" \
/&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;dataOutput \
id="_2_ResultOutput" name="Result" \
/&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a \
href="https://community.jboss.org/message/795330#795330">going to Community</a></p>  \
<p style="margin: 0;">Start a new discussion in jBPM at <a \
href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
 </div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>



_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic