Practice: Define a Global Property
Objective
To replace hardcoded text in the command line with a Global Property so that command line is future proofed should the value need to be changed.
Instructions
Create the Global Property
- In the Library > Administration, select Global Properties.
- Click the Add button.
- In the Name field, enter
RUNTIME
. - In the Value field, enter
10
. - Add Documentation to the Global Property
- Example: This Global Property will store the number of seconds to run the program.
- Click the Save button on the Global Properties toolbar.
- Close Library.
Modify the Job
- Under Library > Administration, select Master Jobs.
- Using the filters, locate and select Windows Job 1 in Practice Schedule 1.
- Click the Edit button.
- Click the Lock icon in the upper right-hand corner.
- Expand Task Details, if not already expanded.
- Locate the Command Line and highlight
10
. - Using either, the Magic Wand or CTRL+SPACE, pull up the Property Selector window.
- Using the Search filter, locate and select the property called
RUNTIME
. - Click OK.
Note
Your updated Command Line should now look like:
timeout -t[[RUNTIME]]
Click the Save button.
Close Library.
Build the Schedule and Validate that the Global Property is resolved
- Open Operations and click on Schedule Build.
- Validate that today is the date for the From and To fields.
- In the Schedule Build section, select the Released radial button.
- Select Practice Schedule 1 from the Schedule List.
- Click Build
- On the Build Results screen, expand the dropdown menus until you can see and click on Practice Schedule 1.
- Click the Practice Schedule 1 link to open the Schedule in Processes.
- Verify that all Jobs Finished OK.
- Right-click on one of the four jobs that were modified.
- In the Job Selection panel, select Job Output.
- Click Refresh.
- Click on the link that appears after the Refresh is complete.
- Look at lines four and five and validate that the Global Property resolved to
10
- Close the Job Output.
- Close Operations.