Hitachi

JP1 Version 12 JP1/Integrated Management 2 - Manager Command, Definition File and API Reference


4.5.15 jp1EmService.changeEventStatus

This method changes the event status. When the specified JP1 user does not have the permission to view the specified events, an error occurs. When the specified user does not have the permission to operate the specified events, the user is not allowed to operate the events. For details about the conditions under which a JP1 user may be able to view JP1 events, see information regarding the events a JP1 user can display in the event view after selecting an IM management node in 3.2.1 Structure of the IM management node in the JP1/Integrated Management 2 - Manager Overview and System Design Guide.

This method cannot be called from the __eventGet method provided by product plug-ins or from the method called by the __eventGet method.

The details of the jp1EmService.changeEventStatus method are provided below.

Method name

Object jp1EmService.changeEventStatus(int dealt, String[] sid, String lang, String jp1User, String jp1Token)

Parameters
dealt

Specify one of the following values to indicate the event status after the change:

  • 0 (Unprocessed)

  • 1 (Processed)

  • 2 (Processing)

  • 3 (Held)

sid

Specify an array of SIDs corresponding to the JP1 events whose status you want to retrieve. For details about the SIDs of JP1 events, see 7.2.1 (1) Event information object. You can specify a maximum of 2,000 SIDs of JP1 events.

lang

Specify the language of the message. You can specify ja, ja-JP, or en. If you specify any other values, it is assumed that en is specified. For details, see Language conventions of user-created plug-ins in 4.4 Methods implemented in the plug-in.

jp1User

By using a string of 1 to 31 bytes, specify the name of a JP1 user who has one of the following JP1 permission levels:

  • JP1_Console_Admin

  • JP1_Console_Operator

jp1Token

Specify a JP1 authentication token for the JP1 user specified for jp1User.

Return values

After changes are made successfully to the event status, an object storing event information is returned. The following table describes the keys and their values stored in the object:

No.

Key

Value

1

eventData

Returns an array of event information objects representing a list of events whose statuses have been changed. For details about the event information objects, see 7.2.1 (1) Event information object. When there are any events that the specified user did not have the sufficient permission to operate, only those events that the user succeeded in operating are returned.

2

messageId

Returns the message ID of a temporary error message generated during an event search. When there is no message to be provided, null is specified.

The following table describes the keys and their values stored in the object after a failed attempt to change the event status:

No.

Key

Value

1

errorMessage

An error message. When any of the arguments is invalid, the KAJY22043-E error message is set. If this method is executed while the JP1/IM2 - Manager service is stopped, the KAJY32100-E message is set.

For details about the error messages set in all the other cases, see the table under Status codes in 5.6.1 Event search.

2

errorMessageId

Returns the ID of the error message.

In methods of a product plug-in that calls this method, consider error messages and error processing based on the specifications of the plug-in, according to the value of the key errorMessageId.

Output the key errorMessage to the internal log of the product plug-in for use in troubleshooting it.

Exception

None