Scheduled Processes and Logs
Scheduled Processes
Scheduled Processes can be viewed and modified by users with the Sensei IQ Admin User role. The Scheduled Process menu item appears in the Settings area of the Sensei IQ app.
Scheduled Processes are a convenient way to be able to trigger Dynamics Workflows on a recurring basis for records that are returned from a FetchXML query that is defined in the Scheduled Process item details.
The details of a Scheduled Process item defines the following columns:
Column Name | Description |
---|---|
Name | The name of the Scheduled Process |
Related Table | A plain text indication of the Table that the Scheduled Process relates to or primarily deals with. |
Workflow | A lookup to a Dynamics workflow that will be triggered for each record returned from the specified Fetch XML Query. |
Configuration Setting Name | If you wish to turn on/off the functionality of the Scheduled Process from a Configuration Setting, specify the name of your boolean Configuration Setting here. Note, the 'resourceHorizon' setting is treated as a special case - other configuration setting references should just have a single boolean value. |
Job Frequency | Set whether you intend the Scheduled Process to run Hourly, Daily, Weekly or Monthly. |
Last Run Time | The Date/Time when the Scheduled Process last ran successfully. |
Next Run Time | The Date/Time when the Scheduled Process is set to run again. |
Fetch XML Query | A Fetch XML query that will return records from the table that you wish to run the specified Workflow for. If this column is blank, then the Scheduled Process will run only as a maintenance task - cleaning up old Process Logs and ensuring that the other Scheduled Process jobs are running. |
For Scheduled Processes that are shipped by Sensei, where possible these processes will log feedback for each job into the Process Log table. This will include logging information about the process being followed and will include the following columns:
Column Name | Description |
---|---|
Name | The job that the Process Log relates to. |
Scheduled Process | The Scheduled Process that the log was generated from. This column will only be populated for Logs generated from the Scheduled Process itself. |
Workflow Process | The Workflow Process that the log was generated from. This column will only be populated for Logs generated from a Workflow Extension relating to an individual Workflow item (where configured). |
Related Table | The table that the Process Log relates to. |
Related Table Id | The Id of the table record that the Process Log relates to. This will only be populated for Process Logs generated from a Workflow Process. |
Process Status | Displays the outcome of the job - In Progress, Completed or Failed. |
Start | The date/time that the job commenced. |
Finish | The date/time that the job completed. |
Message | The log information for the job. Each log row is prefixed with the time that had elapsed between the job commencing and that log row being generated. Note that these logs are generated via Workflow Extensions which have a hard 120 second runtime limit. |
If a Scheduled Process job is failing before even creating a Process Log record, a System Administrator should investigate the System Job that was generated to run by the creation/update of the Scheduled Process record.
It is not unexpected for there to be times when a Scheduled Process job fails because of a timeout. This can be due to the load on the Power Platform at the time that the job is running (including during Solution deployments). If a job fails due to a timeout error, the Process Log may appear as 'In Progress' for longer than expected - until a subsequent maintenance job comes along and marks it as Failed. If there is a maintenance job running as a Scheduled Process, it should recognise that the job has failed and should then automatically trigger it to run again.
Two Scheduled Process jobs are shipped with Sensei IQ and are enabled by default.
- Capacity Calculation for Bookable Resources
- Maintenance
Note
Job Frequency settings are indicative only. Next Run Time is an approximate and indicates the time that the Job will be triggered into the System Jobs ready for action. The actual run time will vary depending on a number of factors, including the load on your environment at the time.
Note also that over time, the Next Run Time value for your Scheduled Process will adjust based on the actual execution time of your Scheduled Process jobs. For example if a Daily Scheduled Process is scheduled to run at 1pm but for whatever reason the actual run time is 1:13pm, the Next Run Time value will be adjusted to 1:13pm for the next day.
Software Boundaries and Limits
Detail | Limit |
---|---|
Maximum results to be returned from FetchXML query in a Scheduled Process | 500 |
Maximum runtime for a Workflow Extension called from a Dynamics Workflow | 120 seconds (this is a platform limit) |
Maximum number of days Process Logs will be kept | 30 days |