Create custom activities

From the Custom tab, you can create and update custom activities without leaving the workflow editor.

Before you begin

Roles required: activity_admin, activity_creator, admin

About this task

Custom activities can:
  • Share data between activities in a workflow.
  • Parse data from standard input formats.
  • Be purchased from and shared on the ServiceNow Store.
  • Be versioned.
  • Be copied.
Note: The information displayed in the Custom tab depends on the current view in the workflow editor. When you display a workflow on the canvas, the Custom tab shows all available custom activities categorized by application, but does not display any input or output data.

Procedure

  1. Click the + icon to create a new activity and select the appropriate template from the list.
    The Activity Designer form appears, with a stage indicator at the top. All new activities start at the General stage. The current stage is indicated by a blue underscore.
    Figure 1. Activity designer stage indicator
    Activity designer stage indicator
  2. Enter a name for your activity and click Continue.
    This action saves the activity and opens the Inputs form.
  3. Create the input variables for your activity.
    For additional information about configuring variables in custom activities, see Activity designer variables and Orchestration activity parsing rules.
  4. Proceed to the next stage by taking one of these actions:
    • Click Continue to open the Execution Command form and map the variables to input fields. To save the activity from this point on, you must click Save.
    • Click Go to Pre-Processing (Advanced) to create a pre-processing script. If you create a script, Orchestration adds this step to the indicator.
  5. In the Execution Command form, map the input variables by dragging and dropping them into the activity's input fields.
    Figure 2. Mapping input variables
    Mapping input variables
  6. Complete the other fields and click Continue.
  7. In the Outputs form, create the output variables and map them to the output fields by dragging and dropping the variables into the parsing rules structure.
    Figure 3. Output field mapping
    Output field mapping
  8. Proceed to the next stage by taking one of these actions:
    • Click Continue to open the Conditions form.
    • Click Go to Post-Processing (Advanced) to create a post-processing script. If you create a script, Orchestration adds this stage to the indicator.
  9. Create exit conditions for your activity and click Save.