Ask a questionAsk a question
 

AnswerState Machine Workflow Timing Issue

  • Friday, October 30, 2009 4:54 PMDavid Lozzi Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Howdy,

    We're using a state machine workflow for a list which could have 8 different states. The workflow itself works fine however in each state code we need to put a Delay Timer object first set to 0 seconds because of the workflow requires this type of object to be first. Forgive me as I don't have it up in front of me. The issue is that with some hefty logging enabled we see that the workflow initiates, then sits and waits until the timerjob runs again then runs a state, then sits and waits for the timer to process it. I'm guessing that when the timer object is hit the workflow stops and waits for the workflow timerjob to rerun.

    This is not ideal as it can take 3-5 iterations of the timer job to finish the workflow. We have reduced the workflow timer job to 1 minute, which helps but still isn't making our customer happy. Is there another object I could use? Is there another way around this?

    Thanks,
    David Lozzi
    Delphi Technology Solutions
    Blog  |  LinkedIn | Twitter

Answers

  • Tuesday, November 03, 2009 11:05 AMCharlie Holland Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi David,

    Not sure why you need the delay activity. Can't you put your code in the state initialization?

    You're seeing a delay because even though you changed the frequency of the time job it still only runs every 5 minutes or so (I can't remember the exact minimum). There's a hardcoded minimum interval (preseumably this is to prevent overlapping jobs)




    Ch. - My Blog
    • Marked As Answer byDavid Lozzi Wednesday, November 04, 2009 3:30 PM
    •  

All Replies

  • Tuesday, November 03, 2009 11:05 AMCharlie Holland Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi David,

    Not sure why you need the delay activity. Can't you put your code in the state initialization?

    You're seeing a delay because even though you changed the frequency of the time job it still only runs every 5 minutes or so (I can't remember the exact minimum). There's a hardcoded minimum interval (preseumably this is to prevent overlapping jobs)




    Ch. - My Blog
    • Marked As Answer byDavid Lozzi Wednesday, November 04, 2009 3:30 PM
    •  
  • Wednesday, November 04, 2009 3:30 PMDavid Lozzi Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Eh gad Batman, you're right!!

    I was throwing in an EventDriven Activity but I just threw in an stateInitializationActivity and it works great!!!

    DAH
    David Lozzi
    Delphi Technology Solutions
    Blog  |  LinkedIn | Twitter