This tutorial walks you through a process definition example that references the more frequently used definition tools. The example automates resource patching:
- Pend on a periodic timer event.
- On timer expiration, start a resource patch script.
- If the script completes successfully, validate the patch. Otherwise, generate an alert.
- On successful patch validation, send an email notification to the DevOps team.
This visualization demonstrates a process definition for the example:
In following this tutorial, refer to the Process Definition Reference for detailed information about each component type and the properties available for customization.
The following steps describe how to create the visualization.
Add a new process definition
Make sure the Remediation and Automation package is enabled for the client.
- In the main client menu, click Automation > Process Automation. This displays the list of any previously defined process definitions.
- To add a new process definition, click the plus (+) icon. This displays the canvas and tools for rendering a new visualization.
- In the Configure a Process bar, enter a required Name for the process. You can enter an optional process Description.
Continue defining the workflow, handling successful and failed paths, and DevOps notification. The workflow must begin with a StartEvent and end with an EndEvent.
Define a start event
The first step of any process is to define the start condition. The start of a process can be triggered by a timer event, or an alert event. This example demonstrates a timer event:
Click the Create StartEvent symbol from the component tools menu, and place it on the canvas with a click.
Click the Change type (wrench) icon and choose Timer Start Event.
Click the Timer Start Event symbol to display the start event properties.
In the Properties view, enter a start event Name. The ID property is automatically populated.
Click the Start Date edit window and choose a calendar date and time-of-day as the starting condition for automated patch process. Click OK to continue through each dialog.
Choose an Ends option to specify the end of automated patch processing. Select from:
- Never ends
- ends After a number of occurrences
- ends On a specific date and time
From Recurrence Pattern, select the frequency unit.
From Repeats Every, enter the event frequency.
Define a task and task properties
Click the Create Task symbol in the component tools menu and place the task on the canvas. You can also click the StartEvent symbol previously placed on the canvas and click the Append Task icon.
For subsequent components, you have the option of manually selecting and placing the component from the component tool menu or selecting a component on the canvas and choosing the next component in the workflow. This example add components from existing components, which also automatically connects both components.
For the task, click the Change type icon and choose Script Task.
Click the task symbol on the canvas to display the task properties.
Enter the task Name. The name is displayed in the task symbol as you enter it. The task ID is automatically populated.
Select an Agent or Agentless script platform.
Click the Script Name edit box and select from the list of available scripts.
For Resource ID, enter a $ character to display the list of available input sources to the task. Choose the timer start event resource.
For example, if the timer start event is named
Patch Start Timer
, choosePatch Start Timer
from the list of available input sources. In this example, there is only one available input source.Select Default user or Other user as the user with run script privilege.
Define a gateway
Use a gateway to specify workflow branching. An exclusive gateway provides conditional branching and a parallel gateway provides for concurrent processing paths.
- Click the on-canvas script task and select the Append Gateway icon. This renders an exclusive gateway component by default.
- Click the gateway component to edit the properties.
- Enter a Name property. The ID property is automatically populated.
Define conditional tasks
Define two tasks, one for each gateway path. The task that executes depends on satisfying the gateway conditions.
For the first task, define the task to handle a successful patch operation:
- Click the gateway component and select the Append Task icon. This renders a task for post-patch validation.
- For the task, click the Change type icon and choose Script Task.
- Click the task symbol on the canvas to display the task properties.
- Enter the task Name. The task ID is automatically populated.
- Select Agent or Agentless as the script platform.
- Click the Script Name edit box and select from the list of available scripts.
- For Resource ID, enter a $ character to display the list of available input sources to the task. Choose the name of the patching script task previously defined.
- Select Default user or Other user as the user with run script privilege.
For the second task, define the task to handle a failed patch operation:
Click the gateway component, again, and select the Append Task icon. This renders a task to create an alert if the patch operation failed.
For the task, click the Change type icon and choose Service Task to create the alert.
Click the task symbol on the canvas to display the task properties.
Enter the task Name. The task ID is automatically populated.
From the Service menu, select a Platform Service for the alert notification.
From the Task menu, select Create Alert.
Enter the required alert information.
You can manually enter the information in each field or enter $ to display the list of valid values. For example, the Create Alert option requires a Current State value. Enter $ to display the possible process states. Choose the name of the first task created in this example because that is where the patch operation failed.
Define completion task and end event
After successful patch validation, a sent-type task is needed to send an email notification to DevOps.
- Click the previously created validation task and select the Append Task icon.
- For the newly created task, click the Change type icon and choose Send Task.
- Click the task symbol on the canvas to display the send task properties.
- Enter the task Name. The task ID is automatically populated.
- For the Input field, enter a $ character to display the list of available input sources. Choose the name of the patch validation task previously defined.
- To specify the Message Recipient, click Add/Modify.
- Select a recipient from the list and click Add.
- Enter a Notification Template.
- Select a Notification Priority.
Complete the process definition by defining an EndEvent.
- Click the email notification task and select the Append EndEvent icon.
- Click the end event symbol on the canvas to display the event properties.
- Enter the event Name. The task ID is automatically populated.
Connect the failed path handler task to the end event:
- From the component tools menu, select Activate the global connect tool connector.
- Click the script task defined to create an alert.
- Click the EndEvent symbol. This renders a connector between the task and end event.
- Click the connector and in the Properties view enter a connector Name.
Click Save to add and save the process definition. All required properties must be specified and a complete process workflow must be defined before you can save the definition.
Enable and disable the process
When a process is first created and saved, it is enabled by default. Use the PROCESS DEFINITIONS list view to enable and deploy processes as needed:
- Click Automation > Process Definitions to display the process list.
- In the Enabled column, click the toggle button. Select ON to enable the process. Select OFF to disable the process. Each time, you are requested to confirm your selection.
In transitioning from the disabled to the enabled state, the process needs to be redeployed to run.
Deploy the process
After a process is first created, or when transitioning from disabled to enabled state, you need to deploy the process to run it.
- In the PROCESS DEFINITIONS list, for the process you want, click the icon in the Deploy column.
- The dialog requests confirmation before deploying the process. Click Yes to deploy the process. Click No to cancel the deployment request.
- On the Deployed Successfully message, click OK to exit the deployment dialog.
Next steps
Now that you know how to define, enable, and deployed a process, continue with the Advanced Process Definition Topics to learn more about managing process definitions.