Activity definitions
Summarize
Summary of Activity definitions
Activity definitions in ServiceNow Playbooks specify how activities obtain the data they need when a playbook runs. They provide default configurations and values to ensure activities execute properly when triggered. Each activity definition includes configuration details, an automation plan, and optionally, an activity experience that controls how the activity appears in the Playbook user interface.
Show less
Activity definitions are stored in the syspdactivitydefinition table and can be managed via Process Automation > Process Automation Administration > Activity Definitions. These definitions serve as templates for activities added to playbooks in Workflow Studio.
Key Features
- Basic Fields: Includes activity label, associated table (commonly Task or Global), application scope, accessibility options, description, and required user roles to control access.
- Automation Plan: Defines the Workflow Studio flow or action that drives the activity, along with its inputs. Inputs can be configured for visibility to playbook designers and administrators, controlling what properties are shown or hidden in the UI.
- Activity Experience: Optional configuration that defines how the activity renders as a card in the Playbook UI. It includes an experience type (such as Record), an associated dynamic record for data rendering, and data fields populated dynamically via the data pill picker.
- Playbook Card Actions: Allows adding actionable buttons to the Playbook card footer that can run scripts, client actions, or UI components, enhancing interactivity for end users.
Design Considerations
- Avoid using triggered Workflow Studio flows directly in activity automation plans to prevent flows running outside Playbooks. Prefer subflows or actions or configure flow triggers to avoid unintended executions.
- Preconfigure default input values in activity definitions to simplify and accelerate playbook creation for designers.
Practical Guidance for ServiceNow Customers
- Creating Activity Definitions: Define the automation plan by specifying an action or subflow, configure inputs that playbook designers can set, and optionally select the user experience for runtime interaction.
- Customizing UI Layouts: Use UI Layouts to control the properties and components displayed in the Playbook card, helping end users interact effectively with activities during playbook execution.
- Enhancing User Experience: Map dynamic data pills from subflows or actions to display relevant information in Playbook cards and add Playbook actions to enable context-specific user interactions.
By leveraging activity definitions effectively, ServiceNow customers can create robust, reusable activity templates that streamline playbook development, improve user experience, and enforce appropriate access controls.
Activity definitions describe how the activities in your playbook get the data that they need when your playbook runs.
Activity definitions provide default configurations and values for your activities so that they can run properly when your playbook is triggered. Each activity definition contains some basic configuration details, as well as an automation plan and activity experience.
The Activity Definition [sys_pd_activity_definition] table lists the definitions for the activities that you can add to a playbook in Workflow Studio. To access these activity definitions, navigate to .
Fields
| Field | Description |
|---|---|
| Label | Name of the activity to display to users in Workflow Studio. |
| Table | Name of the table whose records the activity can access as inputs. Typically, this table is either the Task [task] or Global [global] table. |
| Application | Application scope that the activity can run in. |
| Accessible From | Options include:
|
| Description | Optional description for the activity. |
| Required Roles | A list of user roles that are allowed to access activities that use this activity definition. |
Automation plan
- The Workflow Studio flow or action, which drives the activity's automation
- The activity's inputs, which are the data that the activity needs to run your playbook
Activity designers can configure the visibility of each activity input.
- Include in standard modal
- Hides the input from the properties panel. Playbook designers can only see the input from the standard modal when they select the Show advanced properties option.
- Include in standard modal and configuration panel
- Displays the input in the properties panel. Playbook designers can also see the input from the standard modal when they select the Show advanced properties option.
- Admin visibility only
- Hides the input from users who do not have the admin or playbook.admin roles.
Activity experience
- Experience type
- An experience type defines the data, or properties, that describe how the activity renders as a playbook card at runtime. For example, a Record experience type tells the system that the activity can display a title, tagline, description, footer, and service level agreement (SLA) information in the Playbook card when your activated playbook runs. For more information, see UI Layouts.
- Associated record
- The associated record defines the record whose data can render within a Playbook card at runtime. The associated record is dynamic, which means that it changes frequently as the playbook progresses. Because of this dynamic nature, you may want to use the data pill picker (
) to map the associated record to output record data within the underlying subflow or action specified in the automation plan.
- Data to render in the Playbook card
- You can specify the data to render in the Playbook card in the sections under the Associated Record section. To add dynamic data to fields that render in this user-facing view, use the data pill picker
next to a data field and navigate, or dot-walk, to the appropriate data pill. The data pill should point to data within the subflow or action specified in the activity definition's automation plan.
Note:An activity experience contains many sections where you can specify the data to appear within the Playbook card. These sections vary depending on the experience type that you select. For example, a Record experience type has Details, Form, Attachments, and Features sections, while a Knowledge experience type has Knowledge, Details, and Features sections. For more information, see UI Layouts. - Actions to render in the Playbook card
-
You can specify the Playbook actions that you want to render in an activity's Playbook card using the Playbook Experience Action Assignment Map related list. A Playbook action displays as a button in the Playbook card's footer. Playbook actions can run server scripts, dispatch client actions, or render UI components. For more information.
To add a Playbook action to your activity definition, select New in the Playbook Experience Action Assignment Map related list. Then, choose a Playbook action from the Action Assignment list. Next, choose a Playbook user experience that you want the Playbook action to appear in from the Playbook Experience list, and then click Submit.
Design considerations
- Avoid calling triggered Workflow Studio flows in an activity's automation plan
- To prevent unintentionally running a flow outside of Playbooks, you can use only subflows or actions in activity automation plans. Alternatively, you can set the flow's trigger to only run if not already running. For more information, see Workflow Studio flow trigger types.
- Specify default input values in your activity definitions
- Preconfiguring default input values for your activity definitions reduces the time and complexity needed for a playbook owner to create a playbook.