Equivalent of "Schedule" section when using Flow Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2024 10:51 AM
Our team is starting to explore building Flows instead of using Workflow for service request fulfillment. In both the workflow properties (Schedule section) and in the catalog task definition (also Schedule section) you can set the duration and reference a specific schedule. This in turn calculates a due date for the RITM and catalog tasks as the workflow runs. What I'm not seeing is how to do this in Flow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2024 03:43 AM
Hi @Doug Yorke
Please have a look on the below post. In Flow designer, we set it using stages.
Thanks & Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2024 04:27 AM
In ServiceNow Flow Designer, you can set the duration and calculate a due date for a task using the 'Date/Time Operations' action. Here are the steps:
1. Open your Flow in Flow Designer.
2. Add a new action where you want to set the duration and calculate the due date.
3. In the 'Action' field, select 'Date/Time Operations'.
4. In the 'Operation' field, select 'Add Duration'.
5. In the 'Base Date/Time' field, select the date/time field from which you want to calculate the due date.
6. In the 'Duration' field, enter the duration you want to add to the base date/time.
7. In the 'Result' field, select the date/time field where you want to store the calculated due date.
8. Save your changes.
Please note that this will only calculate a due date based on a fixed duration. If you want to reference a specific schedule (e.g., business hours), you will need to use a script action to calculate the due date based on the schedule. Here is a sample script:
javascript
(function execute(inputs, outputs) {
var gr = new GlideRecord('cmn_schedule');
gr.get('name', 'Your Schedule Name');
var duration = GlideDateTime.subtract(inputs.start_date, inputs.end_date);
var dueDate = gr.addSeconds(inputs.start_date, duration);
outputs.due_date = dueDate;
})(inputs, outputs);
In this script, replace 'Your Schedule Name' with the name of your schedule, and replace 'start_date' and 'end_date' with the appropriate date/time fields from your Flow. The script calculates the duration between the start and end dates, adds that duration to the start date according to the schedule, and stores the result in the 'due_date' output variable.
nowKB.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2024 08:49 AM
Does it mean that there is no OOB option to take into account schedule (for example 8hx5d) when there is either delivery time or due date calculated based on duration of defined flow stages? Workflow had this Schedule settings etc. as mentioned by Doug.
ServiceNow didn't applied similar thing when working with Flows?