{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":48371,"path":"servicenow-platform/orchestration/create-custom-activities.md","title":"Create custom activities using custom activity designer templates","bundle":null,"doc_type":null,"release":"australia","body":"\n# Create custom activities using custom activity designer templates\n\nYou can create and update different types of custom activities in the Workflow Editor using a custom template.\n\n## Before you begin\n\nRoles required: workflow\\_admin or activity\\_creator\n\n## About this task\n\nThe Activity Designer contains common steps which are applicable to all the activities that you create. This procedure guides you through the common steps and the order they should be set up. You specify an activity template before you create a custom activity.\n\n## Procedure\n\n1.  Navigate to **All** &gt; **Orchestration** &gt; **Workflow Editor**.\n\n    The **Welcome** tab of the Workflow Editor opens.\n\n2.  On the **Custom** tab in the palette, click **+** to create a new activity select the appropriate [template](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/c_ActivityDesignerComponents.md) from the list.\n\n    \\[Omitted image \"custom-activity-icon.png\"\\] Alt text: Arrow pointing to the plus sign on the Custom tab\n\n    The Activity Designer form appears, with a stage indicator at the top. All new activities start at the **General** stage. The current stage shows with a blue underscore.\n\n    \\[Omitted image \"ActivityDesignerStepIndicator.png\"\\] Alt text: Activity designer stage indicator\n\n3.  Add the [general properties](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/integrate-applications/General-Flds-Templates.md).\n\n    This information is standard for each custom activity, include a name, description, and other related information.\n\n4.  Create the template [Create input variables](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/integrate-applications/CreateInputVariables.md) for the template.\n\n    Create the variables to pass into the activity in the Inputs form of the activity designer.\n\n5.  Add a [pre-processing script](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/PreprocessFields.md).\n\n    For input validation or transforming input data, you might need a pre-processing script.\n\n    **Note:** This step is not included in the Run Script activity.\n\n6.  Click **Continue** to open the Execution Command form, then fill out the **Execution Command** step based on the corresponding execution templates:\n\n    -   [Create a SOAP web service activity](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/t_CreateASOAPWebServiceActivity.md)\n    -   [Create a JDBC activity](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/t_CreateAJDBCActivity.md)\n    -   [Create a JavaScript Probe activity](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/t_CreateAJavaScriptProbeActivity.md)\n    -   [Create a PowerShell activity](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/t_CreateAPowershellActivity.md)\n    -   [Create a REST web service activity](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/t_CreateARESTWebServiceActivity.md)\n    -   [Create a Probe activity](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/t_CreateAProbeActivity.md)\n    -   [Create an SFTP activity](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/t_CreateAnSFTPActivity.md)\n    -   [Create a Run Script activity](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/t_CreateARunScriptActivity.md)\n    -   [Create an SSH activity](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/t_CreateAnSSHActivity.md)\n    -   [Create a JMS activity](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/t_CreateAJMSActivity.md)\n7.  [Test your inputs](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/CreateInputVariables.md).\n\n8.  In the Outputs form, define local and/or output variables.\n\n    Local variables can be used for temporary storage when cascading parsing rules. For example, you might extract an XML payload from within a JSON payload. A local variable can access the XML document and use that as a source for another parsing rule. The graphic shows a *Local1* variable source to parse data for *Output2*.\n\n    \\[Omitted image \"definelocalvariable.png\"\\] Alt text: Drop-down list for defining a local variable\n\n9.  Use one of the options to assign values to Outputs.\n\n<table id=\"choicetable_lh4_h3j_4y\"><tbody><tr><td id=\"d583684e333\">\n\n**Parsing rule**\n\n</td><td>\n\nYou can create a parsing rule and map them to the output fields by dragging and dropping the variables into the [parsing rules](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/t_CreateAParsingRule.md) structure. The REST, SOAP, and JDBC templates provide auto-mapping to create the parsing rules automatically. If available from the test inputs form, auto-mapping should be used when possible.\n\n</td></tr><tr><td id=\"d583684e349\">\n\n**[Post-processing](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/t_CreateAParsingRule.md)**\n\n</td><td>\n\nPost-processing scripts allow you to code your own output data validation, output parsing code, and related tasks. Post-processing executes after the execution command results have been returned and before the parsing rules and conditions are run. Click **Go to Post-Processing \\(Advanced\\)** to create a post-processing script. **Note:** If you create a script, this step reflects as a stage in the indicator.\n\n</td></tr></tbody>\n</table>10. Click **Continue** to open the [Conditions](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/integrate-applications/conditions.md) form to create exit condition rules for your activity and then click **Save**.\n\n\n-   **[General properties for activity designer templates](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/General-Flds-Templates.md)**  \nThe following General Property fields are common to all activity designer templates.\n-   **[Create input variables](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/CreateInputVariables.md)**  \nCreate the variables to pass into the activity in the **Inputs** form of the activity designer.\n-   **[Data encryption for activity variables](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/c_DataEncryptActivityVariables.md)**  \nYou can protect sensitive data passed from Orchestration activities by encrypting input and output variables.\n-   **[Activity designer template pre-processing fields](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/PreprocessFields.md)**  \nUse the **Pre Processing** form of the activity designer to define a script to run before the activity executes.\n-   **[Template post-processing fields](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/template-post-process-field.md)**  \nFrom the **Post Processing** form in the activity designer you can define a script to run after the activity executes.\n-   **[Auto-map activity output variables](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/automap-output-variable-inputs.md)**  \nYou can map parameter values in a test payload to variables in the **Outputs** tab automatically.\n-   **[Create an output variable](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/t_CreateAnOutputVariable.md)**  \nThe **Outputs** form in the designer contains a variable builder for creating data structures of objects and arrays.\n-   **[Create a parsing rule](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/t_CreateAParsingRule.md)**  \nPopulate output variables defined in a custom activity with payload data returned from an inputs test on an external host or endpoint.\n-   **[Activity conditions](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/conditions.md)**  \nCreate the exit conditions for your activity in the **Condition** column and set the order for each..\n\n**Parent Topic:**[Orchestration activity designer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/orchestration/c_WorkflowActivityDesigner.md)\n\n"}}