Actions represent activities that are initiated automatically by a rule or manually by a user through a UI action.
There are a number of built-in actions:
- Ping Backup Target – sends a ping to the client machine
- Traceroute backup target – does a tracert to the client machine
- Test Backup Server Connectivity – user when creating a data source
- Restart Job – restarts a failed job
- Ignore Error – sets the status of a job failure to ignored
- Create Incident – a sample action on how to create an incident
A user can create new actions which can execute a Now Flow Action. The user can also choose what happens to failed job’s status i.e. don’t change, change it to ignore, or remediated.
Adding Actions
There are 2 high-level steps involved in creating an action:
Create an Action in JobR
Make sure the application scope is set to JobR
An action can simply
- Change the job failure status or
- Call a Now Flow Action and optionally change the status using specified criteria
Creating an Action to change the job failure status
- In the Actions list, click New to create a new action.
- Give it a name and a description. Check active and Implementation not required.
- The Set Status to has three options: Leave alone, Remediated, Ignored.
- Select the set status to from the list. If you choose remediated, you will be asked to enter a default remediation comment (e.g., to explain why this particular action changes the status to remediated). Further details can be added at the point of the action being executed.
- Copy the sys_id (this will be required in a later step) and submit to save and exit.
Call a Now Flow Action and optionally change the status using the specified criteria
A JobR Action can execute a script or a Now Flow Action.
Now Flow actions provide a convenient low/no-code automation and therefore it is worth trying using a Now Flow Action before writing a script.
- Once you have decided what you want the JobR Action to do, go to the Now Flow Designer and develop the Action. Don’t forget the input parameters as described earlier on.
- Test and Publish the action.
- Through the JobR UI access the Action menu and create a new action and link to the Flow Action you have just created.
- Once you have saved the Action, copy and keep its sys_id.
For the action to become visible you need to create a UI Action.
Create a System UI Action that Triggers the Action just Created
- Make sure that the application scope is set to JobR.
- Go to System->UI Actions and click on New to add a new UI Action.
- Name: This is the button label that will be visible to the user.
- Table: Job_Failure.
- Insert a tick in the following boxes: Active, Show Insert, Show Update, Form Button, Form context menu.
- Form Style: Primary.
- In the script area, use the following script. The script needs to be updated with the sys_id of your action before you copy it to the action.
Inset the sys_id you copied in the previous step of the JobR action that you created.
if (action)
action.setRedirectURL(current);
var jobFailure = JobFailure.from(current);
Action.from("[sys_id]").execute(jobFailure);
Example of a finished script with sys_id inserted:
if (action)
action.setRedirectURL(current);
var jobFailure = JobFailure.from(current);
Action.from("501d5b971beb0150c78765b1604bcb23").execute(jobFailure);
Save the UI Action.
A button representing the action will be visible on the Job Details screen.
Share this article
Comments
0 comments
Article is closed for comments.