Defining rules to execute an external action
You can define rules to run an executable program or script and perform other actions external to FootPrints—actions that you can also reach from a command prompt. The action simply runs the specified program or script; it does not automatically interact with the operating system’s command interpreter or shell.
If the action that you want performed requires a command interpreter (for example, to run an operating system command or redirect standard input/output), the action must explicitly call the appropriate command interpreter for your operating system (for example, cmd or command for Windows or sh for Linux).
An example of an external action that requires a command interpreter:
cmd /c “ipconfig > ipconfig.txt”. . (Full paths were omitted here for brevity.)
An example of an external action that does not require a command interpreter is:
Be aware of security considerations when setting up rules of this type.
To define a rule that executes an external action
- Open the item where you want to define the rule:
- Click the Administration tab.
- In the appropriate section, click the name of the container or click Manage to open the container Administration page. Then double-click the container.
The container details page appears.
- In the left pane, click the item link (such as Record Definitions in workspaces).
The Items page appears.
- Double-click the item that you want to modify.
The Item details page appears.
- In the left pane, click Business Rules.
- Click New Business Rule and select the appropriate rule type.
The Rule Builder page appears. For detailed information about configuring different types of rules, see Types of business rules.
- In the Business Rule Name field, enter a descriptive name for this rule.
- (Optional) In the Description field, type a useful description for this field.
- In the Business Rule Schedule field, accept the default of Run Any Time, or select from custom schedules defined for this container.
- In the Triggers section, define the action or event that should trigger this rule. For more information, see Selecting triggers for business rules.
- In the Criteria section, define any condition that will trigger this rule. For more information, see Defining criteria for business rules.
- In the Actions section:
- Click Add new action.
- In the Action field, select Execute external action.
- In the next field, enter the command for executing the action in the format you would normally use to execute the action.
The argument that you enter in this field is dependent on the installed operating system; the command syntax will vary from one operating system to another. For example, to run the Windows command interpreter, you would enter either
cmd.exe, depending on the installed Windows operating system.
- (Optional) To insert a field name into the command field, click Insert, and select a field.
- Click Create.
- Click Save.
- Publish the container to implement your changes:
In the breadcrumb trail, click the container link.
Click Save and Publish.
A confirmation message appears.
The Publication Succeeded message appears, showing the number of errors and warnings.