Schedule Data Entity Overview
  • Updated on 18 Sep 2017
  • 3 minutes to read
  • Print
  • Dark
    Light

Schedule Data Entity Overview

  • Print
  • Dark
    Light

This tutorial demonstrates how to create and use Schedule Data Entity in Decisions . Schedule Data is an Entity in Decisions that stores custom schedule and keeps track of it. Different Schedule Data may be created in the same Folder in Decisions . Then, in Flow Engine we can treat all Schedule Data Entities in one Folder as a single complex schedule. This feature saves time when we build a process that require complex schedule calculations.
Example :
In this example we are going to create Schedule Data Entity that simulates ‘working days schedule’ and we will demonstrate how to use it in Flow .
We begin in the Designer Folder with clicking All > Add > Entity > Schedule Data on Folder Actions Panel.
2018-01-03_145348-1024x289.png

Schedule Data window pops up. First, we provide our Schedule with desirable Name .
2018-01-03_145501.png

Then, we pick Start Date Time . This is when our Schedule starts. Note, because we simulate working days schedule, we set time to 9:00:00.
2018-01-03_145609.png

Next, we define Type Of Schedule . We have two options here: Included and Excluded . Included schedule will run on all defined days/times. Excluded will not run on defined days/times. We pick Included .
2018-01-03_145640.png

Then, we set the Length of a Schedule . This is the length of each instance of a schedule. We set it to 8 hours to simulate working day.
2018-01-03_145924.png

In Schedule Type we can pick suitable schedule template. For this example we pick Daily Schedule .
2018-01-03_150007.png

In theSchedule Data we set Day Info by checking days from Monday through Friday .
2018-01-03_150109.png

Finally, inEnd Type setting we can define when our Schedule stops running.‘No End’ means that our Schedule does not have end, ‘By Date’ option let us define a constant date when schedule ends, ‘By Occurrences’ option will terminate schedule after provided number of runs.
We can click Ok to save our Schedule Data.
2018-01-03_150140.png

Our Schedule Data is created and can be managed in the Folder we created it.
2018-01-03_150208.png

Next, we are going to demonstrate how to use our Schedule Data Entity in a Flow .
In Designer Folder we click Create Flow on the Folder Actions Panel.
2018-01-03_150230.png

Then, we Name the Flow and click Ok to proceed to the Flow Designer.
2018-01-03_150349.png

In order to use our Schedule Data in Flow , we need to use steps from All Steps [Catalog] > Integrations > Internal Services > Scheduling Service category.
We add ReturnNextValidSlotInSchedule step from All Steps [Catalog] > Integrations > Internal Services > Scheduling Service category.
2018-01-03_150546-1024x768.png

To configure Input data to this step we need to get Folder Id of the folder where ourSchedule Data lives.
We can get it in our Designer Folder by clicking All > Manage > Get Designer Folder ID on Folder Actions Panel.
2018-01-03_150648-1024x350.png

Then, we copy Folder ID and click OK to close the dialog window.
2018-01-03_150723.png

Back in the Flow Designer we paste ourFolder ID into thefolder Id Constant Input forReturnNextValidSlotInSchedule step.
2018-01-03_150828-1024x728.png

For the proposed Date input we pick Constant next Saturday because it is not in the Schedule and we need to test if Schedule will respect its dates and output next available date.
2018-01-03_150926.png

Then we connect the outcome from ReturnNextValidSlotInSchedule step to theEnd Step. This completes our Flow . We click Debug Flow on the top panel of the Flow Designer to test our Flow.
2018-01-03_151002.png

Our Flow executes in the debugger with no issues. We click ReturnNextValidSlotInSchedule step on the execution diagram and select View Output Data.
2018-01-03_151043.png

In the Information window we should see that our next available slot according to our schedule will be on next Monday.
2018-01-03_151107.png

Was this article helpful?