Forum Replies Created
-
AuthorPosts
-
When an FTP send fails, BizTalk may be entering a retry process (the default number of retries is 3, 1 every 5 minutes). During this time, your messages will probably show up as dehydrated in the group hub page. Try setting the retry count on the FTP send ports to 0. This may make them throw an exception into the orchestration.
Hi Russell,
Thanks for your kind support. I move receive share out of scope and its working fine.
But Orchestration is not working as per my expectation. If my FTP server is down or if i mention wrong username password then orchestration fire warning in event viewer but dint generate exception.
My message flow is as per following:
1. message receive from LOCAL folder (ex d:\GetXML)
2. Transfer to 3 differet FTP. I put all 3 FTP SEND shape in one scope if any send operation would be fail then i wish control goes to CATCH EXCEPTION shape and send that receive message back to local folder.
But Right now if any Send operation fail then flow does not go to CATCH EXCEPTION shape its just a filed warning message in event viewer and complete orchestration flow.
Please help me to figure out my problem.
Regards,
Dhaval M.
July 9, 2008 at 7:04 AM in reply to: Async messaging with WS-Addressing and the WCF-WSHttp adapter #20097I tried one more thing: creating a custom property schema for the MessageID and promoting it before sending it. Here’s what I did:
-
Created a new property schema with namespace: http://www.w3.org/2005/08/addressing (WS-Addressing namespace)
-
Added a property: MessageID
-
Created a new correlation type and set for the MessageID property.
-
Set the MessageID on my outbound message before sending it.
-
Had the send shape initialize the correlation set.
-
Confirmed that the MessageID property was in fact set and promoted before hitting the send port.
-
The WCF adapter ignored my property and generated it’s own MessageID on the outbound SOAP envelope.
Any more ideas?
This shouldn’t be this hard! WS-Addressing is one of the core standards that the WCF-WSHttp adapter is supposed to address!
July 9, 2008 at 7:02 AM in reply to: could not be routed because no subscribers on direct bound orchestration port #20096I would second Ruselw’s comments; one thing I do to ease my development pain when working with de-batched messages is to hook a Send Port upto the Receive Location doing the de-batching to capture some of the debatched messages. Then hook a temp Receive Port/Location upto the orchestration and push the individual de-batched messages into it – you can then tell whether the orchestration accepts these messages, rather than having to figure out whether its a problem with de-batching.
Hope this helps, Nick.
July 9, 2008 at 6:28 AM in reply to: could not be routed because no subscribers on direct bound orchestration port #20095In your orchestration, is the receive port tied to a particular type of message? If so, then it adds an additional filter of message type. You need to have an XML disassembler component in your pipeline for BizTalk to apply a message type. One way to tell for sure is to open a new query in the group hub, and then select to query for subscriptions. You should be able to find the subscriptions for your orchestration and send port based on the service name. You will be able to see the actual filter expressions BizTalk is using. Hope this helps!
Mukesh,
Calling SQL Server from a .Net Helper class in an orchestration is (IMHO) a bad idea because BizTalk cannot manage the database connection (without a lot of work on your behalf); it is much easier to use the SQL Adapter which can be invoked through Send & Receive Ports to perform any CRUD work that is required – you also get all of the BizTalk Enterprisey features if you take this route as the request and response messages traverse the Message Box.
Rgds, Nick.
Thanks a lot Nick for your response. I really appreciate it.
Just to answer your question, Host system is sending order messages(in XML format) to BizTalk message box and i would have an orchestration which will pick these messages and post to Desitnation system.
And again thanks for confirming my choice of SQL server database, this gives me more confidence about the approach being followed.
Someone said that using SQL Server from Orchestration is a Red flag! I don’t understand why it’s red flag and just wanted to understand what are the other options available.
Could you thinnk of any cons of sql server approach, if any.
Regards,
Mukesh.
So you are getting a “use of unconstructed message” error? That’s a compile time error, right? That usually means that you have a send shape that is sending a message that might not have been construted. To send a message from an exception handling block, you either need to construct (or receive) the message before the scope begins, or you need to construct the message within the exception handling block. The idea is that the exception could occur anywhere within the scope, so the exception might occur before you receive the message, and a null reference error would occur when you send the message.
Also, you might want to look at the ESB Guidance for a good exception handling model: http://www.codeplex.com/esb
Mukesh,
You haven’t mentioned how the messages are being received from your
Host system, so I’ll assume you’re receiving an Xml file that you are
picking up over a FILE adapter for simplicity’s sake.With regards to your system, I would suggest that the file received
from your Host system is used to invoke an orchestration. This orch
would send the message to the Destination system using a SOAP adapter
and save the details of the message to the SQL Server as you mentioned;
this provides you with a simple database check to determine whether the
message was successfully sent.Now, for polling the Destination system for the status of the order, you can either:
- Use the same orch created above and use a loop to repeatedly check
the status of the order in the Destination system using the SOAP
adapter and the WS’s exposed by that system. If the status returned as
‘not actioned’ for example, the orchestration would enter a delay shape
and dehydrate to the Message Box (the timing of the delay is up to you
depending on the turn-around time you want, i.e. you could wait for 1
minute before checking again, or possibly 24 hours) and then pass back
through the loop to check the Destination system a second time. Using a
loop, you would need to have a strategy to stop the loop after X
iterations. Once you have received a successful response from the
Destination system, exit the loop and send a response message back to
the Host system. - Use a second orch which is invoked by a polling SQL Adapter. The
polling SQL Adapter would poll every X minutes for orders that have not
been completed by the Destination system, invoking an orchestration for
each un-completed instance. The orchestration itself would call the WS
on the Destination system to determine the status of the order. If the
order is not yet completed, the orchestration would stop gracefully. If
the order is completed, the order record in the table could either be
updated to indicate a date/time that the order was completed, or simply
deleted. The response to the Host system would then be generated and
sent.
I would personally suggest that you go for the second approach as it
implements a Spearation of Concerns pattern – i.e. the first
orchestration is simply responsible for sending the data to the
Destination system and the second for polling. Furthermore, using the
second approach, you will not have a large number of dehydrated
orchestrations sat around waiting to finish and is therefore (in my
opinion), much cleaner. Also, the polling mechanism is pushed to the
SQL Adapter; other polling mechanisms are available (such as using the
BizTalk Scheduling Adapter (see Codeplex) or the Windows Task
Scheduler, but both of these approaches introduce undue complications.Hope this helps, if you have any further questions, please drop me a line.
Cheers, Nick.
Mukesh,
You haven’t mentioned how the messages are being received from your Host system, so I’ll assume you’re receiving an Xml file that you are picking up over a FILE adapter for simplicity’s sake.
With regards to your system, I would suggest that the file received from your Host system is used to invoke an orchestration. This orch would send the message to the Destination system using a SOAP adapter and save the details of the message to the SQL Server as you mentioned; this provides you with a simple database check to determine whether the message was successfully sent.
Now, for polling the Destination system for the status of the order, you can either:
- Use the same orch created above and use a loop to repeatedly check the status of the order in the Destination system using the SOAP adapter and the WS’s exposed by that system. If the status returned as ‘not actioned’ for example, the orchestration would enter a delay shape and dehydrate to the Message Box (the timing of the delay is up to you depending on the turn-around time you want, i.e. you could wait for 1 minute before checking again, or possibly 24 hours) and then pass back through the loop to check the Destination system a second time. Using a loop, you would need to have a strategy to stop the loop after X iterations. Once you have received a successful response from the Destination system, exit the loop and send a response message back to the Host system.
- Use a second orch which is invoked by a polling SQL Adapter. The polling SQL Adapter would poll every X minutes for orders that have not been completed by the Destination system, invoking an orchestration for each un-completed instance. The orchestration itself would call the WS on the Destination system to determine the status of the order. If the order is not yet completed, the orchestration would stop gracefully. If the order is completed, the order record in the table could either be updated to indicate a date/time that the order was completed, or simply deleted. The response to the Host system would then be generated and sent.
I would personally suggest that you go for the second approach as it implements a Spearation of Concerns pattern – i.e. the first orchestration is simply responsible for sending the data to the Destination system and the second for polling. Furthermore, using the second approach, you will not have a large number of dehydrated orchestrations sat around waiting to finish and is therefore (in my opinion), much cleaner. Also, the polling mechanism is pushed to the SQL Adapter; other polling mechanisms are available (such as using the BizTalk Scheduling Adapter (see Codeplex) or the Windows Task Scheduler, but both of these approaches introduce undue complications.
Hope this helps, if you have any further questions, please drop me a line.
Cheers, Nick.
Anon,
The solution depends on your idea of online and offline – I can see two possible offline scenarios:
- Messages are still subscribed to by Send Ports, but the Service Window is enabled so these messages are not actually sent until the ‘online’ window; in this scenario, messages are still routed to the various Send Ports but not sent until a designated time; this will ensure that messages are preserved until the Send Port comes back ‘online’. Also, I believe that Service Windows can be manipulated through either the ExplorerOM or WMI.
- The Send Ports are physically unenlisted so no messages are routed.
Be careful with scenario two however in that if you have no subscribers (i.e. Orchestrations or Send Ports), BizTalk will throw an error when publishing the incoming message because it cannot find any subscribers. If you really need the latter option, you could consider having a catch-all Send Port that ensures you never get into the error condition described above and use the NULL Send Adapter to throw away the message.
Hope this helps, Nick.
July 8, 2008 at 3:32 AM in reply to: Save received file into local hard drive with receiving location BTSHTTPReceive.dll #20084Hi Andre,
You could try using my Message Archiving pipeline component which is available over on Codeplex (http://www.codeplex.com/btsmsgarchcomp), which is used in the decode (and encode) stage of the pipeline to write the contents of the message (flat-file, xml or binary) to either the local hard disk or a UNC share (given sufficient permissions); the component is written using a forward only event stream which is about as efficient as you can get.
However, you will need to create a custom pipeline to use this component, the custom pipeline will also need the AS2/EDI disassembler component to disassemble the EDI document.
Alternatively, you could create a Send Port that subscribes to the disassembled Xml representation of the message (e.g. on the Receive Port Name) and using the FILE adapter send the message to a file or UNC location, however you will only get the Xml representation, not the original message and you will incur the IO of passing through the Message Box.
Hope this helps, Nick.
Usually I will use direct bound orchestrations for such a scenario. For example, I will set up a receive port that publishes directly to the message box (not bound to any orchestration). Then, I will create orchestrations that begin with a direct bound receive shape with a filter to specify which messages to receive. Now the orchestration will process any messages that arrive in the message box that match the filter. You can have multiple direct bound orchestrations that subscribe to the same message. For routing only scenarios, you can use filtered send ports to acheive the same results.
As for preserving messages when the subscribers are off, this begs a bigger question: How long should the message be preserved? Until 1 subscriber receives it, untiill all subscribers receive it? By default, it is an exception if all subscribers are off.
July 7, 2008 at 1:52 AM in reply to: Publish/subscribe response from solicit-response send port #20078Nick,
You could have also have subscribed to any of the promoted properties on the response message – BTS.MessageType (Namespace # Root Node Name) springs to mind in the first instance.
Rgds, Nick.
July 6, 2008 at 6:13 PM in reply to: Publish/subscribe response from solicit-response send port #20077I found it out.
It was so simple and I spent too much time to figure it out. So, for anyone else looking for the same solution, here is a trick:
Use BTS.SPName property instead of BTS.ReceivePortName.
Thanks to Saravana Kumar and his article http://www.digitaldeposit.net/blog/2006/12/biztalk-2006-soap-adapter-web-service.html
Nick.
-
-
AuthorPosts