Constructing / Updating a message in Loop of BizTalk Orchestration

Hi,
I have case where i need to to iterate a message received by Orchestration and validate each individual record of that message. Based on result of validation I need to mark a <STATUS> in the same message as Valid or Invalid. Later I need to use this
message for filtering Valid records for futher actions.
Please help on ideas how to achieve it.
Example / Sample
Received Message By Orchestartion
<Items>
<Item>
<ID>11</ID>
<STATUS></STATUS>
</Item>
<Item>
<ID>12</ID>
<STATUS></STATUS>
</Item>
<Item>
<ID>13</ID>
<STATUS></STATUS>
</Item>
</Items>
The Item node will be looped and checked for status against ID. This will be done using a method which will receive ID and return STATUS. I need to update back the STATUS in orginal message and then consume following message in the same orchestration.
Expected Message after LOOP
<Items>
<Item>
<ID>11</ID>
<STATUS>VALID</STATUS>
</Item>
<Item>
<ID>12</ID>
<STATUS>VALID</STATUS>
</Item>
<Item>
<ID>13</ID>
<STATUS>INVALID</STATUS>
</Item>
</Items>
Any help will be highly appriciated
umair_bs

You have two options,
Do it in orchestration, loop through the item(s) node and update the Status field based on your validation logic using XPath
Or more simple option, pass the message to a .NET helper as below where you can apply your validation logic and update the XML file and .NET helper can return a XMLDocument which you can use in
Message-Assignment shape under Construct shape to construct a update message.
public static XmlDocument ContractUpdateStatusMsg(XmlDocument inXML)
XmlNodeList items = inXML.SelectNodes("/*[local-name()='Items' and namespace-uri()='']/*[local-name()='Item' and namespace-uri()='']");
foreach (XmlNode item in items)
//If condition can be contructed based on your validation logic
//where you send the value of ID to another methods which retrun or false
if (item.SelectSingleNode("ID").InnerText == "11")
item.SelectSingleNode("STATUS").InnerText = "VALID";
else
item.SelectSingleNode("STATUS").InnerText = "INVALID";
return inXML;
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

Similar Messages

  • Re: Remove log messages from loop

    CURSOR cur_item_rev_child IS
    SELECT ffv.flex_value, --org code
    mp.organization_id
    FROM fnd_flex_values ffv,
    fnd_flex_value_sets ffvs,
    mtl_parameters mp
    WHERE ffv.flex_value_set_id = ffvs.flex_value_set_id
    AND ffvs.flex_value_set_name = 'EMR Add Spec Org' -- Changed by WIPRO on 01-OCT-12 (SR # 1078990 )--
    AND NVL(ffv.enabled_flag, 'N') = 'Y'
    AND ffv.flex_value = mp.organization_code
    AND mp.master_organization_id = v_num_master_org;
    CURSOR cur_item_rev (i_num_organization_id NUMBER)
    IS
    SELECT /*+ index(xvasd XXINV_VLVS_ADD_SPEC_DETAILS_N1 )*/mirb.inventory_item_id,
    mirb.organization_id,
    MAX(mirb.revision) item_revision,
    msib.segment1, -- Added by Infosys on 19-May-09
    xvasd.spec_revision spec_revision -- Added by Infosys on 19-May-09
    FROM xxinv_vlvs_add_spec_details xvasd,
    xxinv_vlvs_item_add_spec xvias,
    mtl_parameters mp,
    mtl_system_items_b msib,
    mtl_item_revisions_b mirb
    WHERE xvasd.spec_number = xvias.spec_number
    AND xvasd.spec_type = xvias.spec_type
    AND xvias.spec_type = v_chr_spec_type
    AND xvasd.spec_status='ACTIVE'
    AND xvias.inv_item_id = msib.inventory_item_id
    AND mirb.inventory_item_id=msib.inventory_item_id
    AND xvias.organization_id = msib.organization_id
    AND msib.organization_id = mirb.organization_id
    AND mirb.organization_id = mp.organization_id
    AND mp.organization_id = i_num_organization_id
    --AND LPAD (xvasd.spec_revision, 3, 0) LPAD (b.revision, 3, 0)
    GROUP BY mirb.inventory_item_id,
    mirb.organization_id,
    msib.segment1,
    xvasd.spec_revision;
    BEGIN
    o_chr_errbuf := 'Program Completed Successfully';
    o_num_retcode := 0;
    fnd_file.put_line(fnd_file.output,
    fnd_file.put_line(fnd_file.output,
    ' EMR INV Item Revisions Update Program VLVS');
    fnd_file.put_line(fnd_file.output,
    fnd_file.put_line(fnd_file.output, '');
    --Starting the Program
    fnd_file.put_line(fnd_file.LOG,
    fnd_file.put_line(fnd_file.LOG,
    ' EMR INV Item Revisions Update Program VLVS');
    fnd_file.put_line(fnd_file.LOG,
    fnd_file.put_line(fnd_file.LOG, '');
    fnd_file.put_line(fnd_file.LOG, 'Input Parameter');
    fnd_file.put_line(fnd_file.LOG, '---------------');
    fnd_file.put_line(fnd_file.LOG, 'Debug Mode: ' || v_chr_debug_mode);
    fnd_file.put_line(fnd_file.LOG, '');
    fnd_file.put_line(fnd_file.LOG,
    -- Get the value of the spec type from the lookup. If no value is set then display the error message and raise exception
    IF v_chr_spec_type IS NULL
    THEN
    fnd_file.put_line(fnd_file.LOG,
    'Error: Set a value for the profile: XXINV : Additional Spec Type VLVS');
    RAISE excp_user;
    ELSE
    fnd_file.put_line(fnd_file.LOG,
    'Processing for the addition spec item type: ' ||
    v_chr_spec_type);
    END IF;
    -- Select all the eligible records for processing
    FOR rec_cur_item_rev_child IN cur_item_rev_child
    LOOP
    FOR rec_cur_item_rev IN cur_item_rev (rec_cur_item_rev_child.organization_id)
    LOOP
    -- v_chr_spec_rev := NULL;
    -- v_chr_item_number := NULL; Commented by Infosys on 19-May-09
    /* BEGIN --Start of comments by Infosys on 19-May-09
    SELECT segment1
    INTO v_chr_item_number
    FROM mtl_system_items_b
    WHERE inventory_item_id = rec_cur_item_rev.inventory_item_id
    AND organization_id=rec_cur_item_rev.organization_id;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    v_chr_item_number := NULL;
    fnd_file.put_line(fnd_file.LOG,'Item Number not found in MTL_SYSTEM_ITEMS_B Table for the inv item id '
    ||rec_cur_item_rev.inventory_item_id);
    WHEN OTHERS THEN
    v_chr_item_number := NULL;
    RAISE excp_loop;
    END;*/--End of comments by Infosys on 19-May-09
    /*BEGIN --Start of comments by Infosys on 19-May-09
    SELECT MAX(spec_revision)
    INTO v_chr_spec_rev
    FROM xxinv_vlvs_add_spec_details xvasd,
    xxinv_vlvs_item_add_spec xvias
    WHERE xvasd.spec_number = xvias.spec_number
    AND xvasd.spec_type = xvias.spec_type
    AND xvias.spec_type = v_chr_spec_type
    AND xvias.inv_item_id =rec_cur_item_rev.inventory_item_id
    AND organization_id=rec_cur_item_rev.organization_id
    GROUP BY xvias.inv_item_id,
    organization_id,
    xvias.spec_type;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    v_chr_spec_rev := NULL;
    fnd_file.put_line(fnd_file.LOG,'Spec Revision not found in Additional Specs Table for the inv item id '
    ||rec_cur_item_rev.inventory_item_id);
    WHEN OTHERS THEN
    v_chr_spec_rev := NULL;
    RAISE excp_loop;
    END;*/--End of comments by Infosys on 19-May-09
    IF LPAD (rec_cur_item_rev.spec_revision, 3, 0) LPAD (rec_cur_item_rev.item_revision, 3, 0)
    THEN
    BEGIN
    v_num_total_cnt := v_num_total_cnt + 1;
    --to take count of the total records processed
    v_chr_error_flag := 'N'; reset the error flag to N before processing each record
    v_num_revision_id := NULL;
    IF v_num_total_cnt = 1
    THEN
    v_chr_output_hdr := 'ORG CODE' ||
    RPAD('|ITEM NUMBER', 51, ' ') ||
    '|ITEM REV' || '|SPEC REV' ||
    '|ERROR REASON';
    END IF;
    -- Check if the revision on the spec is greater that the revision on the item
    IF LPAD (rec_cur_item_rev.spec_revision, 3, 0) > LPAD (rec_cur_item_rev.item_revision, 3, 0)
    THEN
    BEGIN
    SELECT mtl_item_revisions_b_s.NEXTVAL
    INTO v_num_revision_id
    FROM DUAL;
    EXCEPTION
    WHEN OTHERS THEN
    v_chr_temp_msg := 'Error when getting the new revision id from the sequence MTL_ITEM_REVISIONS_B_S: ' ||
    SQLERRM;
    RAISE excp_loop;
    END;
    -- begin block for assigning values and calling API to update the item revisions
    BEGIN
    v_rec_item_revision.inventory_item_id := rec_cur_item_rev.inventory_item_id;
    v_rec_item_revision.organization_id := rec_cur_item_rev_child.organization_id;
    v_rec_item_revision.revision_id := v_num_revision_id;
    v_rec_item_revision.revision := rec_cur_item_rev.spec_revision;--v_chr_spec_rev;
    v_rec_item_revision.revision_label := rec_cur_item_rev.spec_revision;--v_chr_spec_rev;
    v_rec_item_revision.revision_reason := 'Updated the Item Revision';
    v_rec_item_revision.implementation_date := v_dte_sysdate;
    v_rec_item_revision.effectivity_date := v_dte_sysdate;
    v_rec_item_revision.attribute_category := NULL;
    v_rec_item_revision.attribute1 := NULL;
    v_rec_item_revision.attribute2 := NULL;
    v_rec_item_revision.attribute3 := NULL;
    v_rec_item_revision.attribute4 := NULL;
    v_rec_item_revision.attribute5 := NULL;
    v_rec_item_revision.attribute6 := NULL;
    v_rec_item_revision.attribute7 := NULL;
    v_rec_item_revision.attribute8 := NULL;
    v_rec_item_revision.attribute9 := NULL;
    v_rec_item_revision.attribute10 := NULL;
    v_rec_item_revision.attribute11 := NULL;
    v_rec_item_revision.attribute12 := NULL;
    v_rec_item_revision.attribute13 := NULL;
    v_rec_item_revision.attribute14 := NULL;
    v_rec_item_revision.attribute15 := NULL;
    v_rec_item_revision.description := NULL;
    v_rec_item_revision.creation_date := v_dte_sysdate;
    v_rec_item_revision.created_by := v_num_user_id;
    v_rec_item_revision.last_update_date := v_dte_sysdate;
    v_rec_item_revision.last_updated_by := v_num_user_id;
    v_rec_item_revision.last_update_login := v_num_login_id;
    v_rec_item_revision.request_id := v_num_request_id;
    v_rec_item_revision.program_id := v_num_program_id;
    v_rec_item_revision.program_application_id := v_num_prog_appln_id;
    mtl_item_revisions_util.insert_row(p_item_revision_rec => v_rec_item_revision,
    x_rowid => v_chr_ret_rowid);
    v_num_succ_cnt := v_num_succ_cnt + 1;
    COMMIT;
    EXCEPTION
    WHEN OTHERS THEN
    v_chr_temp_msg := 'Error when updating the revisions: ' ||
    SQLERRM;
    RAISE excp_loop;
    END;
    ELSE -- LPAD (cur_item_rev.spec_revision, 3, 0) < LPAD (cur_item_rev.item_revision, 3, 0)
    v_chr_temp_msg := 'Item Revision is greater than the Spec Revision';
    o_num_retcode := 1;
    v_num_err_cnt := v_num_err_cnt + 1;
    ROLLBACK;
    fnd_file.put_line(fnd_file.LOG, '');
    fnd_file.put_line(fnd_file.LOG,
    'Organization Code: ' ||
    rec_cur_item_rev_child.flex_value); -- added on 05-May-09 by infosys --
    fnd_file.put_line(fnd_file.LOG,
    'Item Number: ' ||
    rec_cur_item_rev.segment1);
    fnd_file.put_line(fnd_file.LOG,
    'Item Revision: ' ||
    rec_cur_item_rev.item_revision); -- v_chr_item_revision_child -- -- added on 05-May-09 by infosys --
    fnd_file.put_line(fnd_file.LOG,
    'Spec Revision: ' ||
    rec_cur_item_rev.spec_revision);
    fnd_file.put_line(fnd_file.LOG,
    'Error: ' ||
    v_chr_temp_msg);
    fnd_file.put_line(fnd_file.LOG,
    v_chr_output_msg := v_chr_output_msg ||
    RPAD(rec_cur_item_rev_child.flex_value, -- added on 05-May-09 by infosys --
    8,
    ' ') || '|' ||
    RPAD(rec_cur_item_rev.segment1,
    50,
    ' ') || '|' ||
    RPAD(rec_cur_item_rev.item_revision, v_chr_item_revision_child, added on 05-May-09 by infosys --
    8,
    ' ') || '|' ||
    RPAD(rec_cur_item_rev.spec_revision,
    8,
    ' ') || '|' ||
    v_chr_temp_msg ||
    CHR(10);
    v_chr_mail_body := v_chr_mail_body ||
    RPAD(rec_cur_item_rev_child.flex_value, -- added on 05-May-09 by infosys --
    8,
    ' ') || '|' ||
    RPAD(rec_cur_item_rev.segment1,
    50,
    ' ') || '|' ||
    RPAD(rec_cur_item_rev.item_revision, v_chr_item_revision_child added on 05-May-09 by infosys --
    8,
    ' ') || '|' ||
    RPAD(rec_cur_item_rev.spec_revision,
    8,
    ' ') || '|' ||
    v_chr_temp_msg ||
    -- Display the statistics details in the output file
    fnd_file.put_line(fnd_file.output, '');
    fnd_file.put_line(fnd_file.output,
    'Number of items selected for update: ' ||
    v_num_total_cnt);
    fnd_file.put_line(fnd_file.output,
    'Number of items updated: ' || v_num_succ_cnt);
    fnd_file.put_line(fnd_file.output,
    'Number of items not updated: ' || v_num_err_cnt);
    fnd_file.put_line(fnd_file.output, '');
    fnd_file.put_line(fnd_file.output, v_chr_output_hdr);
    * Print out the output message from CLOB variable "v_chr_output_msg"
    * Substr each line whenever we find the separator CHR(10)
    * Print each line with fnd_file.output function
    BEGIN
    v_num_offset := 1;
    v_num_instr := 0;
    LOOP
    EXIT WHEN v_num_offset > dbms_lob.getlength(v_chr_output_msg);
    -- Get the position of CHR(10) when first time appearence.
    v_num_instr := dbms_lob.instr(v_chr_output_msg,
    CHR(10),
    v_num_offset,
    1);
    v_num_line_length := v_num_instr - v_num_offset + 1;
    -- Substr the each line and print it out
    fnd_file.put_line(fnd_file.output,
    dbms_lob.substr(v_chr_output_msg,
    v_num_line_length - 1,
    v_num_offset));
    v_num_offset := v_num_offset + v_num_line_length;
    END LOOP;
    END;
    END IF; -- LPAD (cur_item_rev.spec_revision, 3, 0) < LPAD (cur_item_rev.item_revision, 3, 0) --
    EXCEPTION
    WHEN OTHERS THEN
    ROLLBACK;
    fnd_file.put_line(fnd_file.LOG,
    'Porcessing next record as a Error occured in cursor loop cur_item_rev : ' ||
    SQLERRM);
    END;
    END IF;
    END LOOP; -- cur_item_rev --
    END LOOP; -- cur_item_rev_child --
    -- calling the mail procedure --
    IF v_num_err_cnt > 0
    THEN
    BEGIN
    fnd_file.put_line(fnd_file.LOG, '');
    fnd_file.put_line(fnd_file.LOG,
    'Calling send_notification Procedure...');
    send_notification(o_chr_ret_code => v_chr_status,
    o_chr_ret_mesg => v_chr_temp_msg,
    i_chr_subject => 'EMR INV Item Revisions Update Program VLVS - ' ||
    v_dte_sysdate,
    i_chr_body => v_chr_mail_body);
    EXCEPTION
    WHEN OTHERS THEN
    v_chr_temp_msg := 'Error when calling Procedure send_notification .';
    fnd_file.put_line(fnd_file.LOG,
    'Error details : ' || v_chr_temp_msg ||
    ' - ' || SQLERRM);
    RAISE excp_user;
    END;
    END IF;
    EXCEPTION
    /*WHEN excp_loop THEN
    ROLLBACK;
    o_chr_errbuf := o_chr_errbuf ||
    'Program completed with error when getting the max revision';
    o_num_retcode := 2;*/
    WHEN excp_user THEN
    ROLLBACK;
    o_chr_errbuf := o_chr_errbuf || 'Program completed with error';
    o_num_retcode := 2;
    WHEN OTHERS THEN
    ROLLBACK;
    fnd_file.put_line(fnd_file.LOG,
    'Error in Item Revisions Update Program: ' ||
    SQLERRM);
    o_chr_errbuf := o_chr_errbuf || 'Program completed with error';
    o_num_retcode := 2;
    END update_item_revision;

    I need to remove the log messages from loop...As currently log file printing is in loop....Can you please tell how to remove log file messages from loop.

  • Updating JPanel during a loop.

    Here's the deal: my first class (first file) which extends a JFrame, creates a JFrame and adds some JPanels to it (with buttons, JTextFields etc), after i press one button it creates an instance of a class Algorithm that is in another file, and calls a function solve() from that class, which counts some things. In that function (the start() one) there are 2 loops, and it returns a stack. The thing is I want a JTextField from that JFrame to be updated with every new loop (so it would show numbers 1,2,3,4,etc while the function was being executed). If they were in a single file than there would be no problem (simply message.setText(loopNumber+"");), but since they are in different files I have no idea how to do it. Should I try making a new thread for the solve() function or what?
    It would be something like this, file1 (tho the new Algorithm part isnt in main() but it is executed after a button is pressed):
    public class Frame extends JFrame{
             variables
             private JTextField message; // this one is in one of the JPanels attached to the JFrame
    main(){
           JFrame frame = new JFrame();
           new algorithm = new Algorithm(passes some variables);
           algorithm.solve();
    }Second file:
    public class Algorithm{
           some variables,
           constructor etc;
           int numer = 0;
           public void solve(){
                    for(int i=0; i < 10; i++){
                              numer += 1;
                              something happens here;
    }And I want to change the "message" whenever "number" changes.

    Someone told me I should make a new thread for the soultion() in order to "repaint" the JPanel that contains the "message"...Not for setting a text field, you shouldn't. But you're getting dangerously close to mashing up your GUI and "business" logic with inappropriate relationships. You may want to have a look at the Observer pattern, where your algorithm can notify any observers of state changes, and the observers can handle that information as they see fit.
    ~

  • After last automatic update, error message XUL Runner error platform version '6.0.2' is not compatible with minVersion 6.0.1. maxVersion 6.0.1. I am unable to open Mozilla Firefox at all. Had to use Explorer to ask this question!

    After last automatic update, error message XUL Runner error platform version 6.0.2. is not compatible with min Version 6.0.1 maxVersion 6.0.1 appeared every time I try to open/run Mozilla Firefox.

    See:
    *[[/questions/869812]]
    *[[/questions/869951]]

  • Received notice of an update for one of my apps and when I tried to update the message reads "Account Not in this store"  i must switch to a Canadian store before purchasing

    Received notice of an update for one of my apps and when I tried to update the message reads "Account Not in this store"  i must switch to a Canadian store before purchasing.  I deleted app and tried to download again but still got the message.  Anyone know how to fix?  FYI have had phone for 2 years and this is the first time this has happened.

    The Apple id that you created do you remember if you created with your region sellected as Canada or US. If so you can change Region directly on your device by clicking on App Store icon, Scroll to bottom and tap your app is, click view acct and change region

  • How do I prevent the "update available" message while I'm watching a program?

    My 2011 Mac Mini is connected, via HDMI, to my 46" Samsung HD TV. I buy and rent 1080 movies and TV shows from iTunes. I also play a lot of other files that I've downloaded from other places. It's terrific except for one fly in the ointment...
    No matter what I'm watching, iTunes, NetFlix, VLC, Quicktime or straight off the desktop; if there is new software available, I get that annoying message that appears in the upper right hand corner. I can slide it to the right but it comes back a few minutes later. I could stop everything and perform the upgrade 10 to 30 minutes later but is this really the way video on a Mac is supposed to work? I feel there should be a way, at least, to pervent this from happening when I'm watching a program/movie/TV show. If it happens between, fine but why does it always have to pester me when I'm trying to enjoy watching T.V.?
    I know there is a way to turn it off, for the day, but come on- There's got to be a better solution than that. My U-Verse box very rarely bugs me about things. OSX and/or iTunes does it ALL the time. Can't it give me a break when I'm watching T.V.?
    Hopefully, I just missed some setting but I've tried a few things that didn't work.
    This is not a disaster but if someone knows a solution, I would be very grateful!
    Thanks!
    Teddy

    Mende1,
      Thanks for the super-fast response!
    I believe I tried this once before but the check box for "Automatically check for updates" always comes back, the next day. However, this might be my best solution for now and I'll test it watching the latest "Ripper Street", in iTunes, tonight. If it lasts the length of the program, I'll have to decide if I want to select "This solved my question" or "This helped me."
    I think I expected Apple to be a little more inTune with this. I absolutely love watching programs with my Mac Mini via HDMI. If they could find a consistent way to not interrupt programs, even with "Automatically check for updates" checked, the Mac video experience would be nearly perfect.
    I do make sure to perform updates but, between my wife's Mac and my two, plus the fact that updates seem to be occuring on a weekly basis, it's not easy to update immediately. I just feel that if a person is watching a movie or T.V. program, it's very clunky to have the "update available" message continuously appearing.
    Thanks again!
    Teddy

  • UPDATE FAILED MESSAGE WHEN TRYING TO DOWNLOAD FROM CC DESKTOP APP.

    I keep getting an 'update failed' message everytime I try to download from my CC desktop.
    What could this be?

    Kc2232 I would recommend reviewing the installation log for the update to determine why it is failing to install. You can find details on how to locate and interpret your installation log files at Troubleshoot install issues with log files | CC - http://helpx.adobe.com/creative-cloud/kb/troubleshoot-install-logs-cc.html.  You are welcome to post any specific errors you discover to this discussion.

  • XI: How to update the Message Status (shown by transaction SXMB_MONI  )

    Hi
       My question might be stupid, but I need you help.
    I would like to know how can I update the message status what we see while using trasaction SXMB_MONI  . The Scenrio is, I have a Custom Interface program build on the Abap Proxy interface method called EXECUTE_ASYNCHRONOUS.
    If I am not wrong, transaction SXMB_MONI is on the XI system and also on the SAP Application system. ( But I am not sure in what way the same transaction differ in two systems )
    My issue is,  when I receive the xml data into a structure in abap proxy, I am doing some validation on the received message data. If I found some error in the data , then I need to update the Message status of the SXMB_MONI to  ERROR flag. How to implement this ?   I have not done one before. And I am not sure, if any exception like error message is raised, will it stop the proxy from processing further and update the Message Status and this can be viewed using SXMP_MONI in the SAP application system to be ERROR flag?
    Or is there a BAPI or function module to handle this ?
    Appreciate your help
    David

    Hi
    I am not sure If I had understood you reply. But Would need your help to have a bit more insight to your answer. I am not completely into XI , but I am from ABAP side.
    At the R/3 side , Abap Proxy object geneted has the INTERFACE and its associated  METHOD, in which I am building my own abap code to do any validation on incomming data. But If I want to Raise a Exception, I understand that this Expection has to be first defined .
    But do I have to define a new Z Expection class  or can I just add a exception in the Proxy -Interface-method.
    I have not understood this process.
    All I need to do is, if I find any incomming data error , during my validation at the R/3 side, I need to stop the METHOD processing ( by any means ) and Update the Message Status flag show in SXMB_MONI to Error . 
    What is the trigger  that i can implement in myown code that will update the Message status to Error , from R/3 perspective of using SXMB_MONI.
    Thanks
    David

  • How do I update CAN messages being transmitted as a periodic waveform?

    I am using NI-CAN 1.5 to transmit CAN messages with a CAN Object using the "Transmit Periodic Waveform" communication type. The CAN card I am using is a dual port PXI-8461.
    I wish to update the waveform message(s) but am running into problems. I configure the CAN Object with a write buffer size of 2 and then start transmitting 2 messages with one message going out every 500ms. These 2 messages are correctly getting placed on the bus. To update the messages, I successfully stop the CAN Object and attempt to write new data into the write buffer. This is where I am running into problems. The ncWrite VI is failing with an error of 0xBFF62008 (Write Queue Overflow).
    Upon further
    inspection, I noticed that when I stopped the Object and there was only 1 of 2 messages pending, I could successfully write one time; however, the second write would fail with the same error. If 2 messages were pending, neither write would be successful. I need to be able to update both messages. I thought maybe I could use the ncWait VI to wait for the write queue to empty and then write in 2 new messages; however, this will not work since the ncWait VI never returns before a timeout occurs in "Transmit Periodic Waveform" communication type. Either 2 or 1 messages are always pending so it never sees that the card is ready for new data.
    I looked in the Programmer's Reference Manual, and this is the procedure recommended. (A bit different, but I tried it and came up with the same results.) The Reference Manual claims ncWrite replaces the oldest data in the queue on page 3-30, but on page 2-40 it says ncWrite returns an error when called on a full queue.
    Does anyone see anyt
    hing that I'm doing wrong or have an alternate way to accomplish what I want? Thanks for your help.

    The "Transmit Periodic Waveform" section (pg 3-30) of the NI-CAN Programmer's Reference states, "Use this configuration to transmit a fixed sequence of CAN data frames over and over, one CAN data frame every period."
    The words "fixed sequence" denote that it was not intended to change as the program runs. I appolgize if this was not clear. Any suggestions for improvement to the documentation can be emailed to [email protected]
    If those two data sets do not change at run-time, they could be merged together. For example, make the buffer the size of both data sets added together. Start by Writing the first element of set one, then the first element of set two, then the second element of set one, then the second element of set two, etc.
    Randy Solomonson
    Application Engineer
    National Instruments

  • I am trying to update Itunes - message is " Invalid signature - download removed'  any ideas

    I am trying to update Itunes - message received is " Invalid signature - download  removed"  Wassup doc ???

    Try the update again. I received the invalid signature message when I updated to 10.5.1, but re-trying sorted it out. I might have had to re-start my computer, I can't remember now.

  • What to do? Operating system update stalled - message installing software update less than a minute

    What to do? Operating system update stalled - message "installing software update less than a minute" but that has lasted hour

    Press and hold the power button for a few seconds until the power shuts off, then release, wait a few more seconds, and press it again briefly to restart.

  • I am trying to update to Itunes 10.5 and when i click update a message comes up cannot find url..

    I am trying to update to Itunes 10.5 and when i click update a message comes up cannot find url..any idea what this means

    Easyest way is to uninstal itunes manualy and then download new itunes from apple.com .

  • Our service provider add one digit to all nos. After I update all contacts using one of available programs, contacts are updated but messages received appear with pure phone nos not contact name??any fix

    Our service provider add one digit to all nos. After I update all contacts using one of available programs, contacts are updated but messages received appear with pure phone nos not contact name??any fix

    http://discussions.apple.com/thread.jspa?threadID=2280669&tstart=0

  • Update SAP Message in Solman

    Hi,
    I want to update the message in t.code CRM_DNO_MONITOR, so that I can read the reply from SAP.
    For that I am running the report RNOTIFUPDATE01 and provide details like installation no, Customer No.
    But when I execute this report I got the error that " None of the installations were assigned to a destination in the BAdI".
    Please guide me how to solve it.
    Regards,
    Nisit
    Edited by: Nisit  Patel on Apr 14, 2010 7:48 AM

    Dear Nisit,
    Do you have multiple customer numbers?
    If you do, then you likely did not configure the RFC destinations for your customer numbers which take the format SM_SP_[custnum].
    This would be configured via transaction SPRO, and would be an IMG Activity.
    Depending on what version of Solution Manager you have the tree differs, however you want to find the activity "Connection to SAP" > Multiple SAP Customer Numbers.
    Then you would perform those activities.
    I hope this will help.
    Regards,
    Paul

  • Please i am unable to restore my ipad due to error 3194.The restore process stalls when it gets to the point where the firmwarwe is being updated.error message 3194 comes up.please help me

    please i am unable to restore my ipad due to error 3194.The restore process stalls when it gets to the point where the firmwarwe is being updated.error message 3194 comes up.please help me

    http://support.apple.com/kb/TS3694#error3194 
    Unable to contact the iOS software update server gs.apple.com

Maybe you are looking for

  • Hp fails in commitment

    reference no.:8035171957  dear friends, never ever forever in your entire life buy an Hp product. I bought  hp pavillion dv6 series back from india in september.and i was happy initially with the product but once i came to Uk in october for my master

  • APP Error - 050 in exception list

    Document is getting picked up in payment run & but it is not posting clearing document. I checked in table 'REGUP' and it s showing exceptional message No.050. There is no block in document. Could anyone explaing why this error coming,description of

  • Port mapping converting gui to cli

    Hi, I am having an issue with a new office LAN implementation and I was wondering if anyone can help. The current setup has a Linksys router and there are port mappings for the servers for a inside and outside port. This has been input via GUI. I am

  • Home Folder Age Report

    Hello I need some help, is there a way I can generate some sort of report that I can run against my file servers to tell me if the home folder is in use or not. I was hoping to base the report on the last write time of any file that changes when a us

  • CRM-BI when i create infopackage system gets dump

    Hi All, I was changed the source system with BDLS. And in the new system i want to get data from source system to BI system. When i try, system gets the dump. The dump details: Trigger Location of Runtime Error     Program