Forum Discussion

nealy's avatar
nealy
New Contributor
2 years ago

Business Rule with Time Interval Control

Hi there,

I'm seeking assistance with a specific requirement. I need a business rule to operate as follows: upon initial execution, it should function normally. However, if a user attempts to run it again, there should be a designated wait time before the next execution.

For instance, if I initiate the business rule at 16:00, it should not be possible to trigger it again until 19:00, ensuring a 3-hour interval.

To implement this, I intend to leverage the Task Activity Log Start Time. I'm using OS 6.3

Any guidance on achieving this would be greatly appreciated.

  • DanielWillis's avatar
    DanielWillis
    Valued Contributor

    Hi Nealy

    It sounds like you already know what you need to do to me? All of that sounds reasonable. You could probably improve the solution slightly by checking if the job is available to be run before they even attempt to execute the BR (assuming its from a dashboard) by disabling the execute button or having a message next to it detailing why it can't be run yet. I think this sort of thing improves user experience and avoids frustration (its amazing how annoyed 2 extra clicks can make someone!)

    There are the OneStream application/activity reports that query the TaskActivity table (Framework DB) which should give you all you need there too.

    • Marco's avatar
      Marco
      Contributor II

      Hi Daniel, 

      I'm Working with Neal in this and we know what we want to do, but we don't know how to reach the TaskActivity table in the BR, do you know the code to call it and get the results?

      • DanielWillis's avatar
        DanielWillis
        Valued Contributor

        Check out RPTA_SolutionHelper (extender br) in Application Reports from MarketPlace for an example.