Hitachi

JP1 Version 12 JP1/Client Process Automation Configuration and Administration Guide


8.3.2 Monitor any event (event monitor item)

Organization of this subsection

(1) Overview of the function

This item executes a command periodically and monitors the return code of the command.

(2) List of settings

Name

Required

Format

Can specify inherited information?

Command name

Yes

String (1 to 255 bytes)

Yes

Parameter

No

String (0 to 512 bytes)

Yes

Return code regarding to monitor event

Yes

String (1 to 512 bytes)

Format: numeric-value[,numeric-value...]

The valid values are 0 to 4,294,967,295.

Yes

Return code regarding to monitor abnormal end

No

String (0 to 512 bytes)

Format: numeric-value[,numeric-value...]

The valid values are 0 to 4,294,967,295.

Yes

Timeout period(min.)

No

Numeric (0 to 1440)

No

Virtual user name

No

String (0 to 512 bytes)

Yes (The profile information cannot be specified.)

(3) Settings

Command name

Specify the file name of the command to be executed periodically for monitoring.

Parameter

Specify the parameter for the execution command.

Return code regarding to monitor event

Specify the return codes that are regarded as event detection. You can specify multiple return codes, separated by commas.

Return code regarding to monitor abnormal end

Specify the return codes that are regarded as abnormal ends. You can specify multiple return codes, separated by commas.

Timeout period(min.)

Specify the timeout period for the Monitor any event. If omitted or set to 0, the Monitor any event is not terminated.

When the timeout period is reached, the monitor ends abnormally (ENDE).

Virtual user name

Specify the name of the virtual user mapped to the name of the Windows user who executes the item. If the virtual user name is omitted, the item is executed with the account for the CPA job execution service.

To map the virtual user name, use the cpasetumap command. For details on the cpasetumap command, see cpasetumap in 9. Commands.

(4) Return values

Value

Description

-1

Forced termination.

0

One of the following cases:

  • The monitored file is detected and file monitoring is finished.

  • The timeout period is reached and thus monitoring is stopped.

  • If a virtual user name is specified for the item, monitoring could not be performed because the virtual user name specified for the item is incorrect or it is not registered.

[Action to take]
  • Specify the correct virtual user name.

  • Register the virtual user name.

2

Insufficient resources or high processing load.

[Action to take]

Check OS resources used when the item is executed.

3

System call failed.

[Action to take]

Confirm if CPA has been correctly installed, and investigate whether there could have been any problems with the OS environment when the item was executed.

4

An incorrect parameter was specified.

[Action to take]

Use the valid values, and then configure the settings again.

21

The execution result of the command matched the setting values of the Return code regarding to monitor abnormal end, and the monitor event item ended.

22

An attempt to execute the specified command failed.

[Action to take]
  • Make sure that there is enough desktop heap available.

  • If a virtual user name is specified for the item, fix the error by checking if:

    - The Windows user associated with the virtual user name has the correct user rights.

    - The password for the Windows user associated with the virtual user name has not expired.

    - The password for the Windows user associated with the virtual user name is correct (the account is not locked).

    - The Net Logon service has been running.

(5) Example 1

Detect an event if a certain process exists. Otherwise, continue monitoring.

Command name

cmd

Parameter

/c tasklist|findstr process-name

Return code regarding to monitor event

0

Return code regarding to monitor abnormal end

--

Legend:

-- : Not specified

(6) Example 2

Detect an event if a certain process exists. Otherwise, end abnormally.

Command name

cmd

Parameter

/c tasklist|findstr process-name

Return code regarding to monitor event

0

Return code regarding to monitor abnormal end

1

(7) About return codes

If the same value is set to both of the Return code regarding to monitor event and the Return code regarding to monitor abnormal end, the item ends abnormally.