Create an Automation Workflow

This page details the steps to create a new Automation workflow.

Note

If you are just updating an out-of-the-box workflow, then go to Step 2 directly.

Step 1: Create a new Automation Workflow

  1. As an Administrator, click the  Automation icon.
    The Automation page appears.
  2. Click the Workflows tab.
  3. Click New Workflow.
  4. Provide a Name and Description to your workflow and click Save
    The new Automation workflow appears in the Workflows list.
  5. Click the workflow Name to start designing the workflow.

Note

When you click on any workflow, the Automation Workflow Designer opens in a new tab. If that does not happen, please open a Support Ticket or send an email to support@serviceaide.com.

Workflow Name must be unique

Ensure that the Workflow Name is unique, the system does not allow creating a duplicate Workflow Name. If a Workflow is deleted, even then a new Workflow with the same name cannot be created. The name is cached and hence a duplicate is not allowed.

Step 2 : Design the Workflow by adding Operations

  1. On the Workflows tab, click the Name link to open your workflow in the Automation Workflow Designer.
    basic workflow with a Start and Stop point appears on the canvas.
  2. Click Call Service + on the left pane to add an Operation to the canvas.
  3. Double-click the Call Service entity just added, to open the Call Service Activity Configuration window and configure it.



  4. Configure the Activity Details:
    1. Specify the name of the Operation under Activity Name field.
    2. The Activity Id is set automatically.
    3. Add a description under Activity Purpose field.
    4. Select an OOTB Operation from the 'Select a Service' list. A complete list of OOTB Operations is available at Out-of-the-box Automation Operations and Workflows.



    5. Click Next to go to the next tab.
  5. Configure the Service Input for the Operation in the Workflow.
    1. Define the Service Inputs that the Operation will receive from an external system, which it will then use to execute the task. For example, to Reset AD User password, the inputs the Operation will need is sAMAccountName of AD User, which will be passed from the skill attribute to the workflow. Input is an object that consists of all input fields and you can use it by typing input.field_name.



    2. Click Save Draft on the Workflow Designer to save the changes.
  6. In the above step you configured one operation. Similarly, you can create multiple operations within the same workflow.
  7. Define the sequence of your automation workflow by connecting the Start, Stop points and the Operations.



  8. Defining the Start Activity Data

    This is a requirement only when you are creating a new Automation Workflow. (For OOTB workflows this is already completed.)
    1. Go to the Start step and double-click to open Start. It consists of the JSON Schema and Input tabs. The JSON Schema tab contains the details of all the inputs that the workflow will need. It defines which input parameters are required (mandatory), which parameters are optional and what are the data-types (string, number etc) of each input parameter. The Input tab should contain a super set list of all the input parameters that the workflow will need.



    2. First go to the Input tab and add all Input Parameters that are required for the various operations in your workflow.
    3. For example in the sample workflow below there are two operations. Operation 1 has input parameters requestor and login_name. Operation 2 has input parameters requestor, and to. In that case a super set of all the input parameters must be defined under the Input tab of Start step as shown in the following screenshot. Manually enter the input parameters under the Service Input tab. Remember to write the parameters inside curly brackets {}. Multiple parameters are separated by a comma.



    4. After this click the i button on the top right corner. 

    5. This will open a website in a new browser tab, to generate the JSON Schema. Under the Sample JSON Document area, copy and paste all your input parameters and click Generate Schema.

    6. The JSON data is generated in the section below, as seen below.



    7. Copy this Infered JSON Schema and paste it into the Workflow Designer - Start step >> JSON Schema tab.


    8. Click Next, then click Submit. This saves the Start Activity data. For a custom or newly created workflow, if this step is not completed, then the input parameters defined in Automation Workflow will not be mapped with parameters of the automation workflow. 
  9. Click Publish to publish your Automation workflow.

Define the Inputs or Outputs for an Operation

  1. Pass inputs to the operation from the user or an earlier branch:

@{input.field_name}: defines that input object holds the user input fields

Example: @{input.login_name} indicates login_name is a user input

      2. Use the output from an operation as input for another operation:

You can use the output from an operation as inputs for another operation. 

Some of the output fields that can be used in the next activity are:

  • exit-code   
  • user_message
  • error (in case of failure of operation)

The syntax to use is: 

@{activity_id.output['exit-code']}: will print the exit code from the operation.

@{activity_id.output['user_message']}: will print the user message from the operation.

@{activity_id.output['error']}: will print the error from the operation where activity_id is the ID of the step whose output will be used.

Example:

 Hence the syntax used for output will be:  

@{disable_ad_user.output['exit-code']}

@{disable_ad_user.output['user_message']}

@{disable_ad_user.output['error']}

Step 3: Update the Service Configurations

In order to execute a workflow, the system will need some configurations such as how to connect to the system where the automated task will be executed. You can store these configurations under the Service Configurations.

  1. Click the  Automation icon.
    The Automation page appears.
  2. Click the Service Configurations tab.
  3. Identify the appropriate Service Configuration you need to update. Refer to the table listed in Annexure I to understand which Service Configuration is related to which Operation.
  4. Click the Edit icon to edit the records.


  5.  If you want to input an encrypted value in the configurations, use the Encryption Utility provided. Add the data in Text to Encrypt field and click Encrypt.


    The Encrypted text appears in the field below.
  6. Click Copy to copy the encrypted text to the clipboard.


  7. Paste it under appropriate tag on the left pane.
  8. Click Save to save your Service Configuration.

    Note

    Note that the Service Configuration is internally linked to the appropriate Operation. Administrator does not need to relate or link them.

Step 4 : Publish Automation workflow as a Service

In order to consume the Workflow, you need to publish the workflow as a Service. Following are the steps to do that:

  1. On the Automation page, click the Workflow Services tab.
  2. Click New Workflow Service as shown below.

    The Workflow Services page appears as shown below.
  3. Select your Workflow from the list.
  4. Provide the Name to your workflow service.
  5. Provide the workflow Description.
  6. Select the Orchestration Server as default. The Orchestration server should be set to 'default' if you are using the SaaS version of Automation. If you have deployed the Automation server on-premise, then the details have to be specified here.
  7. Click Save & Next.
    The Attributes tab appears.
  8. Click Add Text Attribute to add the attribute information.
    The Add Text Attribute pop-up window appears as shown below.

  9. Specify the attribute Field ID.
  10. System automatically populates the Field ID as the attribute Name.
  11. You can choose whether a Placeholder is required for the attribute.
  12. Click Save to save the changes.

Step 5 : Add the Automation Service into Ticket Workflow

You can link your Automation Workflow Service to a skill so that the automation task gets executed.

Refer to the steps listed at Execute an Automation Service from a Ticket Workflow.

Annexure I: OOTB Operations and their corresponding Service Configurations

No.Operation NameService ConfigurationsInput Name
1Disable AD User

active_directory_configuration

sa_default_configurations

Login Name
2Add AD User to Group

active_directory_configuration

sa_default_configurations

Login Name

Group Name

3Create AD User

active_directory_configuration

sa_default_configurations

Login Name

First Name

Last Name

Employee ID

4 Unlock AD User

active_directory_configuration

sa_default_configurations

Login Name
5Delete AD User

active_directory_configuration

sa_default_configurations

Login Name
6Reset AD User Password

active_directory_configuration

sa_default_configurations

Login Name

Mobile Number

7Create AD Group

active_directory_configuration

sa_default_configurations

Group Name

Group Description

sAMAccountName

8Enable AD User

active_directory_configuration

sa_default_configurations

Login Name
9Check Linux file exists

linux_configuration

sa_default_configurations

File Name

Directory Path

10Execute Shell Script

linux_configuration

sa_default_configurations

Shell script file absolute path
11Compare two files in Linux

linux_configuration

sa_default_configurations

Absolute path of file one

Absolute path of file two

12Stop Windows Service

active_directory_configuration

sa_default_configurations

Windows Service Name
13Windows Service Status

active_directory_configuration

sa_default_configurations

Windows Service Name
14Start Windows Service

active_directory_configuration

sa_default_configurations

Windows Service Name
15Execute Power Shell

active_directory_configuration

sa_default_configurations

Power Shell script absolute path
16Create VMware Snapshot 

vmware_configuration

sa_default_configurations

VM Name

New Snapshot Name

New Snapshot Description

17Clone VMware Instance

vmware_configuration

sa_default_configurations

New VM Name

Existing VM Name

18Delete VM Single Snapshot

vmware_configuration

sa_default_configurations

VM Name

VM Snapshot Name

19Revert Snapshot of VM Instance

vmware_configuration

sa_default_configurations

VM Name

VM Snapshot Name

20Delete VM Instance

vmware_configuration

sa_default_configurations

Existing VM Name


21Stop VMware Instance

vmware_configuration

sa_default_configurations

Existing VM Name


22Start VMware Instance

vmware_configuration

sa_default_configurations

Existing VM Name


23ISM Service request update statussa_default_configurationsTicket Status
24ISM Create Service Requestsa_default_configurations

Requestor For Name

Parent Request ID

Request Details

Request Description

Request Category

Request Class

Requestor Name

25ISM add worklogsa_default_configurationsWorklog Description
26Send Twilio SMS

sms_and_email_configuration

sa_default_configurations

Mobile Number

Message

Note

requestor input field is common for all workflows.

© 2019 Serviceaide 1-650-206-8988 http://www.serviceaide.com info@serviceaide.com