Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Need to process messages of type B only after all of Type A processed
- This topic has 5 replies, 1 voice, and was last updated 8 years, 3 months ago by
community-content.
-
AuthorPosts
-
-
October 2, 2006 at 9:30 PM #15922
Hi,
I need to design an orchestration with which I would process messages in a folder. The messages would be of two types A and B. However, the requirement states that Massage B have to be processed only after all messages of Type A have been processed.
Please guide me with a probable solution to it.
Thanks
-
October 2, 2006 at 10:20 PM #15923
Hi,
The answer to your question depends on what you mean by "only after all messages of Type A have been processed".
If by this you mean that anytime after all B are processed you can process A then you might look at scheduling your receive ports. Have two receive ports (one for A, one for B) which are set to process B then at some sufficiently long period later, the A port is allowed to be active. Simple but effective.
If on the other hand you mean to say that once all B are processed your A must begin processing immediately, that is somewhat more tricky but still possible. In this case I'd be inclined to do something more radical. If you can detect through outside means that all B have been processed, you could create a pipeline component that could Start/Stop a Receive Location. Then whenver a B message is processed, if the criteria are met, automatically turn on the receive location for A. This is something I'd want to test extensively, and is certainly not something which I have personally done but I imagine with the options in Developer Tools you _could_ do this.
Tim Rayburn
Principal Consultant, Sogeti USA, LLC
http://www.TimRayburn.net-
October 3, 2006 at 12:39 AM #15925
Thanks Tim,
I would like to describe the required process in detail:
1) Two types of Messages, namely,Message A and Message B, arrive in Folder X.
2) Both messages A and B that come in x minutes get processed . However, first all the Message A get processed and then Message B.
Could you gude me with this . Also please explain more about scheduling the receive port . Could I achieve this by scheduling the receive ports.
Any guidence in this matter would be of great help
-
October 4, 2006 at 6:42 AM #15942
The easiest solution, by far, would be to scheduled your receive locations. If you examine your receive locations you will see that you can specify a window of time in which it will pick up messages. Let's say for arguments sake that you are receiving the files at 10pm and that running all of the Type A messages is taking about an hour.
ReceiveLocation_TypeA is allowed to run from 10pm to 12pm and is limited to files of the pattern *.TypeA
ReceiveLocation_TypeB is allowed to run from 1am to 3am and is limited to files of the pattern *.TypeB
This will result in sequential execution by ensuring the BTS doesn't even see the messages until the appointed hour. The catch being that is TypeA suddenly starts taking longer to run you'll have to adjust the timings, so put in a good amount of buffer.
-
October 12, 2006 at 12:21 AM #16020
Ya Tim, this sounds to be a good solution, however, with one problem , I would have the reschedule the two prcess again Typa A at 3pm to 4 pm and Type B at 4 to 5 and then again Type A at 5 to 6 and so on. I want that the Type A and Type B process should be scheduled for processing alternatively throughout the day alternatively.
Another solution to it , which I have followed is that for initial 5 mins I would take both Type A and Type B messages and check if :
Type A: then Process
Type B: Aggregate the messages
After 5 mins I would debatch the aggregated Type B messages and send them for processing.when all done then starting taking all the messages of Type A and B again.
Please let me know your opinion about the approach as per its performance criteria.
-
-
-
October 3, 2006 at 4:09 AM #15927
Could I create two orchestration and then run them one by one. I mean:
1) start Orchestration A
2) Stop orchestration A
3) Start Orchestration B
4) stop Orchestration B
5)Start Orchestration A………..step(1) and so on.
Please let me know if this is possible
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.