top of page
  • Glen (Xapity)

PowerShell for SCSM: Activity Work Item tags


Using the Xapity PowerShell Activity we are always trying to target particular activities in a workflow. It can be frustrating having two or more Review Activities and wanting to set different reviewers on each. Or multiple Manual Activities and not know what they are going to do. It is difficult to know exactly which activity is being used for which purpose - relying on analysts to put keywords in titles or descriptions wasn't working out for us.

We have found it useful to extend each of the activity classes with an Activity Tag field. The purpose of this field is to tag the activity with information that helps the automation workflows. It is only used by Admins and is set on the templates that analysts use. We have usually just left it on the extensions tab, but it could be exposed on the activity form itself. It is generally a list control to avoid typos when filling it out (even admins have difficulty being consistent).

We create templates for each of the workflows and sometimes for the actual Review or Manual Activity and have these tagged already. So when an analyst configures a workflow, the purpose or function of each activity has already been tagged. And when the PowerShell Activity runs it can easily find the correct Review or Manual Activity and make the appropriate changes/actions required.

We have created workflows that process the information on both the activity and parent, sometimes copying data to the parent (or parent to child activity) or sometimes initiating another process. Combining the PowerShell Activity with activity tags is very powerful and can make your workflows more flexible and dynamic.

Change Request Example

The Change Request has been extended to add two user pickers on the parent level for approvers - the Technical Owner and the Business Owner. For the Change Initiator it is easier to fill the approvers out at the Change level rather than configure them in the two Review Activities in the workflow.

These two users will be required to approve the Change before it can be implemented, and this has been implemented as two separate Review Activities, one for Technical and one for Business.

Extended Change Form:


Activity Work Item Tags to help with PowerShell

Using a Xapity PowerShell Activity, the data from the Approver fields on the Change are then copied to the Review Activities in the workflow. By having a tag on each Review Activity that identifies it as being either Technical or Business the PowerShell Activity can easily copy the correct approver to the appropriate Review Activity. We do not have to worry about the title or and other information the analyst might change when creating the workflow.

Review Activity Tag:


Review Activity Tag

As an extra bonus we can also create targeted email subscriptions for each type of approver, with the appropriate level of technical detail in them. By creating a subscription that has the appropriate ReviewActivityTag we can send emails that use different email templates i.e. one for Managers/Business approvers and another for technical approvers.

 


Xapity PowerShell Activity - Use PowerShell in SCSM worflows

Xapity PowerShell Activity

The Xapity PowerShell Activity is a new Activity for SCSM that enables PowerShell scripts to be run in SCSM workflows. Automate more of your processes directly in SCSM.

Scripts are stored and updated from a central script repository. The scripts execution output can be viewed and if a failure occurs, an Email Notification can be sent.


Xapity - Innovative Software for SCSM - Discover our Products

#PowerShell #PowerShellActivity #Tips #SCSM

142 views0 comments

Recent Posts

See All
bottom of page