Copying alert definitions from one system to another
You can copy the alert definitions that were created on one system onto another system.
About this task
Procedure
- In the source system, use the following API to retrieve
the alert definitions that you want to copy
- REST:
GET /rest/bpm/wle/v1/system/alertDefinitions[?categories={category1,category2,...}] - JavaScript:
BPMAlertDefinition[] getAlertDefinitions(String[] categoryFilter , Boolean checkAuthorization)
- REST:
- Use the following API to save the alert definitions to
the target system:
- REST:
PUT/POST /rest/bpm/wle/v1/system/alertDefinitions[?importMode=false] - JavaScript:
BPMAlertDefinition[] saveAlertDefinitions(BPMAlertDefinition[], Boolean importMode, Boolean checkAuthorization)
The importMode parameter determines the following behaviors:The API saves an alert definition if it complies with the following restrictions:- Whether you want to save the alert definitions that are monitoring only the process applications, snapshots, and process (business process definition) that are on the server or save all of the alert definitions regardless of what they are monitoring.
- Whether to update existing alert definitions or create new ones if there are matching names.
- The name of the alert definition must be specified.
- The threshold value and the operator must be specified and valid.
- The instance status and the task status values must be empty or valid.
- In the BPMAlertDefinition object, the projectId, snapshotId, and bpdId, properties are valid IDs in external String format and the category property has a value of INSTANCE or TASK. Alert definitions created in Process Admin Console have valid property values.
- REST:
- Open the Process Admin Console on the new system.
- Review the imported alert definitions and edit them where
necessary. In particular, the following fields might have
strange values if what the definition is monitoring does not exist
on the server:
- Process App
- Snapshot
- Process
For example, if you save an alert definition with the importMode parameter set to true and the snapshot being monitored by the definition does not exist on the target server, the snapshot field for the definition can have a set of random-looking characters. In this case, edit the alert definition to point to the appropriate snapshot.
Parent topic: Monitoring the number of process instances and tasks