Configure commands for request types

This topic describes what request type commands are, and how to configure them.

Overview of request type commands

A request type can have many commands, and each command can have many command steps. A command can be viewed as a particular function for a request. Copying a file can be one command, and checking that file into version control can be another. To perform these functions, a series of events must take place. These events are defined in the command steps.

An additional level of flexibility is introduced when some commands must only be executed in certain cases. This is powered by the condition field of the commands and is discussed in Command conditions.

Back to top

Configure request type commands

You can add, edit, copy, and delete request type commands from the PPM Workbench.

To add a request type command:

  1. On the PPM Workbench shortcut bar, click Demand Mgmt > Request Types.

    The Request Type Workbench opens.

  2. Open a request type.

  3. In the Request Type window, click the Commands tab.

  4. Click New Cmd.

  5. In the New Command window, provide the following information:

    Field Name

    Description

    Command

    Enter a name for the command.

    Condition

    Define the specific conditions under which the command steps are to be executed. This step is optional. For more information, see Command conditions.

    Description

    Enter a description for the command.

    Timeout(s)

    Define the length of time (in minutes) to run the command before stopping. This setting is useful if a command hangs or takes too long to execute.

    Enabled

    Click Yes to enable the command or No to disable the command.

    Steps

    Specify at least one command step.

    • Click Tokens to open the Token Builder window and find a token to add to the command step. For information about tokens, see Use tokens.

    • Click Special Cmds to open the Special Command Builder and find a special command to add to a command step. For information about special commands, see Use special commands.

    • Click Show Desc to show the Descriptions field in the Steps field, or click Hide Desc to hide the Descriptions field in the Steps field.

  6. Click OK.

    The Commands tab lists the new command.

  7. Click OK.

To edit a request type command:

  1. Open a request type from the PPM Workbench.

  2. In the Request Type window, click the Commands tab.

  3. Click Edit Cmd.

    The Edit Command window opens.

  4. Select the command to edit and make required changes.

  5. Click OK.

    The Commands tab now lists the edited command.

  6. Click OK.

To copy or delete a request type command:

  1. Open a request type from the PPM Workbench.

  2. In the Request Type window, click the Commands tab.

  3. Select the target command and perform the following actions:

    • To copy a command, click Copy Cmd.

    • To delete a command, click Remove.

  4. Click OK.

Back to top

Enable event rules for request type commands

This is feature is introduced as a Beta feature. For details, see Feature types.

By default, the commands included in a request type are triggered at execution workflow steps. For details, see Integrate request type commands and workflows .

The commands included in a request type can also be triggered by different event rules, such as when saving a request, and by calls from other requests.

To define a different event that triggers a request type command, configure the following:

  1. Turn on the Allow Triggering Commands When Saving Requests feature toggle.

    The Event field becomes available for the request type command.

  2. In the Event field of the request type command, select an event rule:

    • Apply after save. The command is triggered when the request is saved.

    • Apply on call from external request. The command is triggered by calls from other requests.

      This event rule must be used together with the ksc_run_command_in_other_requests special command. For details and use examples, see ksc_run_command_in_other_requests.

Back to top

See also: