|
Home > Archive > BizTalk Server Orchestration > March 2005 > Process Receive Files In Order
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Process Receive Files In Order
|
|
| Ben Jiang 2005-03-16, 5:56 pm |
| Hi,
I need help for the following:
My mainframe application will create three flat files "Account.csv",
"Balance.csv" and "Transaction.csv" and drop into my File Receive Location
where my Orchestration picks them up and uses SQL Adapter to insert into my
relational SQL database with three tables: "Account", "Balance" and
"Transaction". Since there are referential restriction, it must insert these
three tables in order: "Account" -> "Balance" -> "Transaction".
Now the problem is that my mainframe program my drop these three flat files
in any order - eg. it may drop "Transaction.csv" file first and then
"Account.csv" or "Balance.csv". How do I design/setup the Orchestration so
that it always processes(insert into SQL) in the right order, eg. Account ->
Balance -> Transaction?
Please help me.
Cheers
Ben Jiang
| |
| Matt Milner 2005-03-16, 5:56 pm |
| you should try using a parallel convoy (see the docs) which will allow you
to receive all three files before moving on. Then you can do your inserts in
the order you need to.
Matt
"Ben Jiang" <BenJiang@discussions.microsoft.com> wrote in message
news:BBDDF5D5-96A9-423C-844E-88991951C089@microsoft.com...
> Hi,
> I need help for the following:
>
> My mainframe application will create three flat files "Account.csv",
> "Balance.csv" and "Transaction.csv" and drop into my File Receive Location
> where my Orchestration picks them up and uses SQL Adapter to insert into
> my
> relational SQL database with three tables: "Account", "Balance" and
> "Transaction". Since there are referential restriction, it must insert
> these
> three tables in order: "Account" -> "Balance" -> "Transaction".
>
> Now the problem is that my mainframe program my drop these three flat
> files
> in any order - eg. it may drop "Transaction.csv" file first and then
> "Account.csv" or "Balance.csv". How do I design/setup the Orchestration so
> that it always processes(insert into SQL) in the right order, eg.
> Account ->
> Balance -> Transaction?
>
> Please help me.
>
> Cheers
> Ben Jiang
>
| |
| Ben Jiang 2005-03-17, 3:04 am |
| Hi,
I tried this with each branch having a receive shape (Set activate to True
for all three receive shapes) but it seems it never proceeds into the next
shape (the shape right after the parallel shape). I guess whenever one of the
document comes in my receive ports and the orchestration is triggered and
holds on one branch of parallel forever and other two receives shapes has
never starts...
Any idea? Matt, can you please give me a detail description how to
construct the orchestration? I may be in worng using the parallel shapes...
Cheers
Ben Jiang
"Matt Milner" wrote:
> you should try using a parallel convoy (see the docs) which will allow you
> to receive all three files before moving on. Then you can do your inserts in
> the order you need to.
>
> Matt
>
>
> "Ben Jiang" <BenJiang@discussions.microsoft.com> wrote in message
> news:BBDDF5D5-96A9-423C-844E-88991951C089@microsoft.com...
>
>
>
| |
| Matt Milner 2005-03-18, 2:46 am |
| you are on the right track, but each receive shape must also be set to
initialize the same correlation set. This is known as a convoy. You'll
need some property that matches in the all the files which you can correlate
on. In your case, you might be able to use the Receive Port name to do this
since you will be getting these three files, presumably, dumped in and then
wait until the next time you get these three files. Other wise, you'll end
up with three different instances of the orchestration, each one executing a
different receive and all of them waiting for the other parallel receives to
start up.
Matt
"Ben Jiang" <BenJiang@discussions.microsoft.com> wrote in message
news:641EA8C8-2361-4AB0-8019-00709909E055@microsoft.com...[vbcol=seagreen]
> Hi,
> I tried this with each branch having a receive shape (Set activate to True
> for all three receive shapes) but it seems it never proceeds into the next
> shape (the shape right after the parallel shape). I guess whenever one of
> the
> document comes in my receive ports and the orchestration is triggered and
> holds on one branch of parallel forever and other two receives shapes has
> never starts...
>
> Any idea? Matt, can you please give me a detail description how to
> construct the orchestration? I may be in worng using the parallel
> shapes...
>
> Cheers
> Ben Jiang
>
> "Matt Milner" wrote:
>
| |
| Ben Jiang 2005-03-18, 2:46 am |
| Matt,
I got "unknown system exception" error when I compile the project. Can you
please correct what I have done it wrong on my Orchestration:
1. I drag Parallel shape at the begining of my Orchestration and drag one
receive shape under each branch and set them "Activate" to true for all of
three receive shapes;
2. On the Orchestrion View pane, I create a Correlation Type
"CorrTypeReceivePortName" using system provided Correlation Properties of
"BTS.ReceivePortName"; Based on this type, I created Correlation Sets
"CorrRecPortName";
3. I assigned this Correlation Set to the property "Initializing Correlation
Sets" of all three receive shapes created in step 1;
4. I drag a Port to the Port Surface called "PrtReceive"; I created three
operations within this Port and made Request Message Type to my three
pre-defined schemas within my project called "RfsAccount.xsd",
"RfsBalance.xsd" and "RfsTransaction.xsd" respectively. (I have created a
physical receive port with three physical locations to receive three message
type in my BT explorer, and I will bind the port "PrtReceive" to this
physical receive port.);
5. I link the lines to my three receive shapes created in step 1 (of course
I have set them to messages based on my schemas respectively);
6. Just right under my "Parallel" shape, I drag three send Shapes and drag a
send Port on my Port Surface. And I created three operations within this Send
port and make three Request message type of "RfsAccount.xsd",
"RfsBalance.xsd" and "RfsTransaction.xsd" . And I link three send shapes to
them respectively. I will create a physical send port to bind this send port
in my BT explorer. (To prove if I have received three messages in my
Orchestration.)
Sound a simple Orchestration? But I got the error message when I compiled it?
Matt, please help me.
Cheers
Ben Jiang
"Matt Milner" wrote:
> you are on the right track, but each receive shape must also be set to
> initialize the same correlation set. This is known as a convoy. You'll
> need some property that matches in the all the files which you can correlate
> on. In your case, you might be able to use the Receive Port name to do this
> since you will be getting these three files, presumably, dumped in and then
> wait until the next time you get these three files. Other wise, you'll end
> up with three different instances of the orchestration, each one executing a
> different receive and all of them waiting for the other parallel receives to
> start up.
>
> Matt
>
>
> "Ben Jiang" <BenJiang@discussions.microsoft.com> wrote in message
> news:641EA8C8-2361-4AB0-8019-00709909E055@microsoft.com...
>
>
>
| |
| Ben Jiang 2005-03-21, 2:51 am |
| I found the following show to solve my problem.
All I need to have my Main Frame program to produce an unique ProcessID for
all my incoming documents and set this value to my Correlation Set and assign
to my activatable receive shapes in my parallel shape. Thank you Matt for
your help.
http://msdn.microsoft.com/msdntv/ep...EL/manifest.xml
Ben Jiang
"Ben Jiang" wrote:
[vbcol=seagreen]
> Matt,
>
> I got "unknown system exception" error when I compile the project. Can you
> please correct what I have done it wrong on my Orchestration:
>
> 1. I drag Parallel shape at the begining of my Orchestration and drag one
> receive shape under each branch and set them "Activate" to true for all of
> three receive shapes;
>
> 2. On the Orchestrion View pane, I create a Correlation Type
> "CorrTypeReceivePortName" using system provided Correlation Properties of
> "BTS.ReceivePortName"; Based on this type, I created Correlation Sets
> "CorrRecPortName";
>
> 3. I assigned this Correlation Set to the property "Initializing Correlation
> Sets" of all three receive shapes created in step 1;
>
> 4. I drag a Port to the Port Surface called "PrtReceive"; I created three
> operations within this Port and made Request Message Type to my three
> pre-defined schemas within my project called "RfsAccount.xsd",
> "RfsBalance.xsd" and "RfsTransaction.xsd" respectively. (I have created a
> physical receive port with three physical locations to receive three message
> type in my BT explorer, and I will bind the port "PrtReceive" to this
> physical receive port.);
>
> 5. I link the lines to my three receive shapes created in step 1 (of course
> I have set them to messages based on my schemas respectively);
>
> 6. Just right under my "Parallel" shape, I drag three send Shapes and drag a
> send Port on my Port Surface. And I created three operations within this Send
> port and make three Request message type of "RfsAccount.xsd",
> "RfsBalance.xsd" and "RfsTransaction.xsd" . And I link three send shapes to
> them respectively. I will create a physical send port to bind this send port
> in my BT explorer. (To prove if I have received three messages in my
> Orchestration.)
>
> Sound a simple Orchestration? But I got the error message when I compiled it?
>
> Matt, please help me.
>
> Cheers
> Ben Jiang
>
> "Matt Milner" wrote:
>
|
|
|
|
|