How to use Relative Date

Hi,

I am trying to create a BPM where a reminder email will be sent out to user a day before a Task Start date and 1 after Task Due date. But I am not able to use a relative date. I tried to create a calculated Start date 'today' but the option I am still getting when I try to use the field is the calendar option.

Your help is greatly appreciated.

Parents
  • Hi  ,

    Here is how I would set up the process definition for your use case:

    The process definition uses event-based gateways to process depending on one of three different outcomes before determining whether a notification should be sent:

    1. The task status changes to completed before the desired notification date. In this case the process ends since a notification should not need to be sent.
    2. The task due date changes before the desired notification date. In this case, process requeues the event-based gateway so that the wait timer can be updated based on the new date that was set.
    3. The desired notification date is reached.

    For # 3, the wait timer is configured to be relative to the task start / due date as follows:

    When using wait timers, in this fashion, you will want to ensure you account for a couple issues:

    • If it's possible for tasks to be created without start or due dates (in stock Sugar, neither field is required), then you will want to ensure you are triggering this process only when those fields are populated in a new task or added to an existing task. Otherwise, you may get hung processes that add database cruft that will eventually need to be manually cleaned up.
    • If you anticipate a high volume of tasks utilizing this process and the start and/or due dates are far into the future, you should consider alternative approaches because this will add overhead to processing scheduled BPM events. If you think this scenario is applicable, I can share an alternative solution that eliminates that overhead.

    I hope this helps!

    Chris

Reply
  • Hi  ,

    Here is how I would set up the process definition for your use case:

    The process definition uses event-based gateways to process depending on one of three different outcomes before determining whether a notification should be sent:

    1. The task status changes to completed before the desired notification date. In this case the process ends since a notification should not need to be sent.
    2. The task due date changes before the desired notification date. In this case, process requeues the event-based gateway so that the wait timer can be updated based on the new date that was set.
    3. The desired notification date is reached.

    For # 3, the wait timer is configured to be relative to the task start / due date as follows:

    When using wait timers, in this fashion, you will want to ensure you account for a couple issues:

    • If it's possible for tasks to be created without start or due dates (in stock Sugar, neither field is required), then you will want to ensure you are triggering this process only when those fields are populated in a new task or added to an existing task. Otherwise, you may get hung processes that add database cruft that will eventually need to be manually cleaned up.
    • If you anticipate a high volume of tasks utilizing this process and the start and/or due dates are far into the future, you should consider alternative approaches because this will add overhead to processing scheduled BPM events. If you think this scenario is applicable, I can share an alternative solution that eliminates that overhead.

    I hope this helps!

    Chris

Children