incubator-agila-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davide Ling <lin...@libero.it>
Subject First time OK, second time fails
Date Wed, 30 Nov 2005 15:58:50 GMT
Hi,
I have a problem.

If I run a test first time all work well, bpel process ends
with no warning.

But when I launch the same test second time, My process
cannot start. Maybe because:

2005-11-30 16:29:50,831 WARN http-8080-Processor23
org.apache.agila.bpel.engine.priv.AgilaEngineImpl - No process instance
(recipient) found, that is waiting for message.

then, If I run
   maven db:create
the process back to work again.

----------- The process ------------------
<?xml version="1.0" encoding="UTF-8"?>
<process name="divisione-privato"
	xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	targetNamespace="http://davideling.altervista.org/bpel/divisione-privato"
	xmlns:tns="http://davideling.altervista.org/bpel/divisione-privato"
	xmlns:ns="http://davideling.altervista.org/divisione-wsdl/">

	<correlationSets>
		<correlationSet name="orderTaxNumberCorrelationSet"
			properties="ns:orderCorrelationTaxNumber" />
	</correlationSets>

	<partnerLinks>
		<partnerLink name="orderingPL" partnerLinkType="ns:orderLT"
			myRole="orderReceiver" />
		<partnerLink name="assessorPL" partnerLinkType="ns:assessmentLT"
			myRole="assessmentRequester" partnerRole="assessmentRequestReceiver" />
	</partnerLinks>

	<variables>
		<variable name="orderVariable" messageType="ns:orderMessage" />
		<variable name="assessmentRequestVariable"
			messageType="ns:assessmentRequestMessage" />
		<variable name="assessmentResponseVariable"
			messageType="ns:assessmentResponseMessage" />
	</variables>

	<!-- Start process -->
	<sequence name="orderProcessing">

		<receive name="waitOrder" partnerLink="orderingPL"
			portType="ns:orderPT" operation="sendOrder" variable="orderVariable"
			createInstance="yes">
			<correlations>
				<correlation set="orderTaxNumberCorrelationSet"
					initiate="true" />
			</correlations>
		</receive>

		<assign>
			<copy>
				<from variable="orderVariable" part="orderMessage"
					query="/taxNumber" />
				<to variable="assessmentRequestVariable"
					part="taxNumber" />
			</copy>
			<copy>
				<from variable="orderVariable" part="orderMessage"
					query="/cardNumber" />
				<to variable="assessmentRequestVariable"
					part="cardNumber" />
			</copy>
			<copy>
				<from variable="orderVariable" part="orderMessage"
					query="/totalPrice" />
				<to variable="assessmentRequestVariable"
					part="totalPrice" />
			</copy>
		</assign>

		<!-- Invoke assessment service -->
		<invoke name="assessmentRequestInvoke" partnerLink="assessorPL"
			portType="ns:assessorServicePT" operation="assessmentRequest"
			inputVariable="assessmentRequestVariable">
			<correlations>
				<correlation set="orderTaxNumberCorrelationSet"
					pattern="out" />
			</correlations>
		</invoke>

		<!-- Wait assessor response -->
		<receive name="waitAssessmentResponse" partnerLink="assessorPL"
			portType="ns:assessmentReceiverPT" operation="sendAssessmentResponse"
			variable="assessmentResponseVariable" >
			<correlations>
                <correlation set="orderTaxNumberCorrelationSet" 
initiate="false"/>
            </correlations>
		</receive>

	</sequence>
</process>

-------------------- WSDEF ---------------------------
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
	targetNamespace="http://davideling.altervista.org/divisione-wsdl/"
	xmlns:tns="http://davideling.altervista.org/divisione-wsdl/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
	xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
	xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">

	<types>
		<xsd:schema
			targetNamespace="http://davideling.altervista.org/divisione-wsdl/">
			<xsd:complexType name="addressType">
				<xsd:sequence>
					<xsd:element name="street" type="xsd:string" />
					<xsd:element name="number" type="xsd:string" />
					<xsd:element name="city" type="xsd:string" />
					<xsd:element name="zip" type="xsd:string" />
					<xsd:element name="country" type="xsd:string" />
				</xsd:sequence>
			</xsd:complexType>

			<xsd:complexType name="itemListType">
				<xsd:sequence>
					<xsd:element name="item" minOccurs="1"
						maxOccurs="unbounded">
						<xsd:complexType>
							<xsd:sequence>
								<xsd:element name="productCode"
									type="xsd:string" />
								<xsd:element default="1" name="quantity"
									type="xsd:integer" />
							</xsd:sequence>
						</xsd:complexType>
					</xsd:element>
				</xsd:sequence>
			</xsd:complexType>

			<xsd:complexType name="orderMessageType">
				<xsd:sequence>
					<xsd:element name="name" type="xsd:string" />
					<xsd:element name="surname" type="xsd:string" />
					<xsd:element name="address" type="tns:addressType" />
					<xsd:element name="taxNumber" type="xsd:string" />
					<xsd:element name="cardNumber" type="xsd:string" />
					<xsd:element name="itemList"
						type="tns:itemListType" />
					<xsd:element name="shipMode">
						<xsd:simpleType>
							<xsd:restriction base="xsd:string">
								<xsd:enumeration value="normal" />
								<xsd:enumeration value="fast" />
								<xsd:enumeration value="fastest" />
							</xsd:restriction>
						</xsd:simpleType>
					</xsd:element>
					<xsd:element name="totalPrice" type="xsd:double" />
					<xsd:element name="emailAddress" type="xsd:string" />
				</xsd:sequence>
			</xsd:complexType>

			<xsd:element name="orderMessage"
				type="tns:orderMessageType" />

		</xsd:schema>
	</types>

	<!-- Ordering -->
	<message name="orderMessage">
		<part element="tns:orderMessage" name="order" />
	</message>

	<portType name="orderPT">
		<operation name="sendOrder">
			<input message="tns:orderMessage" />
		</operation>
	</portType>

	<!-- AssessmentService (for request) -->
	<message name="assessmentRequestMessage">
		<part name="taxNumber" type="xsd:string"></part>
		<part name="cardNumber" type="xsd:string"></part>
		<part name="totalPrice" type="xsd:double"></part>
	</message>

	<portType name="assessorServicePT">
		<operation name="assessmentRequest">
			<input message="tns:assessmentRequestMessage" />
		</operation>
	</portType>

	<binding name="assessorServiceBinding"
		type="tns:assessorServicePT">
		<soap:binding style="rpc"
			transport="http://schemas.xmlsoap.org/soap/http" />
		<operation name="assessmentRequest">
			<soap:operation
				
soapAction="http://davideling.altervista.org/assessorService/NewOperation" />
			<input>
				<soap:body use="literal"
					namespace="http://davideling.altervista.org/assessorService/" />
			</input>
		</operation>
	</binding>

	<service name="assessorService">
		<port binding="tns:assessorServiceBinding"
			name="assessorServicePT">
			<soap:address
				location="http://gig:8080/assessorService/assessorServicePT" />
		</port>
	</service>

	<!-- AssessmentReceiver (for receive) -->
	<message name="assessmentResponseMessage">
		<part name="taxNumber" type="xsd:string" />
		<part name="response" type="xsd:boolean" />
		<part name="description" type="xsd:string" />
	</message>

	<portType name="assessmentReceiverPT">
		<operation name="sendAssessmentResponse">
			<input message="tns:assessmentResponseMessage" />
		</operation>
	</portType>

	<!-- PartnerLinkType definition-->
	<plnk:partnerLinkType name="orderLT">
		<plnk:role name="orderReceiver">
			<plnk:portType name="orderPT" />
		</plnk:role>
	</plnk:partnerLinkType>

	<plnk:partnerLinkType name="assessmentLT">
		<plnk:role name="assessmentRequestReceiver">
			<plnk:portType name="assessorServicePT" />
		</plnk:role>
		<plnk:role name="assessmentRequester">
			<plnk:portType name="assessmentReceiverPT" />
		</plnk:role> 
	</plnk:partnerLinkType>
	
    <bpws:property name="orderCorrelationTaxNumber" type="xsd:string"/>
    <bpws:propertyAlias propertyName="orderCorrelationTaxNumber" 
messageType="tns:orderMessage" part="orderMessage" query="/taxNumber" />
    <bpws:propertyAlias propertyName="orderCorrelationTaxNumber" 
messageType="tns:assessmentRequestMessage" part="taxNumber" />
    <bpws:propertyAlias propertyName="orderCorrelationTaxNumber" 
messageType="tns:assessmentResponseMessage" part="taxNumber" />

</definitions>

----------------------- Logs snippet --------------------------
2005-11-30 16:29:50,723 DEBUG http-8080-Processor23 
org.apache.agila.bpel.wsa.EngineWSA - The following message has been 
received : <?xml version="1.0" encoding="UTF-8"?>
<message>
  <orderMessage>
   <name>Davide</name>
   <surname>Ling</surname>
   <address>
    <street>Piazza Cristoforo Colombo</street>
    <number>156</number>
    <city>Genova</city>
    <zip>20089</zip>
    <country>Italy</country>
   </address>
   <taxNumber>gnvlng32y21mrc33</taxNumber>
   <cardNumber>4452487287237009</cardNumber>
   <itemList>
    <item>
     <productCode>12345</productCode>
     <quantity>4</quantity>
    </item>
    <item>
     <productCode>6789</productCode>
     <quantity>2</quantity>
    </item>
   </itemList>
   <shipMode>normal</shipMode>
   <totalPrice>1000.0</totalPrice>
   <emailAddress>lingda@libero.it</emailAddress>
  </orderMessage>
 </message>
2005-11-30 16:29:50,726 DEBUG http-8080-Processor23 
org.apache.agila.bpel.wsa.EngineWSA - Sending it to (orderingPL, orderPT, 
http://www.apache.org/agila, sendOrder)
2005-11-30 16:29:50,732 INFO http-8080-Processor23 
org.apache.agila.bpel.engine.common.persistence.DBSessionManager - Beginning 
transaction with thread : Thread[http-8080-Processor23,5,main] and session 
net.sf.hibernate.impl.SessionImpl@17e9fe8
2005-11-30 16:29:50,760 DEBUG http-8080-Processor23 
org.apache.agila.bpel.engine.priv.AgilaEngineImpl - Finding up which activity 
instance the message is targeted at.
2005-11-30 16:29:50,783 DEBUG http-8080-Processor23 
org.apache.agila.bpel.engine.priv.messaging.impl.MessageControllerImpl - Step 
5.
2005-11-30 16:29:50,803 DEBUG http-8080-Processor23 
org.apache.agila.bpel.engine.priv.messaging.impl.MessageControllerImpl - Step 
5.2.
2005-11-30 16:29:50,821 DEBUG http-8080-Processor23 
org.apache.agila.bpel.engine.priv.AgilaEngineImpl - An activity instance has 
been found.
2005-11-30 16:29:50,828 INFO http-8080-Processor23 
org.apache.agila.bpel.engine.common.persistence.DBSessionManager - Commiting 
transaction with thread : Thread[http-8080-Processor23,5,main]
2005-11-30 16:29:50,831 WARN http-8080-Processor23 
org.apache.agila.bpel.engine.priv.AgilaEngineImpl - No process instance 
(recipient) found, that is waiting for message.
2005-11-30 16:29:50,834 DEBUG http-8080-Processor23 
org.apache.agila.bpel.wsa.EngineWSA - Producing reply: <?xml version="1.0" 
encoding="UTF-8"?>
<message><return-code>1</return-code></message>

-- 
Davide Ling
Sito Personale - http://davideling.altervista.org

Mime
View raw message