Guaranteeing sequence order when polling with DB adapter

We need to read rows from a source table using the DB adapter in polling mode, and deliver them to separate files in the same order they were read from the DB.
My understanding is that when polling, if we find 10 records to be processed, 10 separate BPEL processes will be created.
It's not clear how to then maintain the sequence order when creating the files, as each process may execute faster or slower than others.
Any advice appreciated
Toby

Marc/Sjoerd,
Firstly, thanks for your replies.
On Marc's suggestion, if say we read 100 records using the database adapter, we get 100 processes. How do we control which process will be the first one to be processed, and which of the remaining 99 processes will be subsequently processed once the first has been completed by the cruncher process?
Sjoerd's 1st and 2nd option are not acceptable to us - we have to ensure the same order the records are read. for example record 1 could be a creation and record 2 could be an update to the first so delivering the update to the destination system before the creation will result in an error.
I'm not clear about option 3 - this sounds similar to Marc's suggestion. I can't see how order is maintained between a group of processes created as a result of the database adapter polling, and them being serviced by a cruncher/singleton process. What is to stop the bp which contains the first record being processed first, then the bp which contains the fifth record being processed second, then the bp which contains the second record being processed third etc?
Thanks
Toby

Similar Messages

  • HT1476 4s does not seem to respond when plugging with USB adapter

    I've had my 4s for about 3 months and suddenly yesterday it wouldn't recognize when plugging in the adapter to charge it.  I don't think that I'm having a battery issue but more of an issue w/ the sensors recognizing the adapter.  Has anyone else had this issue?

    Perform a hard reset and see if it fixes the issue.

  • Blocking multiple SOA Instances when polling from DB Adapter?

    Hi,
    I am on SOA 11.1.1.3 and have a simple requirement of sequential processing from a database table. I hence created a BPEL process to poll the DB and process the records sequentially by inserting 10 records in a single XML (and doing a while loop on these records). I have also kept a polling interval of 30s with Logical Delete option.
    When I have just 10 records in the table, it works fine by creating one instance. However, when there are 20 records in the table, it creates 2 instances of 10 records each and since these two instances are processed in parallel, the sequential processing no more happens and records are processed out of order.
    Is it possible to limit the number of instances to just one and prevent the second instance from kicking off. I have read about the singleton process but can I use this on a single node as well?
    Any inputs will be appreciated.
    Thanks!

    Hi
    From what I know there is nothing out of box that does guarantee ordered execution of instances. That is due to the Queue based work storage and multiple threads pulling data for execution of instances.
    I am not sure if that should be supported out of box as well.
    Polling process is expected to poll for records every X interval. And create instances that can be processed with in the container.
    From what I understand, the requirement needs to stop the polling process if there is a active instance
    OR
    Create a instance during each polling and check if there is an existing instance, wait till the other instance is complete and then proceed in order if multiple instances have been polled during the waiting window.
    One option that I have implemented that works at the source (database) works like this:
    1. Change the Db Adapter to logical delete
    2. Create a view on the database to only show 1 NEW record, or no records if there is a RESERVED record
    3. You might have to write a trigger on the table for updates to complex view created
    At least the requirement that I had was to process records in the order they were created.
    Status table look up might be tricky as it can not guarantee ordered execution of records as threads might grab the status in random order. But if the requirement is 1 at a time rather than ordered, this would be fine.
    But from JVM load perspective, instances might be sitting in the memory doing constantly trying to grab status from table. From performance perspective other options would need to be explored.
    Regards
    Kalidass Mookkaiah

  • I believe 3GS stereo jack damaged vehicle when used with cassette adapter

    I believe the 3GS damaged my automobile stereo through some sort of short in the headphone jack that is related to voice control. I've noticed other threads about headphones and voice control causing strange behaviors on the iPhone 3GS. I'm wondering if anyone else has noticed a problem with a cassette adapter as well. Here is my experience. First, I've owned both a 2G and a 3G prior to my 3GS. That is over 2 years experience with the iPhone platform prior to the issue. During that time I've used the same cassette adapter to output iTunes music to my car stereo system (same vehicle with original stereo during entire time as well…) - which is the OEM stereo that GM installs, as I own a 2K4 Chevy Silverado pickup truck. I’ve had zero issues with the 2G and 3G. Then, the first morning I go out to the truck with the 3GS and plug it in, there is a pop that comes out of the speakers, voice control comes on, then the phone locks up and has to be hard reset. I later notice that one of the backlight bulbs in the stereo is now blown (darkening half the display) and the vehicle speedometer is malfunctioning. The speedo issue might seem surprising, but given how GM wires everything back the stereo system for Onstar monitoring, while I don't know for sure, I assume the stereo received some sort of short from the 3GS and then passed that along to the electronics which control the instruments. The analog GM instrument cluster displays (such as speed) are all managed by electronics that drive small servos that actually move the needles.
    Anyhow, again, I feel it was the 3GS that caused this damage - as I'd been using other iPhone products for 2+ years and had no prior problems. Immediately after pluggin the 3GS in the first time the problem occurred. I think the voice control activating intermittently is a symptom of the problem. 8-9 times out of 10, when I plug the cassette adapter into the 3GS, voice control automatically starts, yet not all of the time. I am still using the same cassette adapter, but now plug it into the iPhone before it is inserted into stereo. While I’ve had no other issues with my stereo or instruments, I’m also very careful about not plugging the cassette adapter into the iPhone while the adapter is in the cassette player. I will also note that I'm on 2nd 3GS phone after an exchange for an unrelated issue and the new phone still intermittently activates voice control when the cassette adapter is plugged in. The issue also occurs with a 2nd cassette adapter (of different manufacture) which I use with a stereo in my home. In my mind, there something definitely wrong with the headphone jack on the 3GS and I believe it damaged my vehicle. Is anyone else seeing this issue?
    -Calvin

    You can try another cassette adapter or try another audio device with the same cassette adapter
    Have you considered getting  a BlackBerry VM-605?  Good prices on Amazon.
    Please click the Thumbs Up icon if this comment has helped you!
    If your issue is resolved, please click the solution button on the resolution!
    Every BlackBerry should have BlackBerry Protect, get it now! | Follow me on Twitter | Bring Back BBM Music!

  • Playlist is out of order when syncing with iPod shuffle

    Hi All,
    I am having some trouble when syncing my iPod shuffle. I creted a custom playlist and I want to maintain the song order. However, when I synce with the shuffle, the song list is "re-organized" by alpabetlially by artist. Any ideas?

    I know it can be done, someone please help...

  • Intermittent audio buzz when recording with power adapter

    While running my 13" Unibody MacBook Pro on the power adapter, I get an regularly pulsing buzz that affects audio recorded in through my Griffin iMic. There's a sample of the buzzing I recorded at http://drp.ly/lmd8R - it starts halfway through it. The buzzing starts a few seconds after plugging in the power adapter and stops a few seconds after plugging it in. The power adapter is grounded and the cord is separated from the audio cords. Any help would be appreciated.

    Are the Mac and all of the connected devices plugged into the same grounded UPS or outlet strip?
    When I had a similar problem I ended up having a very serious electrical wiring problem in my house–a poor earth-neutral bond in my case. You may want to have a professional electrician check things out.
    Message was edited by: DaddyPaycheck

  • Intermittence for execute Polling with DataBase Adapter in OSB11g

    Hello Guys,
    I'm having a problem running the polling DataBase Adapter OSB11g. The creation of the adapter was made in Jdeveloper 11.
    The problem is:
    Intermittence to run the polling DataBase. Sometimes it works, other time it does not work.
    Displays the following exception:
    *<Info> <JCA_FRAMEWORK_AND_ADAPTER> <BEA-000000> <<oracle.tip.adapter.db.InboundWork handleException> BINDING.JCA-11624*
    DBActivationSpec Polling Exception.
    *Query name: [BD_XPTO_NOTIFICA_XPTOSelect], Descriptor name: [BD_XPTO_NOTIFICA_PRICING.XPTO]. Polling the database for events failed on this iteration.*
    Caused by JTS transaction was marked rollback only.
    This exception is considered retriable, likely due to a communication failure.  Polling will be attempted again next polling interval.
    This is a BUG? Have Fix?
    Tks,
    Azevedo, Artur.

    It looks like a database issue or a XA configuration issue? What database you're polling? Oracle? Sybase? Check if your database is supported...
    Cheers,
    Vlad

  • HP Compaq NC8430 is not working on ANY battery, but works with AC adapter

    I have bought an used HP Compaq NC 8430.
    The computer fails to power on with its battery. But it's working with AC adapter.
    I blamed a bad battery but it cannot be that.
    I have switched the battery with a same model's one, which is 100% working.
    But the computer is not power on with the other battery. I have tried 2 more compatible batteries, still not working at all. Only working when connected with AC adapter. The yellow led lights, indicating the battery is being charged. But when unplugged from adapter, the PC is switching off instantly.
    It CANNOT be the battery, as all the batteries worked on a friend's NC8430 PC.
    It should be some kind of hardware fail?
    I have tried to flash the BIOS, to clean the battery contacts, to remove the battery drivers in the control panel... nothing worked.
    The HP battery check gives "No battery"
    Please, help

    "No battery" sounds more like a hardware issue (battery connector), i would suggest you to contact hp tech support (http://www8.hp.com/us/en/contact-hp/phone-assist.h​tml) on the same.

  • How DB adapter works when polling strategy is "remove row selected"?

    How DB adapter works when polling strategy is "delete the rows that were read"?
    I want to know how database adapter works when polling startegy is "remove row".This polling strategy helps for polling the changes to table and remove records after new records are inserted or changes are done to table.Here,i want to understand how DB adapter identifies which record to be deleted.
    For example: there is a table with 100 recorrds.How DB adapter works when polling strategy is "delete the rows that were read"?
    I want to know how database adapter works when polling startegy is "delete the rows that were read".This polling strategy helps for polling the changes to table and remove records after new records are inserted or changes are done to table.Here,i want to understand how DB adapter identifies which record to be deleted.
    For example:
    There is a table EMP with 100 recorrds.Now, i deploy a BPEl process with db adapter polling on table EMP for changes.So that ,if any change happen to records in table that records will be picked up.I use a polling startegy "delete the rows that were read" .
    Now i insert 9 new records and update one existing records.These 10 records should be picked up and then deleted by Db adapter.In this 109 records how DB adapter identifies these 10 records when it polls.How it differentiatess old records with new records when there is no flag field or no sequence id used to identify the new or modified records.
    Please let me know.
    Why i want to know this?
    Some times customer may not allow BPEL process to do any modifications to source table or source database.In this case the options provided by database adapter wizard are not useful.
    If there is any mechanism to identify new or modified records without having a FLAG field or sequence table,then it is possible to have an option like only read the changes from table rather than deleting the records after reading.Which helps in meeting above requirement.
    Please let me know if there is any way to do this.
    thanks
    Arureddy

    Once the record has been read it is deleted. Therefore, you can update rows in this table as many times you like before it is read. Once it is read there will be nothing to update as it will be deleted.
    If you don't want to use a sequence table, you can use a sequence file. You can only use this functionality if the key you are using increments sequentially. e.g. 1,2,3,4. If your key is random, e.g. 2,1,3,5,7,4 then your options are delete or use a processing flag.
    The other option is to create a trigger that inserts a key into a polling table when insert or updates occur. You can then use the delete, which is the most desirable as it uses database locking.
    cheers
    James

  • File Adapter Issue: Not functioning when used with BIC user modules

    Hi! ALL
    We have been experiencing issue with file adapter, when we SeeBurger BIC user modules in sender file - FTP communication channel.
    The regular FTP functionality is working fine if do not have BIC user modules defined under the module tab.However, when put in BIC user module parameters it is not picking up the file.
    Also, we do not see any error logs; even the communication channel monitoring does not show any error log....only show the polling interval success, without the file being picked up.
    This issue started appearing once we deployed our new sda file....as we changed our BIC mapping.
    We can try doing back to our previous sda file....to see it fixes the problem.
    But, before doing that ....we would like to know where the cause of this issue....Can you point us to any error logs we can find on the PI server.
    Your help is greatly appreciated!!
    Thank you,
    Patrick.

    If you configured your logging correctly you should find in the log folders
    ./applications/com.seeburger.jucon/
    ./applications/com.seeburger.bicxiadapter/
    Try to scan those for recent errors - if the no log files can be found you should check the defaultTrace.

  • BPEL: invalid namespace error with DB adapter polling and java embedding

    Hello
    I'm using bpel 10.1.3.1.0, and I'm experiencing the following problem: I'm am not able to use the SetTitle() function in a process which polls for records using the db adapter.
    Steps to reproduce the problem:
    - I create a very simple bpel process which poll for records in a table.
    - I deploy it, write manually a record in the polled table and the process start.
    - I can see the record picked up through the visual flow in the console
    - everything looks ok and the process ends correctly
    - now I add a java embedding activities just after the receive
    - I set the instance title like this: setTitle("Go");
    - redeploy, write a record in the polled table and the process start.
    - but the process ends in error with the following message "XMLDOMException has been thrown. invalid namespace for prefix xmlns"
    And there is no way to make it work. Consider:
    If I put the same java embedding activity in another process, for example a simple asynchronous process which just copy the input to the output, and I run from the console, the instance title is set as I want ("Go")
    If I remove the three lines from the polling process
    <bpelx:exec name="Java_Embedding_1" language="java" version="1.3">
    <![CDATA[setTitle("Go");]]>
    </bpelx:exec>
    then the process is executed correctly again. I add them again and then namespace error.
    Whatever statement I put in the java embedding activity (for example a string concatenation or even just a comment I have the same result: invalid namespace for prefix xmlns.
    Does anybody has a suggestion to evercome the problem? I need to set the title because its a mess to find out which instance processed a specific record.
    Thanks by
    Paolo

    I made a lot of further tests, and I can say the problem is related only to the database adapter polling mechanism.
    If I create an asynchronous process, with any kind of database activity (for example select) I can set the title normally.
    If I create a process which start with database table polling, then I cannot use the java embedding.
    try this:
    - create BPEL empty project
    - drop a database adapter service and follow the wizard:
    - select a connection (I tried both oracle or sqlserver connection)
    - select "poll for new or changed record"
    - select any table empty or with few record inside (1 or 2)
    - press next 4 times
    - chose delete record after read (press next)
    - chose order by "no ordering" in polling options (press next 2 times)
    - now drop a receive activity on the process, and connect with the polling partner link
    - drop a java embedding and write any valid java statement
    - deploy; if the table is empty, write a recod in the table
    - the process is instantiated, but the it fails in the --> receive <-- activity with "invalid namespace" error

  • HT5622 I don't get why my Apple ID keeps saying this device is already associated with an Apple ID and something about 90 days but also it doesn't let me download any of my pre orders when available it has happened to me twice and my past purchases help m

    I don't get why my Apple ID keeps saying this device is already associated with an Apple ID and something about 90 days but also it doesn't let me download any of my pre orders when available it has happened to me twice and my past purchases can someone contact me and give me some help sorting this out
    Much appreciated
    <Email Edited by Host>

    Hi there
    I'm getting a similar problem with my Macbook Pro. itunes match was working fine until two days ago when i created another 'user id' for the laptop and then an itunes account for that user under their profile. Now i cant turn on itunes match on my itunes under my user account. Contacted Apple today who said to use the Express Lane and email the problem and they might be able to make an 'exception' on the account. Otherwise I'll have to wait 88 days to access a lot of my music on the macbook pro. itunes match is still working on the iphone 4S and ipad2.
    Can anyone help? The only thought was too re-stream the laptop. Ive already tried deauthorising the other user but it made no difference.
    Thanks
    Jules

  • Polling with RFC Sender Adapter

    Hi,
    i am facing a general problem with the rfc sender adapter.
    I have to design a scenario where periodically pi has to call a rfc fuba/bapi in R3 and insert the response into a database or create a file.
    I looked for some possibilities to impelement this scenario and desided to use ABAP Proxies to transfer the data from R3 to pi.
    The problem is that the wish of the department for R3 is not to plan a job to send the files. They want that pi itself call periodically the fuba in R3. I found out that the rfc sender adapter is not able to poll like jdbc oder file adapter.
    I thought i could write a litte abap program in pi to be planned in a job or to create a dummy file and poll with the file adapter. But i mean that these solutions are not good. They feel like workarounds and not like a real good solution.
    Beside this there is also the problem that we could use the inubit integration system. inubit is able to poll periodically the rfc adapter and is it hard to argument against this.
    Are there any good solutions known for the problem?
    Does anyone know what the official SAP meaning is for a process like the described above?
    many thanks
    Michael Eckstein
    Edited by: Michael Eckstein on Dec 16, 2011 12:55 PM

    hi,
    1st: your R3 department is stupid (!).
    As your flow is ECC -> PI -> Database. you could easily create a litle extraction program with a selection screen (and a variant which could be easily updated !!) (1) to send data to PI (by using a proxy or an idoc), with a log (at end of your program) and to create easily (!!) a sap job (ecc) based  on a country calendar (2).
    2nd: If you really need to have "PI -> ECC (proxy)-> PI -> JDBC", you have to use the standard PI scheduler tool, called "Availibility time planning" (ATP). see this option in CC monitoring (RWB). you could trigger your sender CC (proxy)
    And if you want, another possibility could be to trigger your sender CC by an external tools (to buy), or by creating an abap program....
    (1) how you will pass the value to extract data with your solution (my 2nd point).
    (2) in ATP of PI, the scheduling will be NOT based on a country calendar (holiday, religious/bank holiday), but just daily, weekly, inside a range, etc...
    Mickael
    Edited by: Mickael Huchet on Dec 16, 2011 12:53 PM

  • Profit center substitution with internal order when generating GL doc from

    Profit center substitution with internal order when generating GL doc from MM
    Dear expert,
    Please advise how to substitute successfully the profit center by which user-exit via FI substitution function.
    Substitutions have been set for profit centers in FI via t-code OBBH, but  the profit center will always be determined from the internal order when posting from MM subcon goods receipt
    Thanks
    James
    Edited by: Yun-Chung Yung on Jun 3, 2010 10:46 PM

    Hi,
    SAP give note 539421 - Dummy profit center with cost center
    account assignment. Looks applicable for your case.
    Solution:
    With the attached modification, you can restore the function from Release
    3.1: The directly assigned profit center remains and is not overwritten
    with the dummy profit center of the cost center.
    The problem is not caused by a program error in this case. The profit
    center is always derived from the existing CO account assignment even if
    this is the dummy profit center (see also Note 62417).
    This note applicable from release 40 until 605
    I hope this can help you. FYI, in my case, i do not create dummy profit centre, then profit centre working as sap priority.
    Regards,
    Dewi

  • Old Batch number is picking when GR with Purchase Order

    Hi All
    When I am doing the Goods Receipt with Puchase Order for the batch managed material Old Batch number is picking automatically,
    My system configuration for the batch number assignment is automatic.Can you help me why this is happening and what needs to be done to avoid existing batch pickup when Gr with PO
    Thanks in advance
    Best Regards
    Katta

    ask the user why he enters the * in the batch field. the star carries out batch determination, which makes sense for goods issues.
    Maybe you user just got told to do this without beeing told when he shall do this.
    if you dont want the values entered by a user, then you have to code this in a user exit.
    For me it is more an education problem than a SAP problem.
    Users should understand what they are doing, restriction is the very last step for me in SAP

Maybe you are looking for