Hi,
I'm new to BT, I'm using BT Standard Ed (not R2) and SQL Server 2005. I
have an xml file with multiple records that I've successfully orchestrated
through to a stored procedure that performs an insert into my db. It
seemed
easy enough, no looping required, just sent the message to my stored proc
(using Receive, Config/Transform, Send shapes only). At the end of my
SPROC
I have a select that returns the latest ident value (Scope_Identity). I
send
this back to the orch and output it into a file just for debugging. What
I
get when I run my orch is all my records (10) get inserted just fine, but
the
Id that is returned in the Response is only 1 single Id - the first Id
created. It looks to me that the SPROC runs multiple times since all 10
records go in, but I'm only getting 1 Id returned back. I'm actually
looking
for a way to return a status from the SPROC that will indicate a
successful
completion, I hit upon this naive way to do that and count the number of
Ids
returned, but I'm only getting one back, not 10.
I guess my question is two-fold: what is the 'best practice' you all have
found to return something from your SPROC back to BT to be able to make a
decision on wheter to continue or send an error email; and, why am I
getting
only 1 Id returned back to me instead of 10. I'm really more interested
in
the best approach but thought it might help my understanding if I knew why
I'm getting a single Id.
Thanks for any help,
Kevin


|