And now with the 2 files :-)
Process file :
<?xml version="1.0" encoding="UTF-8"?>
<process name="budgetApprovalProcessWithInvoke"
targetNamespace="http://www.ibsbe.be/twister/projectinvoke/process/"
xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:lns="http://www.ibsbe.be/twister/projectinvoke/definition/">
<correlationSets>
<correlationSet properties="lns:project_id" name="requestCorr"/>
<correlationSet properties="lns:workitem" name="workCorr"/>
</correlationSets>
<partnerLinks>
<partnerLink name="loaner"
partnerLinkType="lns:budgetPartnerLinkType" myRole="budgetService"/>
<partnerLink name="customer"
partnerLinkType="lns:budgetPartnerLinkType"
partnerRole="customerService"/>
<partnerLink name="isisLink"
partnerLinkType="lns:isisPartnerLinkType" partnerRole="isisService"/>
</partnerLinks>
<variables>
<variable name="request"
messageType="lns:budgetInformationMessage"/>
<variable name="approval" messageType="lns:approvalMessage"/>
<variable name="budgetwork"
messageType="lns:budgetApprovalRequestMessage"/>
<variable name="budgetMgrAnswer"
messageType="lns:approvalMessage"/>
<variable name="workAnswer" messageType="lns:answerMessage"/>
<variable name="isisRequest"
messageType="lns:receiveApprovalRequest"/>
</variables>
<sequence>
<receive partnerLink="loaner" portType="lns:budgetServicePT"
operation="request"
variable="request" createInstance="yes">
<correlations>
<correlation set="requestCorr" initiate="true"/>
</correlations>
</receive>
<switch>
<case
condition="bpws:getVariableData('request','project_budget')<10000">
<assign>
<copy>
<from expression="'yes'"/>
<to variable="approval" part="accept"/>
</copy>
</assign>
</case>
<otherwise>
<sequence>
<!-- Create a Work Item for a loan manager -->
<assign>
<copy>
<from>budgetmanager</from>
<to variable="budgetwork" part="wipart"
query="/user"/>
</copy>
<copy>
<from>Validate this project budget
request</from>
<to variable="budgetwork" part="wipart"
query="/description"/>
</copy>
<copy>
<from variable="request" part="project_id"/>
<to variable="budgetwork" part="project_id"/>
</copy>
</assign>
<invoke partnerLink="approver" portType="WorkListPT"
operation="createWork"
inputVariable="budgetwork"
outputVariable="workAnswer">
<correlations>
<correlation set="workCorr" initiate="true"
pattern="in"/>
</correlations>
</invoke>
<receive partnerLink="WorkListMgr"
portType="WorkListAnswerPT" operation="receiveAnswer"
variable="budgetMgrAnswer">
<correlations>
<correlation set="workCorr"/>
</correlations>
</receive>
<!-- We should copy from the loanMgrAnswer variable
instead of a static assignment-->
<assign>
<copy>
<from variable="budgetMgrAnswer" part="accept"
/>
<to variable="approval" part="accept"/>
</copy>
</assign>
</sequence>
</otherwise>
</switch>
<assign>
<copy>
<from variable="request" part="project_id"/>
<to variable="isisRequest" part="project_id"/>
</copy>
<copy>
<from variable="approval" part="accept"/>
<to variable="isisRequest" part="project_result"/>
</copy>
</assign>
<invoke partnerLink="isisLink"
portType="lns:WSReceiver"
operation="receiveApproval"
inputVariable="isisRequest">
</invoke>
</sequence>
</process>
==============
wsdl file :
<?xml version="1.0" encoding="UTF-8"?>
<definitions
targetNamespace="http://www.ibsbe.be/twister/projectinvoke/definition/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:bpel="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:wi="http://www.smartcomps.org/twister/types/workitem/"
xmlns:typens="http://www.ibsbe.be/twister/projectinvoke/definition/"
xmlns:impl="http://www.ibsbe.be/twister/projectinvoke/definition/"
xmlns:lns="http://www.ibsbe.be/twister/projectinvoke/definition/">
<message name="budgetInformationMessage">
<part name="project_id" type="xsd:string"/>
<part name="project_budget" type="xsd:integer"/>
</message>
<message name="approvalMessage">
<part name="accept" type="xsd:string"/>
<part name="project_id" type="xsd:string"/>
</message>
<message name="approvalRequestMessage">
<part name="project_id" type="xsd:string"/>
<part name="wipart" type="wi:workitem"/>
</message>
<message name="receiveApprovalRequest">
<part name="project_id" type="xsd:string"/>
<part name="project_result" type="xsd:string"/>
</message>
<bpel:property name="project_id" type="xsd:string"/>
<bpel:propertyAlias propertyName="project_id"
messageType="budgetInformationMessage" part="project_id"/>
<bpel:propertyAlias propertyName="project_id"
messageType="approvalMessage" part="project_id"/>
<bpel:property name="workitem" type="xsd:string"/>
<bpel:propertyAlias propertyName="workitem" messageType="workMessage"
part="wipart" query="/workitemid"/>
<portType name="budgetServicePT">
<operation name="request">
<input message="lns:budgetInformationMessage"/>
</operation>
<operation name="response">
<input message="lns:approvalMessage"/>
</operation>
</portType>
<portType name="budgetApprovalPT">
<operation name="approve">
<input message="lns:budgetInformationMessage"/>
</operation>
</portType>
<!-- Port for ISIS.Xpress - receiveApproval -->
<portType name="WSReceiver">
<operation name="receiveApproval">
<input message="typens:receiveApprovalRequest"
name="receiveApprovalRequest"/>
</operation>
</portType>
<!-- Binding for ISIS.Xpress - RPC, SOAP over HTTP -->
<binding name="WSReceiverSoapBinding" type="impl:WSReceiver">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="receiveApproval">
<soap:operation soapAction=""/>
<input name="receiveApprovalRequest">
<soap:body use="literal"/>
</input>
</operation>
</binding>
<!-- Endpoint for ISIS.Xpress -->
<service name="isisService">
<port name="WSReceiver"
binding="typens:WSReceiverSoapBinding">
<soap:address
location="http://brxn1snjr:9080/WebServiceReceiver/services/WSReceiver"/>
</port>
</service>
<plnk:partnerLinkType name="budgetPartnerLinkType">
<plnk:role name="budgetService">
<plnk:portType name="lns:budgetServicePT"/>
</plnk:role>
</plnk:partnerLinkType>
<plnk:partnerLinkType name="budgetApprovalLinkType">
<plnk:role name="approver">
<plnk:portType name="lns:budgetApprovalPT"/>
</plnk:role>
</plnk:partnerLinkType>
<plnk:partnerLinkType name="isisPartnerLinkType">
<plnk:role name="isisService">
<plnk:portType name="typens:WSReceiver"/>
</plnk:role>
</plnk:partnerLinkType>
</definitions>
***@ibsbe.be
25/11/2005 13:49
Please respond to
agila-***@incubator.apache.org
To
agila-***@incubator.apache.org
cc
Subject
Re: workitem is referenced but not defined.
Hello,
My test BPEL process gets in 2 parameters : the projectid and the budget
of a project.
If the budget is less then 10.000, the project is automatically approved,
else will it be send to the worklist of a person who can approve it (or
decline it).
The result of this approval (automatically approved, ot approved by a
person with a worklist) has to be send to a webservice.
And when i try to invoke the external webservice, i get this error message
in the log (but when i click on the Instance button of the twister-web,
and i open the corresponing workitem, i see that the message's are well
formed).
I send the process file and the wsdl file in attachment :
Niko
Matthieu Riou <***@gmail.com>
25/11/2005 11:58
Please respond to
agila-***@incubator.apache.org
To
agila-***@incubator.apache.org
cc
Subject
Re: workitem is referenced but not defined.
Hi,
What do you mean by "invoke the result of that workitem"? Are you
trying to get the workitem to check its state of information or
seomething else? Could you also attach your WSLD document?
Thanks,
Matthieu Riou.
Post by N***@ibsbe.beHello,
I have a strange problem, i found some other mails on this mailinglist
according to this problem, but i can't find a solution.
In my BPEL process, i use a workitem. This works great. But when i try to
invoke the result of that workitem to another webservice, i get the
errormessage
java.io.IOException: Type
{http://www.smartcomps.org/twister/types/workitem/}workitem is
referenced
Post by N***@ibsbe.bebut not defined.
at org.apache.axis.client.Service.initService(Service.java:262)
at org.apache.axis.client.Service.<init>(Service.java:217)
at
org.smcp.twister.engine.priv.messaging.impl.WSMessageBroker.sendMessage(WSMessageBroker.java:299)
org.smcp.twister.engine.priv.messaging.impl.WSMessageBroker.syncSend(WSMessageBroker.java:115)
org.smcp.twister.engine.priv.messaging.impl.WSMessageBroker$1.run(WSMessageBroker.java:79)
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:727)
Post by N***@ibsbe.beat java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-26"
java.io.IOException: Type
{http://www.smartcomps.org/twister/types/workitem/}workitem is
referenced
org.smcp.twister.engine.priv.messaging.impl.WSMessageBroker.syncSend(WSMessageBroker.java:124)
org.smcp.twister.engine.priv.messaging.impl.WSMessageBroker$1.run(WSMessageBroker.java:79)
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:727)
Post by N***@ibsbe.beat java.lang.Thread.run(Unknown Source)
java.io.IOException: Type
{http://www.smartcomps.org/twister/types/workitem/}workitem is
referenced
Post by N***@ibsbe.bebut not defined.
at org.apache.axis.client.Service.initService(Service.java:262)
at org.apache.axis.client.Service.<init>(Service.java:217)
at
org.smcp.twister.engine.priv.messaging.impl.WSMessageBroker.sendMessage(WSMessageBroker.java:299)
org.smcp.twister.engine.priv.messaging.impl.WSMessageBroker.syncSend(WSMessageBroker.java:115)
Post by N***@ibsbe.be... 3 more
Does somebody have an idea what causes this problem? because this occurs
only when i add an invoke at the end of the process.
Thanks,
Niko