Skip to main content
April 5, 2024
Question

Running Process model on Dynamic time

  • April 5, 2024
  • 12 replies
  • 0 views

Hi Team, 

I have a requirement where the email needs to be triggered on specific date and time.

For ex. User is raising a request initially. While raising the request he can set the remainder date. This date I am storing in DB. Email needs to be triggered for the remainder dates. What is the best practice to do this?

Thanks!!

    12 replies

    stefanhelzle0001
    April 5, 2024

    Run a process in a short interval which then checks whether to manage any reminders configured.

    April 5, 2024

    So, the process model should run continiously? Will it cause any memory consumption?

    mikes0011
    Brainy
    April 5, 2024

    No - he means to kick off a fresh instance every so often (once or twice daily perhaps), query the DB to see whether any notifications fall into that time range, and if so, send them.  Then that instance will end.  It won't consume any (or much) extra memory, as it'll be short-lived.

    shubhama926776
    Brainy
    April 5, 2024

    Timer Event:
    Create a process model with a start event set to a timer event.
    Configure the timer to "Delay until the date and time specified by an expression."
    Use an expression that calculates the reminder date based on the date stored in the database. You can use built-in functions like addDays or addHours to manipulate the date.

    mikes0011
    Brainy
    April 5, 2024
    Configure the timer to "Delay until the date and time specified by an expression."
    Use an expression that calculates the reminder date based on the date stored in the database.

    I'm not sure this will work for a Start Process timer.  As far as I know, the starting time is calculated at publish time (or import time) and not re-calculated dynamically again until re-publishing - the assumption being that the start time will be some static value stored in the "Delay until the date and time specified by this expression:" configuration, then a static interval (if any) for the "recurrence" configuration.

    shubhama926776
    Brainy
    April 5, 2024

    You're correct that for Start Process timers, the starting time is typically calculated at publish or import time, based on the static value provided in the configuration. However, if you need dynamic recalculations based on database values, you might need to explore other event types(ex. rule event) after starting a process at some interval.

    April 8, 2024

    One of the Best way would be to Use Parent Process as Scheduler and Capture all the Process of that day and Run an MNI orve then . 

    In Sub Process Also Add an XOR Gateway to Check if the Process had Been Triggered Or Not So in case of Failure Also Non Triggered Instances will Be triggered .

    April 8, 2024

    In this case, the main process model will live for longer run right?

    babyjamus959688
    May 4, 2024

    Hy Sri,

    We have to go with running wrapper process at every 15/30mins or max of 1hr timeframe.

          In that process you can check for the requests which needs to be notified within next 15/30mins or 1hr & In MNI you can call scheduled email node process (call it as start process so that wrapper will get terminated quickly). 

    If you run at 6/12/24 hrs once, then only it will affect memory as it will be active for longer time due to scheduled email nodes. But if we run wrapper at lesser than 1 hr, child instances will be active at max of next wrapper get triggers which will free up the memory frequently.