Configure workflows in Service Manager
In Service Manager, a workflow is a sequence of activities that automate a business process. Workflows can, for example, update incidents when various changes occur. A workflow can automatically generate incidents when computers fall out of compliance from desired configuration management. You create a workflow that defines when and under what circumstances it will run. For example, a workflow can automatically change the support tier from a setting of 1 to 2 whenever a low-priority incident pertaining to printing problems is changed to a higher priority. Workflow activities function by the application of templates. For this example, an incident template to change the support tier to a setting of 2 must have been created previously.
You can create multiple workflows for each workflow configuration. You can enable or disable the workflow conditions. If a particular rule is disabled, the remaining rules still cause the workflow to run. If you want to completely disable a workflow, you must disable all of the rules that call the workflow.
The success or failure of a workflow is retained by Service Manager, and it's available for you to view. Two views are available. All Results consists of a view of all success and failure instances, and the Errors view displays only those instances when a workflow failed. In the All Results view, you can, for each instance, view the log and view the related object. When you view the log, you can examine the events that occurred when the workflow ran. When you view the related object, you see the form that this workflow acted on. The Errors view is limited to the most recent 250 instances. When you're viewing a failed instance, you've the same options in the Success view to view the log and view the related object. In addition, in the Errors view, you've the option to select Retry or Ignore. Selecting Retry causes the workflow to run again with the same parameters and removes this instance from the view. Selecting Ignore removes the instance from the view.
Configure incident workflows
You can use the following procedure to create and configure a workflow rule that will change the support tier to Tier 2 whenever the Urgency property of an incident that is related to printing problems is changed to High. This procedure assumes that you already created an incident template to change the support tier to Tier 2, and it assumes that you already created the priority calculation table. For more information, see How to Set Incident Priority. To create a new printer-related incident template, see How to Create Incident Templates.
To configure an incident workflow, follow these steps:
- In the Service Manager console, select Administration.
- In the Administration pane, expand Administration, expand Workflows, and select Configuration.
- In the Configuration pane, double-click Incident Event Workflow Configuration.
- In the Configure Incident Event Workflows dialog, select Add.
- In the Add Incident Event Workflow dialog, complete these steps:
- On the Before You Begin page, select Next.
- On the Workflow Information page, in the Name box, enter a name for the workflow. For example, enter Escalates Printer Problems to Support Tier 2 when the Urgency property is changed to High.
- In the Check for events list, select when an object is created or when an object is updated, ensure that the Enabled checkbox is selected, and select Next.
- On the Specify Event Criteria page, select the Changed to tab. In the Available Properties list, select Urgency, and select Add. In the Criteria box, select equals. In the list, select High. Then, select Next.
- On the Select Incident Template page, select Apply the following template, and then select the template you created earlier that will set the support group to Tier 2. For example, select Escalate Printer Problems to Tier 2, and select Next.
- Optionally, in the Select People to Notify page, select the Enable notification checkbox, select the user to notify, and select Next.
- On the Summary page, review your settings, and select Create.
- On the Completion page, select Close.
- In the Configure Incident Event Workflows dialog, select OK.
Validate an incident workflow
- In the Service Manager console, select Work Items.
- In the Work Items pane, expand Work Items, expand Incident Management, and select All Incidents.
- In the All Incidents pane, double-click an incident that isn't currently assigned to the tier 2 support group.
- In the Incident Form page, set the Urgency property to High, and select OK.
- In a few minutes, press F5. Verify that the value in the Support Group box changed to Tier 2.
You can use Windows PowerShell commands to complete these and other related tasks, as follows:
- For information about how to use Windows PowerShell to create a new workflow in Service Manager, see New-SCSMWorkflow.
- For information about how to use Windows PowerShell to retrieve configuration and status information for Service Manager workflows, see Get-SCSMWorkflowStatus.
- For information about how to use Windows PowerShell to update workflow properties, see Update-SCSMWorkflow cmdlet.
- For information about how to use Windows PowerShell to remove a workflow from Service Manager, see Remove-SCSMWorkflow.
View workflow success or failure in Service Manager
Use the following procedure to view the success or failure instances of the workflows.
To view workflow success or failure, follow these steps:
- In the Service Manager console, select Administration.
- In the Administration pane, expand Administration, expand Workflows, and select Status.
- In the Status pane, select the workflow that you want to view. For example, select Escalates Printer Problems to Support Tier 2 when the Urgency property is changed to High.
- In the Status results pane, select Need attention to view workflows that didn't run successfully. Or select All Instances, and then do the following:
- Select View log to view the list of events that occurred when the workflow ran.
- Select View related object to view the form that was used when the workflow ran. The status of each workflow is displayed in the Status column.
You can use a Windows PowerShell command to complete this task. For information about how to use Windows PowerShell to retrieve the status of workflows in Service Manager, see Get-SCSMWorkflowStatus.