Using static variable in orchestration for each message

Once a file is dropped to our Biztalk server I am capturing data from each message. However, I need to assign a batchID for this file that I will write to the database along with the data. How do I build my orchestration so that the code I'm using to generate
the BatchID doesn't create a new ID for each message? I want each message to use the same ID.
Thanks.
Raymond

Shankycheil,
I think you've pointed out my primary issue. I'm fairly new to Biztalk and I just kind of let it do its thing when it comes to EDI processing. So, I guess my issue is due to the fact that I'm letting the EDI Disassembler debatch the file and pass messages
into the orch one at a time. I have code in an expression shape that generates a BatchID, but of course if I'm debatching it creates a new BatchID for each message. How do I deal with the file as a whole inside the orchestration so that once I generate a BatchID
it uses it for all of the messages in file? I've done what Prabhdeep suggested and promoted a field in the schema so that I can set the BatchID, but it needs to be the same for each message in a file.
Thanks.
Raymond

Similar Messages

  • My inbox used to show the sender for each message and now it does not...how do I get it back to where it was?

    My inbox used to show the sender for each message and now it does not...how do I get it back to where it was?

    Right click the heading at the top of the message list and select From from the list of options.

  • Using Static Variable against Context Attribute for Holding IWDView

    Dear Friends,
    I have a method which is in another DC which has a parameter of the type IWDView. In my view, I will have an action which will call the method in another component by passing the value for the view parameter. Here, I can achieve this in 2 types. One is - I declare a static variable and assign the wdDoModifyView's view as parameter value and I can pass this variable as parameter whenever calling that method or the second way - create an attribute and assign the same wdDoModifyView's view parameter as its value. Whenever I call this method, I can pass this attribute as parameter. What is the difference between these two types of holding the value since I am storing the same value i.e., wdDoModifyView's view parameter. But when I trigger the action from different user sessions, the first type of code (using static variable) prints the same value in both the sessions for view.hashCode() and View.toString(), but the same is printing the different values when I pass the attribute which holds the view parameter.
    Clarification on this is highly appreciated
    The problem I face is when I use static variable to get the view instance and export the data using the UI element's id, the data belonging to different user sessions is mixed up where as when I use Context Attribute, the same problem doesn't arise. I want to know the reason why it is so. Is there any other place or way where I can get the current view instance of each session instead of wdDoModifyView?

    Hi Sujai ,
    As you have specified the problem that we face when we use  static attributes, when end users are using the application .
    Static means i  have n number of objects but the static variable value will remain same every where.
    when it is context attribute for every object i.e nth object you have a nth context attribute i mean nth copy of the context attribute.
    so every user has a unique Iview parameter , when context is used and
    when static is used  , assume you have userA , his iview is set this intially  and u have another user B , when he is using  , since the variable is static and when you access this variable you will get the value of userA.
    Regards
    Govardan Raj

  • When should I use static variable and when should not? Java essential

    When should I use static variable and when should not? Java essential

    Static => same value for all instances of the class.
    Non-static => each instance can have its own value.
    Which you need in which circumstances is completely up to you.

  • Can I use static variable in EJB?

    Many books suggest developer don't use static variable in EJB,I want to know why?
    I know there isn't any problem if the static varibale is read only
    For writable static varible ,what will happen if I use a static Hashtable for share data
    Help me!Thank you very much!!

    Greetings,
    I know that "EJB business methods are not allowed to
    block on synchronized resources" Just where do you "know" that from?? The EJB 2.0 Specification, at least, is nowhere in agrement with this statement. If it comes from a book I would question the author's reasoning. Contractually, there's no sound basis for this. In the case of Session Beans, they have an expressedly direct and single-threaded association with a client. From a design viewpoint, it certainly seems unnecessary for a bean to "block" its one-and-only client, but to say that it "is not allowed to" do so is without merit. Entity Beans, on the other hand, are concurrently accessible. Yet, with regard to a transactional context being in effect, the container does indeed block on a bean's business methods. For the bean to do so itself is, therefore, unnecessary. Furthermore, the specification explicitly concedes that a "Bean Provider is typically an application domain expert" and "is not required to be an expert at system-level programming." (EJB 2.0 Spec. 3.1.1) From these statements alone it is reasonable to assume the above statement is meritless since the Bean Provider is not expected to even consider synchronization issues when developing a bean.
    But I'm mixed up why we could use "Hashtable" or otherApparently, because your sources are as well...
    collection classes in the EJB ,in these method many
    methods are synchronized In fact, not only "can we use" them but, with respect to multiple-row finders in Entity Beans we are [i]required to use them (or an iteration of them)! Not all Collection classes are synchronized (so called "heavy-weight collections"). As shown above, that the choice of a particular Collection class might be synchronized is of little consequence since a bean designed under strict adherence to the specification ensures that it is never concurrently writeable.
    Could someone provide a good way for this problem?
    Please Help Me!!!Regards,
    Tony "Vee Schade" Cook

  • Is is better to use static variables?

    Hi,
    Does anyone know if it's better to use static variables or to use normal variables?
    Concerning the size of the code, it seems that declaring a variable as static is more consuming (for example plus 6 bytes for an object reference).
    So this could mean that declaring variables as static should be avoided, but what about the execution time?
    Some years ago, some javacard gurus were claiming that it's was better to use static variables (less processing required by the JVM to resolve adresses of static variables), but is it still the case?

    Hi Lexdabear,
    Thanks for the answer.
    I did the test (I converted my all code to use static variables and methods as much as possible), and did a bench before and after, on a JCOP31 card.
    The conclusion is that today JVMs and processors are much powerful than 5 years ago, and that the difference is really difficult to measure, which anyway is a good thing for us ;-)

  • Static variable is single for class or single for JVM

    Hello,
    I have doubt, static variable is single for class or single for JVM. as per my knowledge static variable is single for class, but suposse i have an web application (war of an application ) i deployed the application twice with different context, supose yahoo and yahoo1. but the ditrectory structure and classes are same, if i have a statc variable in
    a classof an application, if i change the static variable of one class of an application wether it will change the static value of the class of another application.
    Example
              yahoo -> web-inf ->      classes ->MainPackage->     MyStaticClass->     static int i=9;
              yahoo1 -> web-inf ->      classes ->MainPackage->     MyStaticClass->     static int i=6;
              if i change the static value i in yahoo application to i=5;
              at the same time if i access the value i in yahoo1 application what i will get (wether 5 or 6).
    Thanks.

    A static variable is 'single' in its class.
    A Class is 'single' in its ClassLoader.
    There can be many ClassLoaders per JVM.
    There can be many applications per JVM. Each one generally has its own ClassLoader.
    Ergo there can be many instances of a Class, and therefore many instances of its static data.

  • HT5622 How do I change the Apple id against a certain telephone number?  I have two iPhones and wish to use a different Apple id for each and confused as to how I do this?

    How do I change the Apple id against a certain telephone number?  I have two iPhones and wish to use a different Apple id for each and confused as to how I do this?

    Create a new Apple ID for the second phone. If you are setting the phones up as new phone enter the ID you want to use on each phone.
    If both phones are already signed in to one Apple ID then use the settings app to change Apple IDs on one phone.
    Settings > iTunes and App Store > tap on the Apple ID > sign out > sign in with alternate Apple ID.
    Note that if you have downloaded apps with the original Apple ID on the phone with the new Apple ID, those apps will still be associated with the old Apple ID and will require the old ID and password in order to update them.

  • "... y ou will be charged for each recipient for each message sent."

    I received the system message today from Verizon: "Starting on October 14th, 2011 when sending a picture or video message, you will be charged for each reicpient for each message sent." I have $10 / month text plan that permits me 250 text messages.
    I assume this system message means that, if I send ONE picture message to TWO recipients, e.g., then my pool of remaining text messages will be deducted by TWO.
    I assume that the system message does not mean that, if I send ONE picture message to TWO recipients, e.g., then I will be charged, ABOVE AND BEYOND $10, for both messages, EVEN IF I HAVE TWO OR MORE MESSAGE LEFT IN MY POOL.
    Are my two assumptions correct?

    harbin96 wrote:
    I have the same phone and received the same text today right after I added money to my account. I'm hoping your are right because I'm not paying extra just to send pics and videos! I wonder if this only applies to plans w/o the texting bundle. But as soon as the Unleashed plan comes out on Thursday, I'm gonna get a new phone and get that plan!!
    Unleashed is a prepaid plan and yes it does have unlimited texting, Internet (Note I did not say data).
    The issue, you are limited to particular phones. Feature phones only.

  • Introduce delay of 7 Days for each message of a particular type.

    I have a requirment that after receiving a message of a particular type, PI will hold the message for 7 days before processing, originally I thought a wait step in BPM maybe the appropriate solution but it isnt. (Memory usage/BPM blocking)....
    Im not sure what the best approach is to meet this requirment, other than a completely custom solution (custom table to store the message - with a background task that continues to process after 7 days).
    Ideally the solution will use the PI standard fucntionalty/tools to implement the solution, even using the file adapter to write the messages to the file system and then coming back and reporocessing in 7 days ....
    Im not sure ...
    Any input ?

    Ive had a bit of a think about this ... here is what Im thinking, given there is no defintative way of doing this correctly...
    1. Inbound File adapter reads inbound files.
    2. Transform and write the file to an outbound directory with a specific fileName mask "Day1_name.xml" based on a UDF.
    3. Create 7 File Adapters each running on seperate days 1 -> 7 picking up Files of a specific mask "Day1_*" (Day1 == monday and so on)
    4. Write the file to its ultimate destination and archieve the message when the correct file adapter is triggered.
    Advantages;
    1. No OS involvment - whilst writing a CRON job (shell script) to do this would be relatively simple it does add another point of failure.
    2. No excessive wait times/resource usage on PI
    3. In the event of a PI crash the file system will be intact where as thread.sleep(?????) will not be.
    Disadvantages;
    1. Given the possible downfalls of other solutions this seems to be best.
    Am I missing anything ...

  • Package Variable Values in For Each Contaner

    I have a For Each File Container that loops through Excel files, executing a child package for each file found. I am using the RowCount transform to log the number of rows at various points in a DataFlow. When one file is processed the numbers are correct
    but when multiple files (e.g. 5) are processed some counts are zero when they shouldn't be. I have tried a 1 second sleep in the loop but that didn't fix the problem.
    R Campbell

    Please share more technical details
    numbers of what where, what Data Flaw how a package reports on the counts?
    Arthur
    MyBlog
    Twitter
    Actually, the title IS misleading.
    I have a parent package with a For Each File container
    and within that a child package is called, passing the file path and name. The child package has a
    DataFlow with quite a few branches in the flow. On some of those branches I have
    RowCount "transforms" each linked to its own
    package variable.
    At the CotrolFlow level a script is executed immediately after the DataFlow which writes the package variable values to the dts log.
    If I place one file at a time into the folder that the For Each Container is looking at and wait for it to be processed, the numbers are correct. If I place a number of files (say 5) in the folder at one time, some of the numbers logged are correct
    and some are zero.
    I did try a 1 second sleep at the start of the logging  script but, when I think about it, the package variables probably being read before the script starts to execute. If this is a timing issue (which I don't think that it should be) it might need
    to be a separate script between the DataFlow and the existing script, with a sleep in it.
    Because each loop of the parent package executes a new instance of the child package I am puzzled as to how there can be a timing issue. No matter how tight the loop might be, a new instance of the child package is executed each time.
    R Campbell

  • Multiple web service calls - Split message,1 WS call for each message

    Friends,
    We have designed a BPM which will pick the files, make web service call and merge these message structures and map them to the target.
    We have to modify this design as follows,
    We have to split the message based on purchase order number, meaning one message for each order number and then we need to make a web service call for each of them,after we get all the responses we will merge the files using transformation. (merging files and transformation is already taken care, its the web service part which iam looking for)
    Thanks in advance for all your help/ideas.

    Friends,
    Can you please help me out with this logic? Thanks!

  • I am a teacher with 7 iPads for my room with no VPP or Apple Configurator.  May I use the same Apple ID for each of the devices with a separate password for each device?

    Who can help me with the above question?  Multiple iPads in one classroom:  may I use the same Apple ID (which is my work email) for each iPad, and construct a separate password for each device?  My school does not have VPP or Apple Configurator

    Password to what, exactly? If you're referring to the screen lock, each iPad can have a separate passcode, since that's not tied to an Apple ID. If that's not what you mean, please post back and clarify what password you're referring to and what you wish to accomplish.
    Regards.

  • How to use Generic Object Services(GOS) for each table control record.

    Dear Expert,
                       I am using generic object services for document attachment but i am facing a problem while attaching document to a table control row. my requirement is to attach separate document for each and every row of table control but  i am unable to attach document row wise of the table control.for each row GOS should display corresponding attached document not all the attached document.
    Thanks in Advanced
    Bhuwan Tiwari
    Edited by: BHUWAN TIWARI on Feb 8, 2011 4:16 PM
    Edited by: BHUWAN TIWARI on Feb 8, 2011 4:16 PM

    You haven't explained what object and object key you're using, nor have you provided any indication of how you implemented the GOS attachment functionality.  You need to provide more information to resolve an issue like this.

  • Using a variable db link for an interactive report

    I have a requirement where users will select an instance (db link) from an apex LOV and the data in an interactive report will query based on the db link selected.
    I can use a db link in an interactive report query but only if I provide the exact name of the link. If I do something link select * from foo@:P12_DBLINK it doesn't work.
    It seems my only option is to use something like apex_collection.create_collection_from_query and then I can build my query with dynamic sql and use a variable for the dblink name. Then I just create an IRR based on my collection.
    Does that sound like that correct approach and/or am I missing anything?
    Any suggestions are most appreciated,
    john

    I guess I have it working ok. I am able to create a region of type 'PL/SQL Dynamic Content' and do something like this and it works. As I change the dblink select list the report refreshes with data from that instance. Pretty cool! I just can't believe it's this much work to do this. This is just one column of data and I have about 10 columns that I need to display:
    declare
    type array_t is varray(100) of number;
    array array_t;
    l_sql varchar2(4000);
    begin
    l_sql := 'SELECT credit_card_trxn_id FROM EXM_CREDIT_CARD_TRXNS@'||:P4_DBLINK;
    execute immediate l_sql BULK COLLECT INTO array;
    for i IN 1..array.count
    LOOP
    HTP.p (array(i));
    HTP.br;
    END LOOP;
    end;

Maybe you are looking for

  • BOOTMGR missing ( no data on laptop can be found)

    Hi, I've purchased an HP Pivillion G6z notebook PC a month ago and my lil nefhew accidently knock down my laptop. it's shut down right away after that i try turing it back on again and again but the white letter keep showing up " BOOTMGR missing" I'v

  • Cannot synk from itunes with new hp pc frustrated!

    I have an i pod Touch which i really like as does my wife. Problem purchased new HP desktop transferred from old to new problem i tunes does not identify with my new PC. Not to computer savy but a pretty good listener. Any suggestions will be appreci

  • How do I fix a SIGABRT error in Xcode 4 ?

    I keep getting this error in Xcode 4 when I run the app:

  • Family Share question

    i I have sent two invites to my children and it says safari can not open invite bc it is an invalid address, not sure what to do.  Also currently we use one account am I understanding correct that I will need to set them both up Apple ID's to use fam

  • [solved] init 5 and logout from Xorg session -- crash

    Hi guys and gals! Hope this is the right forum. I have a strange issue here with restarting Xorg sessions. As long as I just boot up or use Ctrl+Alt+Backspace to start and shutdown X, there's no problem at all, session manager (kdm) comes up properly