- This topic has 11 replies, 1 voice, and was last updated 3 years ago by biztalkgurus.
October 19, 2005 at 11:55 AM #12070
I’m trying to make a simple orchestration and deploying it as a webservice. The orchestration is actually now just relaying webservice calls, but I’m planning to incorporate other stuff later.
1a. A user of a client application hits the Add button and sends data to the BizTalk webservice.
1b. The orchestration calls the database’ webservice method to store the information.
1c. The response is relayed back to the client application.
2a. Another application will later call another biztalk webservice method to fill in some additional information and update the record.
2b. The orchestration calls database’ webservice method to update the information.
2c. The response is relayed back to the calling appliaction.
The data sent from the two client applications both have the same two fields uniqely identifying the record being added or updated. They are \”OrganizationNumber\” and \”Name\” both of type String.
So I want to add correlation between the messages from the two client application. I added correlation between 1b (initiating) and 2a (following)
As message types in all receive and send messages, I used the ones from the DatabaseWS like [databaseWS].Add_request, [databaseWS].Add_response, databaseWS.Update_response and databaseWS.Update_response. Maybe I should make local schemas and map between the two ?
Anyways. Is this kind of orchestration even possible ? Any ideas on how to make it work ? I’ve been struggling for some time. Facing problems with correlation.
Event Type: Error
Event Source: XLANG/s
Event Category: None
Event ID: 10034
Uncaught exception terminated service com.domainname.project.portal.biztalk.RegisterOrchestration(2d35c649-1b3d-a4bf-2b6a-93867077b424), instance c24b00df-93b1-4855-a2f4-18f85acfb303
Failed to initialize the correlation property name: OrganizationNumber namespace: http://project.domainname.com/portal/biztalk/ from message: AddReq.
Exception type: CorrelationViolationException
Target Site: Void InitializeFromMsg(Microsoft.XLANGs.BaseTypes.XLANGMessage, Microsoft.XLANGs.Core.XlangStore)
Additional error information:
A property cannot be associated with the type ‘com.domainname.project.portal.schemas.OrganizationNumber’.
Exception type: InvalidPropertyTypeException
Target Site: Microsoft.XLANGs.RuntimeTypes.MessagePropertyDefinition _getMessagePropertyDefinition(System.Type)
Additional error information:
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
I was thinking of expanding the orchestration if I get i to work. The idea was that if process 2 isn’t started before say 5 days after process 1 is finnished, a mail should be sent to the administrator, then looping back to waiting for the updatemessage.
October 21, 2005 at 9:12 PM #12071
1) Thanks for your reply. Process 2 updates the record with some info that is not provided during process 1, hence giving two states. State1 record created but infoA is not yet provided. State2: record is created and infoA is provided. To have the 2 processes being handled by the same orchestration process (I think it’s called a sequencial process or something simular) the second receive message needs to be correlated to the a send message of process 1.
2) I’ll try creating the correlation again posting back the results. FYI: The correlation property is associated to the OrganizationNumber AND Name from the referenced webservice-schema.
October 22, 2005 at 2:54 PM #12072
I’ve gone throug the creation of correaltion again. No error messages or compilation failures. OrganizationNumber is of type xs:string and should not be problem.
I’m starting to think it’s the format of the schema that is autogenerated from the webservice that is the problem. You said something about the OrganizationNumber had to be unique in the schema. Well, the schema shows all the classes that are used throughout all the webservice-methods. I’m using only two of those web-methods. The class I’m using to correlate on, lets call it ClassA has an inherited ClassAExtended that of course also holds the OrganizationNumber. Could that be the problem ? In the Schema, it’s looks like this.
_______<Sequence> (This one is grey and contains all the info of ClassA)
The XML look like this
<xs:element minOccurs=\”0\” maxOccurs=\”1\” name=\”Name\” type=\”xs:string\” />
<xs:element minOccurs=\”0\” maxOccurs=\”1\” name=\”OrganizationNumber\” type=\”xs:string\” />
– <xs:complexType name=\”ClassAExtended\”>
– <xs:complexContent mixed=\”false\”>
– <xs:extension base=\”tns:ClassA\”>
<xs:element minOccurs=\”0\” maxOccurs=\”1\” name=\”ExtraAttribute\” type=\”tns:ExtraType\” />
<xs:element minOccurs=\”0\” maxOccurs=\”1\” name=\”ExtraAttribute1\” type=\”xs:string\” />
<xs:element minOccurs=\”0\” maxOccurs=\”1\” name=\”ExtraAttribute2\” type=\”xs:string\” />
There is automatically generated Request and Response Message Types for all the webmethods. I have used these Message Types to define all my messages.
The messages I defined are
AddReq is used in 1a) and 1b)
AddRes is used in 1c)
UpdateReq is used in 2a) and 2b)
UpdateRes is used in 2c)
Another thought. Could there be a namespace problem ? The DatabaseWS has the namespace \”http://project.domain.com/portal/ws/\”. The BizTalkWS is deployed with the namespace \”http://project.domain.com/portal/biztalk/\”
I’m really lost here, can anyone verify if this orchestration should even work, or maybe how You would constructed an orchestration based on the same functionality.
October 26, 2005 at 5:05 PM #12073
Do I need correlation ?
Yes, I beleive so. Process2 should not be allowed unless process1 has been run.
To the good news!
I finally got the first part of the orch to run. I’m running BTS 2004 SP1. I had not installed a M$ patch
BizTalk Server 2004 SP1 Update for .NET Framework 1.1 on Windows Server 2003, (KB890673).
This patch deals with a problem that occurs if you import schemas from assemblies that contain redundant imports. I beleive this is the reason it now started to work, though I’m not sure.
Now I have a new problem. When initiating process2 I seem to get a routing problem…
The Messaging Engine encountered an error committing a transport adapters batch containing the following work items: SOAP messages to be published, 0 request-response messages to be published, 1 messages to be suspended, 0 messages to be deleted from a host queue, 0 messages to be resubmitted for later transmission, 0 messages to be moved to their backup transport. Please refer to Health and Activity Tracking tool for more detailed information on this failure.
Second error message:
The \”SOAP\” adapter is suspending a message coming from Source URL:\”/project/com_domain_project_biztalk_RegisterOrchestration__ReceivePort.asmx\”. Details:\”The message found multiple request response subscriptions. A message can only be routed to a single request response subscription. \”.
Any clue ? The argument for both webservice methods are of same type, but that should not be a problem, should it ?
October 26, 2005 at 6:26 PM #12074
Working on solution. I don’t fully understand how to read the output from the subscription-viewer, but after posting a message in process1 I found this new row in the subscription-viewer. It seems correct. It show the two properties I have promoted, Name and OrganizationNumber. It also shows the next expected method to be run, namely Update.
I read in this blog (Debugging Routing Failures)
I figure after reading this, that there might be a problem that I actually put the correlation between 1b) and 2a), since 1b) send to a request/response service. What I’m testing now, is to make sure the correlation properties are returned in 1c, thereby changing the correlation to be between 1c) and 2a) instead. I’ll post my results…
Any other Ideas on how to debug this problem ?
October 27, 2005 at 6:28 AM #12075
Sorry, I have not been following the full thread
You might have already said this, but how are you initializing the Correlation? On the Send or the Receive? Make sure you are doing so on the Send Shape prior to the Receive.
Also, in the Subscription Viewer was the record you get this data from something link “XLANG\\” or like “Activate”?
October 20, 2005 at 2:33 PM #12076
A couple of thoughts –
1) Is correlation really necessary in this case? Is there state that needs to be preserved across the calls?
2) When you associated the correlation property with ‘com.domainname.project.portal.schemas.OrganizationNumber’ did everything seem to work? (Does this property occur just once in the schema? Is it of a datatype that biztalk is happy with? etc.)
October 26, 2005 at 3:20 PM #12077
I haven’t had a chance to digest your last post – but…once more on the issue of correlation. Do you really need to have the same instance of the orchestration handle the second request — or does the information that comes with the second request give you all you need to update the database? (i.e. do you have the key you need, etc.?)
Just because the operations are logically grouped doesn’t meet you actually need to use the same orchestration instance. Just checking, since complexity would be reduced for you.
October 26, 2005 at 5:28 PM #12078
Hmm, I’d start by using the subscription viewer (prior to submitting your second request) to see what the state of your subscriptions are.
November 11, 2020 at 9:58 PM #49780biztalkgurus
The Prettiest by Brigit Young — 9781626729230
November 11, 2020 at 10:29 PM #49782biztalkgurus
Pumpkinheads by Rainbow Rowell : 9781250312853
November 12, 2020 at 3:06 AM #49797biztalkgurus
The Dirty Girls Social Club – Alisa Valdés-Rodríguez – 9781250765864
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.