Wait and loop cycles in Workflow

We have some order management workflows that have built in wait and loop cycles where the wait time is extremely low. 2 minutes. We have noticed that this (possibly) is causing WF BG process to run extremely long, looping through the same items multiple times in a request. We think that we need to extend those wait times and have the following questions.
-What are the downsides of using small wait times in WF.
-What are some recommendations on how small the wait times can be in "polling" logic using workflows.
Thanks.

Small wait times are greedy and can kill your performance. I am not sure why you need to check whether the hold on the order is released every 2 mins when the WBG itself runs for more than that amount time (as an example). In fact you run the Validate workflow program (by pressing in the Transaction Type setup in OM, it will tell you the same thing).
An hour is good enough. You can run one instance of WBG on emergency basis (in the month end or as needed).
Also you can schedule multiple WBG runs with different parameter combinations.
Say one only checks the deferred workflows and the other one checks only timedout ones and they run independent and you make the program incompatible to itself so that they will not clash.
Also a lot depends on you volume of orders that are being processed by your WBG.
Also it increases your database tables volume as the history tables keep getting populated for every check.
Thanks
Nagamohan

Similar Messages

  • Hi I am having problems downloading and updating apps on my iPad and iPhone. The message cycles between waiting and loading then I get an error message saying unable to download app. Eventually,after many attempts it works.

    Hi Guys - for a few days I have been having problems downloading and updating apps on my iPad and iPhone. The message cycles between waiting and downloading then eventually says unable to download app. Sometimes after many attempts it wil eventually work. I tested it on an old iPhone 3G and got the same problem so it is not an iOS 5 issue. My WI-FI connection is working fine. I was wondering if this is an App Store problem? Anyone else in the UK having this problem?

    Hi John
    iTunes Support wasn't of any use to me.
    I have also been having another problem - with BBC iPlayer and other video streaming not working due to insufficient bandwidth, despite my overall download speed being consistently around 50Gb.  This is also affecting AppleTV downloads
    I am using Virgin Media as my ISP, and was wondering whether you do as well.  This might be the common thread.
    -Bernard

  • Writing LabVIEW measurements of two loops (Charge cycle and discharge cycle) in one file

    Hey,
    I was wondering if it is possible to write Labview measurements from two loops (Stacked Sequence Structure) into one file. Currently, it is writing the charging data in one file and discharging data in one file. I have to combine the data everytime to graph the charge and discharge cycles and sometimes there's about 50 cycles and copying and pasting does take up lot of time. 
     I'll try to upload my vi in a bit
    Solved!
    Go to Solution.

    Hey Mike,
    I'm very new to Labview, could you please show an example.
    btw, I attached my vi and I didn't build it
    Message Edited by Support on 07-15-2009 11:27 AM

  • Wait for an agent with best skill and loop after that.

    I want to solve the following situation:
    I have three skills (A, B, C) with different skill levels for each agent. C is the "everything else topic" . The caller selects the toppic which is equivalent to the skills. Of course I want the call to be forwarded to the best skilled agent.
    Let's assume the calles selects topic A and all Agents with Skilllevel > 5 for  A are currently talking. I want to hold the caller for 30 seconds to wait for one of these Agents. After 30 seconds I would like to forward the call to the agent with the highest skill level A.
    And of course I want to avoid the caller to wait the 30 seconds if no Agent with skilllevel > 5 is on duty.
    Currently I have one CSQ for each topic and I expect a skillevel > 5 for the agents serving this CSQ.
    At first I put the call in the CSQ for A and play a prompt with 30 seconds MOH, if no agent becomes available I put the call in the CSQ for C and loop the caller there. But now the best agent for C get's the call.
    I appreciate any hints on that.
    Christian

    Don't queue in C unless there are at minimum X ready agents.  You can define X as 1 to start, then play with the number to see how it affects wait times and dequeues.
    select resource (csq_a)     connected          end     queued          label loop          ready_in_c = get reporting stats(csq_c, ready resources)          if (ready_in_c >= 1)               true                    /* at least one person idle and ready in C                    select resource(csq_c)                         connected                              end                         queued                              /* oops! we just missed them. */                              /* if ready_in_c was > 1, this dequeue step will not execute */                              /* instead, the script jumps to the select resource step for csq_c */                              /* and tries the next agent automatically.  only when there are no */                              /* idle and ready agents do we dequeue the caller, so that an agent */                              /* servicing csq_a can take the call */                              dequeue(csq_c)               false                    /* no one available in C */               play prompt(you are important to us)               call hold               delay 30               call unhold               goto loop

  • My macbook pro shuts down and doesnt let me turn it on after a few days i try to turn it on and it works but then after a few hours or so of using it it turns off again and the cycle of me waiting days to turn it back on happens again whats the prob?

    my macbook pro shuts down and doesnt let me turn it on after a few days i try to turn it on and it works but then after a few hours or so of using it it turns off again and the cycle of me waiting days to turn it back on happens again whats the prob?

    If you haven't already done so, try this simple step first.

  • Loop condition in Workflow

    Hi experts,
    Can you set the looping frequency in Workflow, i.e. only loop after at a certain time or after some generated number or using a date?

    Then you have to put this method inside a loop unless all the documents are there. This method will be executed depends upon you every 2 hours or 1 hour depending on the statistics. Or you can try to check some user Exit in the document transaction that will check whether all the documents are there and if it is there it should trigger a custom event and that event will be kept in the wait for event step.
    It completey depends upon the business and the statistics and you what to do.
    The second approach is the best but if you dont have option you should go for the first one.
    Thanks
    Arghadip

  • HP LaserJet Pro 200 color MFP M276 - new - Device error and Cleaning cycle issues

    HP LaserJet Pro 200 color MFP M276 - this is a new printer a friend purchased at Staples. It connects WiFi okay and prints when prompted to but it then does a "Cleaning" cycle after every print job. It also displays "Device Error" at the same time. It has been powercycled as instructed and the error continues to reappear and the "Cleaning" cycle continues as well after each and every print job. My friend paid Staples to set up this printer to a new Acer Laptop and D-Link router he also purchased before he brought them home. He was told everything works fine .. they lied .. Laptop and router have no issues .. just the printer. The Laptop sees the printer okay and software is installed without issue. Any ideas why the "Device Error" and "Cleaning" cycle after every print job is happening? He is on the verge of taking the whole outfit back as Staples has not assisted him and instead directed him to download the manuals from HP. Any suggestions are appreciated

    Have you tried a hard reset on it? I know you said you power cycled it, but a hard reset is sometimes different than what some people consider a power cycle.
    Follow these steps to perform a hard reset on the printer.
    1. Press the Power button to turn on the product.
    2. With the product turned on, disconnect the power cord from the rear of the product.
    3. Unplug the power cord from the wall outlet.
    4. Wait at least 15 seconds.
    5. Plug the power cord back into the wall outlet.
    6. Reconnect the power cord to the rear of the product.
    7. If the product does not turn on by itself, press the power button to turn it on.
    Try that out and let me know if it helps.
    Best of luck,
    Kyle
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

  • Wait() and notifyall() problem in servlet.

    Can anyone help me with this.....
    I am creating an application which has one gateway inside which
    handles for logger, dbmodule etc are made and passed to biz logic.
    This biz logic using logger obj made in gateway, does the logging.
    Now i hv to do serial implementation of logging i.e I have
    a static member which is of type Vector, which will hold
    a list of messages and associated parameters. The write() method will
    create a formatted message with all values inserted, all prefixes and
    suffixes added, etc. Then it will append the message to the Vector of
    messages. And there will be a separate thread, which will be started
    the
    first time the first Logger instance is created. This thread will keep
    picking up messages from this Vector in FIFO order and writing them
    out.Mind you, I don't mean i need to use a single shared Logger
    instance.
    Separate Logger instances must be used to hold separate values for
    sessionID, username, etc. Only the internal logging I/O stream handle
    should be shared.
    For this what i hv created logger class as follows:
    logger {
    SyslogAppender SA;
    logger() {
    new SA;
    ThreadGroup TG = new ThreadGroup("string");
    Logging target = new Logging();
    Thread DT = new Thread(TG, target, "daemon");
    DT.setDaemon(true);
    DT.start();
    class write {
    write() {
    //initialisation;
    void writetovector() {
    addtovector
    notifyall;
    class logging implements runnable {
    public void run() {
    while(vector is not empty){
    log
    synchronised(this){
    wait();
    Now in the servlet, in init(), logger is called with this constructor
    and therefore there is only one instance of syslog appender to log in
    syslog.
    In service i just call the function writetovector through a method in
    logger.
    However when i run the implemented version of this, logging does not
    take place.
    I feel my implementation of wait and notifyall is not correct. Or is
    there any other problem?
    thanx in advance

    There are many problems with your code. It looks like you retyped it, and it now contains many syntax errors. Two problems I can see, though, are that you do not call notifyAll from synchronized code, and your call to wait is not in a loop.

  • Wait for event by using workflow

    Hi Experts,
    Can someone explain with example the purpose or functionality of 'Wait for event by using workflow' of Wait step-type.
    Regards
    Balu

    I suggest first you go throughly through the SAP help
    [Wait|http://help.sap.com/saphelp_nw70/helpdata/en/8d/25f07b454311d189430000e829fbbd/content.htm]
    [Event Creator|http://help.sap.com/saphelp_nw70/helpdata/en/c5/e4b9e6453d11d189430000e829fbbd/content.htm]
    and then reffer to the wiki that is given in the above post

  • WS14000044: avoid loop in Completion workflow usage if all lines not compl

    Dear all,
    I have a question around the detailed usage of Workflow WS14000044: Completion workflow.
    Here is my case:
    A requisitioner creates a SC with complete items from catalog and also incomplete one's in free text (because not in his catalogs)
    The approval will be a line item cost center approval (n-level line item implemented via BADI).
    However prior to this cost center approvals, a purchaser needs to be involved for the incomplete lines being:
    - free text
    - no price
    the reason is that the purchaser has more extended catalogs and will replace some free texts by catalog items not accessible by the requisitioner
    or will give a price estimation to be able to have a more accurate cost center approval (which is multilevel and based on the value of the item line).
    Then my idea was to use the completion workflow for it.
    But my question is as when going to the purchaser this one is not replacing necessarily all the free-texts, then the user receive the changes and validate them and then the standard start conditions of this workflow that include free text evaluation will retrigger this workflow again and again and again.
    1)Is this correct?
    2) If not why?
    3) And what must be the starting condition of the completion workflow and n-level approval workflow to avoid the loop?
    Thanks in advance
    RD

    Thanks for the guidance, but I have additional questions:
    0) Based on your answer I suppose you did not implemented it anywhere (in standard)like this? Correct?
    1)For the incomplete item flag, you said "This flag is false as soon as you get out of the completion WF." is that always the case or is it only when the Purchaser as set a price?
    2) In summary free text item condition for the Completion Workflow is only usefull if you are sure to convert all lines to Catalog items. Correct?
    3) Coming to you proposition you loose then the possibility to approve your changes by the user like in completion workflow? Or how do you set-up the n-level approval workflow to have the requisitioner himself involved?
    4) Can somebody help to find the FM to find the purchaser of the corresponding PGr?
    5) How can I handle in the n-step approval workflow step if I have a purchasing Group with more than 1 purchaser?
    Thanks
    RD

  • How to fix wait and notify

    The program tries to find the first socket connection. Theirs a wait and the notify call in the inner class seams to have to effect. Attach is the code to try out
    import java.io.*;
    import java.util.*;
    import java.net.*;
    import java.nio.channels.*;
    * SocketSearch class to scan for an open socket from an array of sockets passed. <br>
    * Inner class DetectSocketConnection tries to open the socket and assign hostname
    * a value if successful. <br>
    * The SocketSearch thread class is waiting to find the hostname or active DetectSocketConnection
    * threads to be zero - i.e No hosts found
    public class SocketSearch extends Thread {
       private Object syncObject = new Object();
       private String hostname = null;
       private ThreadGroup threadGroup = new ThreadGroup("SOCKETS_CONNECT");
       private ArrayList sockets = null;
        * Inner class DetectSocketConnection to find an open socket. <br>
        * It will assign the hostname a value if successful
       private class DetectSocketConnection extends Thread {
          private SocketChannel sc = null;
          private String host = null;
          private int port = -1;
          public DetectSocketConnection(String host, int port) {
             super(threadGroup, host);
             this.host = host;
             this.port = port;
             System.out.println("DetectSocketConnection::syncObject = " + syncObject);     
          public void run() {
             System.out.println("Scanning " + host + " at port number " + port);
             synchronized(syncObject) {
                try {         
                   InetSocketAddress isa = new InetSocketAddress(InetAddress.getByName(host), port);
                       // Connect
                    sc = SocketChannel.open();
                sc.connect(isa);
                   System.out.println("Found hostname: " + host + "!!!!!!!!!!!!!!!!!!!");
                   hostname = host;
                catch (IOException e) {
                   System.err.println("DetectSocketConnection: " + e.toString());
                finally {
                // Make sure we close the channel (and hence the socket)
                   close();
                   System.out.println("DetectSocketSonnectio: notify()...");
                   syncObject.notify();
          public void close() {
             try {
                if (sc != null) sc.close();
             catch (IOException e) {
       public SocketSearch() {
          sockets = new ArrayList();
        * Add socket to the sockets ArrayList to prepare to start the Socket Search
        * @param host Socket hostname
        * @param port Socket port number
       public void addSocket(String host, int port) {
          DetectSocketConnection detectSocket = new DetectSocketConnection(host, port);
          sockets.add(detectSocket);
        * SocketSearch start method to fire up the sockets threads to search for
       public void start() {
          super.start();
          if (sockets != null) {
             DetectSocketConnection[] arrSockets = (DetectSocketConnection[]) sockets.toArray(new DetectSocketConnection[0]);
             for (int i = 0 ; i < arrSockets.length ; i++) {
                arrSockets.start();
    * Main code to do the socket search
    public void run() {
    try {
    boolean loop = (sockets.size() > 0);
    while (loop) {
    synchronized(syncObject) { 
    System.out.println("SocketSearch.wait() => syncObject = " + syncObject);
    syncObject.wait();
    System.out.println("SocketSearch.wait() => syncObject = " + syncObject + ", finished...");
    if (hostname != null) {     
    // use the hostname
    // you could interrupt the threads now - its your choice
    loop = false;
    else {
    System.out.println("Invalid hostname...");
    ThreadGroup currentGroup = Thread.currentThread().getThreadGroup();
    int numThreads = currentGroup.activeCount();
    Thread[] listOfThreads = new Thread[numThreads];
    currentGroup.enumerate(listOfThreads);
    int activeThreads = 0;
    for (int i = 0 ; i < numThreads ; i++) {
    if (listOfThreads[i] instanceof DetectSocketConnection) {
    activeThreads++;
    System.out.println("activeThreads: " + activeThreads);
    if (activeThreads == 0) {     
    // host name is NULL and active threads are finished
    throw new UnknownHostException("Host not found.");
    if (hostname != null) {
    System.out.println("Found hostname: " + hostname);
    // Do something here, use callback to maybe dispose ProgressDialog etc...
    catch (UnknownHostException e) {
    // Do something here, use callback to maybe dispose ProgressDialog etc...
    System.err.println(e.toString());
    catch (InterruptedException e) {
    // Do something here, use callback to maybe dispose ProgressDialog etc...
    System.err.println(e.toString());
    * Test to find a socket from an array of test socket hosts
    public static void main(String args[]) {
    String[] yahooPOP3PossibleSettings = new String[] {
    "yahoo.com",
    "mail.yahoo.com",
    "pop.yahoo.com",
    "pop.mail.yahoo.com",
    "pop3.yahoo.com"
    int PORT_NUMBER = 110;
    SocketSearch socketSearch = new SocketSearch();
    for (int i = 0 ; i < yahooPOP3PossibleSettings.length ; i++) {
    socketSearch.addSocket(yahooPOP3PossibleSettings[i], PORT_NUMBER);
    socketSearch.start();

    Forget it. The Inner class was doing a wait and so was the main thread.
    Not meant to put a wait in the main thread...

  • Dreamweaver CS6-  jquery and jquery cycle to have 5 images slide (as a fade) in a banner code failure- help?

    Dreamweaver CS6- I am trying to use jquery and jquery cycle to have 5 images slide (as a fade) in a banner. I thought I got the code right but it stacked the images. I suspect I have the incorrect code for the position or I haven't properly added cycle.
    my head code:
    <title>slider</title>
    <script type="text/javascript" src="JS/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" src="JS/jquery.cycle2.min.js"></script>
    <script type="text/javascript">
    $('#slider').cycle({
    </script>
    <style type="text/CSS">
    #slider {margin:auto;}
    </style>
    My div code:
    <div id="slider">
      <p> 
        <img src="Leather web page/DSC_0531_4925.JPG"/>
        <img src="Leather web page/DSC_0035_edited-1.JPG"/>
        <img src="Leather web page/DSC_1593_edited-1.jpg"/>
        <img src="Leather web page/DSC_1595_edited-1.jpg"/>
        <img src="Leather web page/DSC_1821.jpg"/>
        </div>
    Any help would be greatly appreciated.

    1. You can use a constructor to change the defaults. The default values can be seen in jquery.cycle2.js starting at line 659 as per the following. As you can see at the bottom, the code automatically runs the slideshow(s)
    // @see: http://jquery.malsup.com/cycle2/api
    $.fn.cycle.defaults = {
        allowWrap:        true,
        autoSelector:     '.cycle-slideshow[data-cycle-auto-init!=false]',
        delay:            0,
        easing:           null,
        fx:              'fade',
        hideNonActive:    true,
        loop:             0,
        manualFx:         undefined,
        manualSpeed:      undefined,
        manualTrump:      true,
        maxZ:             100,
        pauseOnHover:     false,
        reverse:          false,
        slideActiveClass: 'cycle-slide-active',
        slideClass:       'cycle-slide',
        slideCss:         { position: 'absolute', top: 0, left: 0 },
        slides:          '> img',
        speed:            500,
        startingSlide:    0,
        sync:             true,
        timeout:          4000,
        updateView:       0
    // automatically find and run slideshows
    $(document).ready(function() {
        $( $.fn.cycle.defaults.autoSelector ).cycle();
    2. To center the slideshow, merely center the container as in
    div.cycle-slideshow {
        width: 1000px;
        margin: auto;

  • Internet explorer appears to be running a looping cycle

    my question is about internet explorer 11, I had a problem with the Pogo Website, so I emptied my cache. After that my internet
    explorer starts running a loop cycle when I go back to this website.  What would be my options to stop this?  It does not do this
    looping cycle on any other website.  Please help.

    Hi,
    tools>Internet Options>Security tab, Trusted sites, 'Sites' button, remove Pogo from your trusted sites list.
    the next time you visit Pogo you may be asked to allow 'such and such' an ActiveX control to run... answer yes (to force the browser to allow 32 bit controls).
    If you have a blue circle with a line through it (blocked content icon) when you visit Pogo, then your browser is blocking ActiveX, click it to turn off ActiveX filtering on the current site.
    Ensure you Java JRT version is uptodate (Start>Control Panel>Java JRT) and Adobe Flash (Start>Control Panel>Flash 32).
    Questions regarding Internet Explorer 8, 9 and 10 and Internet Explorer 11 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions. If you are a consumer looking for answers or to
    raise a question, it's highly recommended you head on over to http://answers.microsoft.com/en-us
    To avoid confusion include the FULL address of any websites you are having problems with so the support engineers can visit the actual web page to investigate.
    Rob^_^

  • First kick on loop cycle plays louder then the rest, but then loops at correct volume?

    i only have one drum loop playing, no fx, no dbl notes, no off notes triggering.  Its only happens in loop cycle on the first kick (in midi) ?
    is there a way to fix?  the volume spike is very annoying.
    Thanks

    Hi
    Go to Preferences:General:Cycle and set the Cycle Pre-Processing to something other than OFF.
    HTH
    CCT

  • What is the difference between Planning cycle and Delivery cycle?

    Hi gurus ,
    After created the planning calendar for store ,  I have the same option value for planning cycle and delivery cycle (planning calendar) in the MRP area data for site specific material master , so what's the difference between these two field ?
    Thanks in advance ,
    Ryan

    Hi,
    If you have to deal with more complex situations, you can define a delivery cycle in the material master record in addition to the planning cycle. In so doing, you determine the days on whichthe vendor delivers his goods. The delivery cycle is entered in the material master record as a planning calendar in the Planning calendar field.
    You enter a delivery cycle if the delivery date (or the goods receipt date) depends on the day on which you order the goods. For example, you carry out the planning run and place your orders on Mondays and Tuesdays. If you place the order on Monday, the delivery is made on Wednesday, if you wait until Tuesday to place the order, the delivery is not made until Friday
    Where as Planning calander is Three character number (numeric or using letters) that specifically identifies a PPS-planning calendar. The difference between Planning calender and delivery cycle is If you have selected the MRP type "MRP" and have set a period lot-sizing procedure according to planning calendar, you enter here which planning calendar is to be used.
    If you selected the "time-phased planning" MRP type, the planning calendar that you specify here defines the delivery cycle. This specifies the days on which the vendor delivers the material. You can enter the planning cycle in addition to the delivery cycle

Maybe you are looking for

  • How to add the paging at the footer on the report page?

    Hi,   On my crystal report page of vistual studio, there is paging(change page) at the top, if I want to add the paging at the bottom of report, how can I add it?  Could you please tell me?   there is my code:          ConnectionInfo connectionInfo =

  • How to generate a list

    I have two columns in a spread sheet. The A column has names. The B column tracks progress on tests--simple pass or fail.  I use a 1 for pass and leave the cell blank for fail. I can change the method of recording grades if that helps. On a separate

  • Help with uploading Blackberry

    Now if we want to upload to Blackberry's market place they said we need to have a .bar file. so how do we make that in the viewer builder on the desktop (the prerelease version) because it only lets us make .apk files or .zip????

  • How to save a clip with a transparent background?

    How do i save a clip with a transparent background to export to quicktime and then be able to import it back into my timeline and have it be able to overlay ontop of another clip? Transparent clip is for lower third

  • New Trojan Horses

    Last night, I made the mistake of downloading an app called "Wine" and "Winebottler". These are apps that allow Windows programs to be played on Macintosh without installing Windows. I ended up with 13 new OSX Trojan Horses on my Macintosh. These app