Need A Single Unique ID For a Batch

Home Page Forums BizTalk 2004 – BizTalk 2010 Need A Single Unique ID For a Batch

Viewing 1 reply thread
  • Author
    Posts
    • #18015

      Hello all,

      Folks on this group have always been very helpful. Here's hoping you can do it again!

      I'm processing a flat file which is disassembled into mutiple records of the same type. Each one is inserted into a database from the orchestration. What I need to do is assign a unique idetifier to the batch, so I know which records came from which submission. Preferably, I'd like to do this is a timestamp, but something like a GUID would be OK too. That is, the identifier needs to be the same for all 100 records in the file. If I submit another file with 100 records in it, I need a different ID for that bunch.

      Obviously I could create some kind of function or service in my orchestration and call that, but it would get called once for each record (this creating a different ID for each row in the file). It need it once for the whole input file. Using a file name convention, or placing the value in the file is not an option. Can this be done simply?

       Any help (and details) would be greatly appreciated,

       

      Chris

    • #18016

      Additionally, I need to get to this value from inside a map. In my orchestration, I'm using a construct message shape with a transform object to create a message of the type that will be accepted by my stored procedure (using Oracle Adapter).

       

      Thanks again,

       

      Chris

       

      • #18017

        I have an idea off the top of my head think it should work. Here it is..before u start processing the batch create a new message, that contains this unique id by calling a sequence in the oracle database, this should be just like executing any other statement on the db.

        Now put this sequence output message field in one of the fields in each message of the child records, in a construct message. Since the orchesration is executed newly for each file this should work..what say? Let me know

        What you could optionally do is call a stored procedure and pass the entire xml,. although this would not be the "biztalk" way of doing things. 

        -Mahesh 

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.