Creating resource automation scripts
To perform certain actions in the external system, you require some necessary resources or data that must be retrieved from the external system. Resource automation scripts help retrieve that necessary data that also act as input for particular automation scripts.
You can create new automation categories to sort your automation scripts. Also, you can use one of your existing scripts with a Template type as a template for creating new scripts.
Starting with BMC Release Process Management version 4.6, you can change the status for your automation scripts. For more information, see Using status of objects.
To create a new resource automation script
- Go to Environment > Automation.
- Click Create Automation on the right pane.
- From the To use as list, select Resource Automation.
- In the Choose Automation Category list, select one of the automation categories.
- From the Apply template list, select an option that you want to use as a base for creating your script.
In the Script integration server list, select that integration server that you want to use for connecting with the external system.
In the Resource Id box, specify a unique ID to identify your resource automation script.
This ID is referred to by the automation script at run time when you use the script in a step and run the request under which the step is added.- In the Resource Name box, specify a unique name to identify your resource automation script.
- Select one of the following options available for the Render as list:
- List: Select this option to render the output of the script as a list.
- Table: Select this option to render the output of the script as a table.
- Tree: Select this option to render the output of the script as a tree.
- In the Script body, add your Ruby script including the arguments and the logic required for retrieving necessary data from the particular external system.
The resources that the script fetches, how it fetches it, and the manner in which it displays the output depends on the way you design the script body. For more information about designing the script body, see Designing-the-script-body-of-a-resource-automation-script. - Select one of the following options available for the Script type list:
- Template: Select this option if you want to save this script as a template for future use.
- System: Select this option if you want to save this script as a base script that can be only viewed or copied but not modified by anyone apart from the Administrator.
- User: Select this option if you want to save this script as a normal script for your personal use and available for viewing, copying, and modifying.
- For Maps to, select one of the following options:
- None: Select this option for not mapping the script with a ticket or component.
- Ticket: Select this option to map this script to a ticket. When you do this, the script is available for use on the Tickets tab when you open a plan. This option can be used for creating specific resource automation scripts for retrieving data about tickets from an external system.
- Component: Select this option to map this script to a component. When you do this, the script is available for component mapping when you open one of the applications. This option can be used for creating specific resource automation scripts for the purpose of mapping components with external objects.
- Click Add script to save the script.
- (Optional) Change the imported automation script status to a state other than Draft if you want to make the script available for other users.
Related topics