Skip main navigation

Runtime Management

.
17.2
Let’s talk about how administrators can manage and troubleshoot workflows at runtime. When it comes to workflows, the great place to get an overall picture of your organisation health is Power Platform Admin Centre. When you navigate to the Centre, and then System Jobs, you are presented with a dashboard summarising workflow and action executions in your system, including the total number of executions, throughput to identify if you have any bottlenecks, as well as the top-failing jobs. You can philtre the dashboard by instance at a specific time frame. If workflow definition is not available– for example, it has been deleted– the system will display a workflow identifier instead.
58.2
After you get an overall picture across the board, you can then use various tools within an individual instance to monitor and troubleshoot the workflow. The approach differs slightly depending if you’re dealing with the background or real-time workflows and actions. For background workflows, you can access information about the system jobs in several places within the application. First of all, you can navigate to System Jobs under Settings. And this list will include all types of system jobs. You will need to philtre the records to those where the system job type is Workflow. Then you can navigate directly from the workflow process definition, open the background workflow definition, and go to the Process Session tab.
99.7
This will show only the system jobs for this background workflow. And finally, you can navigate directly from the record. You can edit the entity form so that the navigation will include the background processes’ relationship. This will show all the system jobs that have been started in the context of that specific entity record. Note that the background workflows generate system job records to track their status. If a workflow is configured to delete successful jobs, then the log entry will be deleted shortly after the execution completes. And the list will only contain the jobs that are still running, have been postponed, or cancelled, or failed.
143.2
When you open an individual system job record, you can access detailed information about this job, including an associated entity record. And you can actually navigate to it by clicking the link. You can see the retry count if workflow has been retried multiple times. You can see how the workflow has been started– manually, automatically, and by what event in the system. You can also see the date/time information, current job status. And if the job failed, then you can see error details that you can pass to developers if required. When you access job details, you can analyse the job status as well as take some actions. During the execution, the workflow job goes through a number of stages.
187.3
When the workflow starts and is ready to run, you can see it with the Waiting for Resources status. When the job is running, it is usually in progress but can be in transit states like Pausing or Cancelling. Status reason for completed jobs indicates whether the job succeeded, failed, or was cancelled. When the job generates an error, it is placed in Suspended state with the reason Waiting. Depending on the current status of the job, the following actions are available. Cancel will stop the job execution with the Cancelled status reason. Postponed will place the job in Waiting state until the specified date and time. Pause will suspend the job indefinitely, and manual resume will be required.
231.8
And finally, Resume can be applied when the job is in Waiting state. That is, the job was postponed, paused, or one of the steps has failed. Real-time workflows and actions do not use system jobs records because they run immediately. Any errors will be displayed to the user in the application with the heading Business Process Error. And there is no log for successful operations. You can enable error logging per individual workflow basis. To view the logs of errors for a specific process, open the real-time workflow or action definition and go to the Process Session tab. This will show any errors logged for this process.
274.3
If you want to view all the errors for any process, you can use Advanced Find and create a view showing the errors on the process session entity. Let’s talk about troubleshooting. If a workflow or workflows are failing, a good place to start is Power Platform Admin Centre Analytics, just to get an overall picture. Then you can analyse system job logs and individual records to see what’s causing the problem. Look for the jobs failing on a regular basis. If a synchronous system job failed several times consecutively, common data service starts to postpone the execution of the job for longer and longer period of times to allow administrators to investigate and resolve the issue.
317.8
Once the job starts succeeding again, it will resume executing normally. You can open the individual job records to see error details. Often, the errors comes from plugins and custom workflow extensions. You can pass that information and error logs to the developers. You can also detect recursive jobs by looking for multiple consecutive sessions and then a failure with a specific error message referring to infinite loop. And finally, don’t just resume failed workflows without any remedial action. Resuming the job that is in Waiting state because of an error will usually result in the same error unless some steps are taken to resolve the root cause– for example, missing critical information.
363.5
As you can see, common data services for apps provides a very efficient set of tools to help administrators to manage and troubleshoot workflows at runtime.
In the previous step, you looked at workflow templates, which allow you to quickly create a workflow by starting from a pre-built state.
When it comes to workflows, the great place to get an overall picture of your organisation health is Power Platform Admin Center.
You can filter the dashboard by instance at a specific timeframe. Once you get an overall picture across the dashboard, you can then use various tools within an individual instance to monitor and troubleshoot the workflow.
For background workflows, you can access information about the system jobs in several places within the application.
You can navigate to system jobs on the settings and this list will include all types of system jobs. You will need to filter the records to those where the system job type is workflow. Then you can navigate directly from the workflow process definition, open the background workflow definition and go to the process session tab.
Note that the background workflows generates system job records to track their status. If the workflow is configured to delete successful jobs, then the log entry will be deleted shortly after the execution completes and the list will only contain the jobs that are still running, have been postponed or cancelled or failed.
When the job generates an error, it is placed in a suspended state with the reason “waiting”.
Depending on the current status of the job, the following actions are available:
Real-time workflows and actions do not use system job records because they run immediately. Any errors will be displayed to the user in the application with the heading business process error. And there is no log for successful operations

Troubleshooting

If a workflow or workflows are failing, a good place to start is Power Platform Admin Center analytics, just to get an overall picture.
Here you can analyse system job logs and individual records to see what’s causing the problem and look for the jobs failing on a regular basis. If a synchronous system job fails several times consecutively, Common Data Service starts to postpone the execution of the job for longer and a longer period of time to allow administrators to investigate and resolve the issue.
Once the job starts succeeding again, it will resume executing normally.
You can open individual job records to see other details. Often, errors come from plug-ins and custom workflow extensions. You can pass that information and error logs to the developers.
You can also detect recursive jobs by looking for multiple consecutive sessions and then a failer with a specific error message referring to an infinite loop.
Finally, don’t just resume failed workflows without any remedial action. Resume the job that is in a waiting state because an error will usually result in the same error unless some steps are taken to resolve the root cause, for example, missing critical information.
This article is from the free online

Dynamics 365: Working with Power Platform Automation

Created by
FutureLearn - Learning For Life

Our purpose is to transform access to education.

We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.

We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.

Learn more about how FutureLearn is transforming access to education

close