5.3.1 Basic settings for action items
- Organization of this subsection
(1) Command
Specify the file name of the command to execute. The file name can be specified as a relative path if it is on the PATH environment variable of the user who starts the job execution service. If it cannot be resolved by the PATH environment variable, specify it with an absolute path.
If specifying a file whose extension is other than .exe or .bat, you need to associate the file extension with an appropriate application.# 1
To execute a command prompt (cmd.exe) command, specify cmd.exe for the execution command, and /c command parameter for the parameter. For details, see the specifications of cmd.exe.# 2
- #1
-
Use the following procedure to associate the file extension with an application.
-
Register the application to associate with using the ftype command.
-
Associate the extension with the application registered in step 1 using the assoc command.
-
Restart the OS.
For details on the settings of the ftype and assoc commands, see Windows Help.
-
- #2
-
Only a local file name can be specified as the name of the execution command file.
(2) Parameter
Specify the parameter you want to specify for the command to be executed. You can also proceed to specify an inherited information variable, a profile variable, and an input item variable. For details on input item variables, see 5.7 Creating an input item.
(3) Execution type
As the execution environment for the command that you have specified for an action, select either Do not show the window or Show the window.
-
Do not show the window
When you select this option, the command is executed in an environment that is equivalent to the the standard item Command execution. The command is executed by the account that started the job execution service (by default, the local system account), with no session allocated to it. The command can be executed without any user logged on to the Windows system. However, when the command is of an interactive nature, it can get stuck in the running state because there is no one to operate the window. (Use the Task Manager or a similar means to check if this is happening.)
-
Show the window
When you select this option, the command is executed in an environment that is equivalent to the standard item Command execution in window. The current session of the user logged on to the Windows system is allocated for command execution, and the command is executed by the account belonging to the allocated user session. While the use of this option requires that a user be logged on to the Windows system during the execution of the command, it enables not only the execution of a command that displays a window on the display device assigned to a session of the logged-on user but also access to resources such as a shared drive to which the logged-on user is granted access.
Furthermore, selecting this option allows you to specify Wait for end and Exclusive option.
The command inside an action is executed in the execution environment described in the following table.
No. |
Setting |
Description |
---|---|---|
1 |
User account |
|
2 |
Environment variables |
Do not use the environment variables starting with CPA, such as CPAxxxx (xxxx is any string), regardless of uppercase or lowercase letters. This is because such variables are reserved by the system. |
3 |
Current path |
Work folder (data-path\work) |
4 |
Priority class of a process |
NORMAL_PRIORITY_CLASS |
5 |
User profile |
|
The behavior of the command varies depending on whether it is defined inside an action and executed from CPA or it is executed in the command prompt. For details on the different behaviors of commands, see A.3 Different behaviors in different command execution environments.
(4) Wait for end
Select Wait for the window showing process to terminate or Does not wait for the window showing process to terminate to indicate whether to wait for the executed command to end.
(5) Exclusive option
To prevent all the specified commands from being simultaneously executed (to ensure that one command is executed at a time), select the Do not execute concurrently among selected actions check box.
Select this check box when there is a window-display command that can cause a problem when executed concurrently with other commands.
(6) Operation when terminates
As the method of determining the state of the action after the execution of the command, select Abnormal end if the return code is other than 0, Warning end if the return code is other than 0, or Always normal end.
Based on the return value of the executed command, define the state of the action and regulate the execution of the subsequent unit in the action flow. For details on action flows, see 5.4 Creating an action flow item.
The following table describes the behavior following the termination of the command.
No. |
Value |
Description |
---|---|---|
1 |
Abnormal end if the return code is other than 0 |
Ended normally when the return value is 0, or Ended abnormally when the return value is other than 0. |
2 |
Warning end if the return code is other than 0 |
Ended normally when the return value is 0, or Ended with warning when the return value is other than 0. |
3 |
Always normal end |
Ended normally regardless of the return value. |