Clarity

Expand all | Collapse all

How to make process wait? "days elapsed" functionality

  • 1.  How to make process wait? "days elapsed" functionality

    Posted Jul 04, 2017 10:15 PM

    Hi,

     

    Can you help me understand how "Days elapsed since process began" or "Days elapsed since step began" functionality works in processes pre conditions and post conditions and if I can use it to wait for hours and not for days by giving decimal values in it?

     

    I want to make my process wait at a certain step for an hour. I am also bypassing the wait by sending an action item to admins, if actioned approve, the process continues to next step/ bypasses the wait (that part works). In the waiting part however - the process waits endlessly.

     

    I have made dummy processes and tested it multiple times by using  "Days elapsed" condition as a pre-condition and also as a post condition; given for both - process start and step start but I cant get it to work. The process just does not proceed to the next step even after the time I have specified had passed (1 hr/ 1/2 hr/ 15 min).

     

    used as Pre-condition-

    ( Process.six Days elapsed since process began > 0.01 )

    and I used it like

    ( Process.six Days elapsed since process began == 0.01 )

     

    used as post condition-

    ( ( ( Action Item.bypass.bypass Number of assignees with Status Approve = 1 ) or ( Step.wait_1_hr Days elapsed since step began = 0.01 ) ) and ( Timesheet.thisTimesheet Total = 0 ) )

    ( ( ( Action Item.bypass.bypass Number of assignees with Status Approve = 1 ) or ( Step.wait_1_hr Days elapsed since step began = 0.01 ) ) and ( Timesheet.thisTimesheet Total > 0 ) )

     

    Is it because I gave decimal values for wait (I gave 0.042 for 1 hr as it expects days. I also tested for 0.021-1/2 hr and 0.01 - 15 min)? Thinking it expects only days value i.e non-decimal values I made another process and gave wait value to 1 day to test (that will finish today night).

     

    I dont want to use "sleep" tag as this process will be used quite frequently and will have quite a lot of instances at any given time.

     

     

     

     

    Thanks,

    Ashmi



  • 2.  Re: How to make process wait? "days elapsed" functionality
    Best Answer

    Posted Jul 04, 2017 11:59 PM

    Hello Ashmi,


    A similar query came through, so I'm just going to cut and paste the whole answer as I think it is a good match.

    (Thanks Jeet for your original work.)

     

    -------------

    These KB articles show the current application design behaviour.

     

    a) How to define a Process Step Elapsed in minutes <which validates the approach is correct specifying value 0.02 for 30 minutes>
    https://www.ca.com/us/services-support/ca-support/ca-support-online/knowledge-base-articles.TEC484191.html

     

    b) Process does not advance if (Days elapsed since step began = 1) is used as the step condition
    https://www.ca.com/us/services-support/ca-support/ca-support-online/knowledge-base-articles.tec484710.html

     

    • Saying that when we specify "Days elapsed since step began >= 0.02" as the step condition;
      The process engine checks for conditions at interval times so it will hardly ever kick start a process precisely after 30 minutes is elapsed based on your requirement.
    • Internally BG server keeps on checking for any scheduled jobs/reports/processes that are in queue and it's not possible for it to start any process at that particular time stamp. It might be on hold by some other process or waiting for some resources.. etc and hence its not possible to start at that specified time stamp. Which is the reason we specify the condition with ">=" so when the condition is evaluated it will ensure that the 30 minutes time-frame has passed and the step can be started.

    -------------

     

    In answer to your questions:

    • Yes, it is possible to use a decimal fraction of a day.
    • Note that it is expected that it may not run at exactly that time.
    • If it is not firing, try running through the exact scenario mentioned in the Knowledge Document.

     

    I've just noticed that you're using "=" instead of ">=" in your condition:

    • Days elapsed since step began = 0.01

     

     

    If anyone else has familiarity with these functions, please advise.

     

    Thanks, Kyle_R.



  • 3.  Re: How to make process wait? "days elapsed" functionality

    Posted Jul 05, 2017 02:54 AM

    Its working!! thanks