Skip to main content
June 27, 2023
Solved

Timer in process model

  • June 27, 2023
  • 4 replies
  • 0 views

Hi Team

Can we trigger a process model from 9 AM and 9 PM. Usually, we add timers to trigger at that particular time.

    Best answer by stefanhelzle0001

    One pattern I see, is to trigger the process EVERY hour and then add a XOR to decide whether it is the right time to start. This is very flexible and can be controlled using constants or database queries.

    You can also add conditions to the timer trigger to control this. You can also use constants, but just changing the constant will not change the behaviour of the condition. This would need a re-deployment of the model.

    4 replies

    mikes0011
    Brainy
    June 27, 2023

    Can you clarify what you mean by "from 9 AM to 9 PM"?  What is your use case?  What actual behavior are you after? 

    When we talk about using timers to trigger new instances of a process, for instance, we're talking about repeatedly launching that process at particular intervals (like hourly, or daily at 8 AM, etc).  This doesn't make very much sense when talking about a 12-hour timespan though, without further detail or info about the behavior you want to create.

    June 27, 2023

    Thanks for the reply.

    We wanted to trigger process every 1 hour from 9 AM EST to 9 PM EST.

    stefanhelzle0001
    Brainy
    June 27, 2023

    One pattern I see, is to trigger the process EVERY hour and then add a XOR to decide whether it is the right time to start. This is very flexible and can be controlled using constants or database queries.

    You can also add conditions to the timer trigger to control this. You can also use constants, but just changing the constant will not change the behaviour of the condition. This would need a re-deployment of the model.