What the heck are WFs in Service Manager Authoring Tool?
A workflow (WF) is comprised of a set of one or more activities (also referred to as a WF activity). Each workflow activity performs a function, such as joining a user or a computer to a group in Active Directory or running a script. The Workflow is primarily triggered by one of two mechanisms: schedule or event based. If it is schedule based, the WF can fire periodically based on a predetermined schedule. If it is event based, it is based on some event or state change that took place in SM DB. For example, a new incident was recently created. This may trigger a WF to publish the incident to a SharePoint site.
Why do I need a WF in Service Manager?
The user can create an incident using the Service Manger Admin console. You will be surprised to know that WFs are being used to perform the task behind the scene. The customer is just not aware of it. You can’t escape WFs in Service Manager. WF is your friendJ. So the question is really not why do I need WFs in Service Manager, but why do I need a custom WF. There may be instances like user provisioning where SM does not provide any pre-canned WFs to fill this customer scenario. Well that is when the true power of the Service Manager Authoring Tool comes in handy. You can create customized WFs leveraging some of the out of the box activities we provide in the activity toolbox. You don’t have to be a developer to do this!! It mimics a lot of the Visio like behavior whereby users just drag’n drop activities onto the WF Designer and provide the property values to each of the activities via a property pane.
How do I use a script within a WF?
WFs created using the Service Manager Authoring tool allows for an unparallel level of customization. You can’t find an activity that you can use from the toolbox, but you have an existing script that does the job and you would like to use it in the WF without having to convert it into an activity. You can do that with this tool!! We do the heavy lifting to snap to any existing script and plug it in the current WF. For now we support Windows PowerShell and CMD scripts for SM Beta 2.
To use a Windows PowerShell script within a WF
1. Drag and Drop a PowerShell Script Activity onto the WF Design Surface
2. Click on the ellipsis next to the “Script Body” in the Activity Property Pane (This should launch the PowerShell Activity Dialog – “Configure a Script Activity”)
3. Click on “Import” if you have an existing script or you can type the script in-line
4. If the script takes input parameters, you can specify them in the next tab (Script Properties)
5. Note: You need to specify the fully qualified name of the server you plan to run the script (even if it is localhost).