18 Workflow Notifications
This is a public interface for Notifications-related operations.
This chapter contains the following section:
Parent topic: Object APIs
Create and Modify Notifications
This section contains the following topics:
- Create a Notification
- Create a Notification Recipient
- Create a Notification Link
- Check Out a Notification Definition
- Modify a Notification Definition
- Modify a Notification Instance
- Send a Notification
- Check In a Notification Definition
- Remove a Notification Link
- Remove a Notification Recipient
- Remove a Notification
Parent topic: Workflow Notifications
Create a Notification
Use this API to create a Notification definition or instance. This API also initializes the classification of the new Notification object.
Name
CDR_PUB_DF_NOTIFICATIONS.CreateNotification
Signature
PROCEDURE CREATENOTIFICATION( P_API_VERSION IN NUMBER, P_INIT_MSG_LIST IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_COMMIT IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_VALIDATION_LEVEL IN NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, X_RETURN_STATUS OUT VARCHAR2, X_MSG_COUNT OUT NUMBER, X_MSG_DATA OUT VARCHAR2, PIO_SOURCECDRNAMING IN OUT CDR_NAMING_VERSION_OBJ_TYPE, PI_CDRNOTIFICATION IN CDR_NOTIFICATION_OBJ_TYPE, PI_CREATEOBJECT IN VARCHAR2, PI_DEFCLASSIFICATIONCOLL IN CDR_CLASSIFICATIONS_COLL );
Parameters
This API has standard parameters (see Standard Parameters) and the following parameters:
- PIO_SOURCECDRNAMING (Mandatory) This is a parameter of table type
CDR_NAMING_VERSIONS_OBJ_TYPE that contains CDR Naming Version attributes.
If you are creating a new definition only or a new definition and an instance of it, enter values for the new definition.
If you are creating an instance of an existing definition, enter values to identify the existing definition.
For OBJECT_TYPE_RC enter $OBJTYPES$NOTIFICATION if you are creating a definition only; $OBJTYPES$NOTIFREF if you are creating an instance of an existing definition; and also if you are creating a new definition and an instance of it.
- PI_CDRNOTIFICATION (Mandatory) This is a parameter of table type
CDR_NOTIFICATION_OBJ_TYPE that contains Notification specific attributes.
Enter FYI or APPROVAL for NOTIF_TYPE_RC.
Enter HIGH, MEDIUM, or LOW for NOTIF_PRIORITY_RC.
Enter ALL or ANY for ALL_REPLIES_FLAG_RC for Notifications of type APPROVAL.
- PI_CREATEOBJECT Enter DEFN for creating a definition, INST for creating an instance, and BOTH for creating a definition and an instance of it.
- PI_DEFCLASSIFICATIONCOLL (Optional) By default the new definition is
classified according to the subtype you assigned it in the CDR_NAMING_VERSION_OBJ_TYPE.
If you want to override the default classifications for one or more classification levels, use this parameter. This is a collection of CDR_CLA_OBJ_TYPEs, which have 5 attributes, including CLA_LEVEL_ID and CLASSIFICATION_ID.
If you want the definition to inherit its classifications for a particular level from its parent, enter the classification level ID and, for the CLASSIFICATION_ID, enter 0 (zero).
If you want to explicitly assign one or more terms for a particular level, initialize a CDR_CLA_OBJ_TYPE for each term, entering the classification level ID and, for the CLASSIFICATION_ID, the term ID.
The PAR_ attributes are not relevant to Notifications. Do not enter any values for them.
Parent topic: Create and Modify Notifications
Create a Notification Recipient
Use this API to create Notification recipients. Notification recipients are group roles of a user group.
Name
CDR_PUB_DF_NOTIFICATIONS.CreateNotificationRecipient
Signature
PROCEDURE CREATENOTIFICATIONRECIPIENT( P_API_VERSION IN NUMBER, P_INIT_MSG_LIST IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_COMMIT IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_VALIDATION_LEVEL IN NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, X_RETURN_STATUS OUT VARCHAR2, X_MSG_COUNT OUT NUMBER, X_MSG_DATA OUT VARCHAR2, PI_CDRNOTIFRECIPIENTS IN CDR_NTFRCP_COLL );
Parameters
This API has standard parameters (see Standard Parameters) and the following parameter:
PI_CDRNOTIFRECIPIENTS This is a collection of CDR_NOTIF_RECIPIENT_OBJ_TYPE.
If the Notification is of type APPROVAL, for the attribute FALLBACK_FLAG_RC you need to enter $NOTIFRCPTTYPE$PRIMARY if the recipient is Primary or $NOTIFRCPTTYPE$BACKUP if the recipient is Backup.
If the Primary recipients do not respond to an APPROVAL type of Notification within the defined time frame, then the Notification is sent to the Backup recipients.
Parent topic: Create and Modify Notifications
Create a Notification Link
Use this API to create links to Planned Outputs of executables owned by a Workflow.
Name
CDR_PUB_DF_NOTIFICATIONS.CreateNotificationLinks
Signature
PROCEDURE CREATENOTIFICATIONLINKS( P_API_VERSION IN NUMBER, P_INIT_MSG_LIST IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_COMMIT IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_VALIDATION_LEVEL IN NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, X_RETURN_STATUS OUT VARCHAR2, X_MSG_COUNT OUT NUMBER, X_MSG_DATA OUT VARCHAR2, PI_CDRNOTIFLINKS IN CDR_NOTIF_LINKS_OBJ_COLL );
Parameters
This API has standard parameters (see Standard Parameters) and the following parameters:
PI_CDRNOTIFLINKS This is a collection of CDR_NOTIF_LINKS_OBJ_TYPE.
You need to enter values for the following attributes: COMPANY_ID, NFINST_OBJ_ID, NFINST_OBJ_VER, PO_COMPANY_ID, PO_OBJ_ID, ACTIVITY_COMPANY_ID, ACTIVITY_OBJ_ID, ACTIVITY_OBJ_VER.
Parent topic: Create and Modify Notifications
Check Out a Notification Definition
Use this API to check out a Notification definition.
Name
CDR_PUB_DF_NOTIFICATIONS.CheckOutNotif
Signature
PROCEDURE CHECKOUTNOTIF( P_API_VERSION IN NUMBER, P_INIT_MSG_LIST IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_COMMIT IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_VALIDATION_LEVEL IN NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, X_RETURN_STATUS OUT VARCHAR2, X_MSG_COUNT OUT NUMBER, X_MSG_DATA OUT VARCHAR2, PIO_CDRNOTIF IN OUT CDR_BASE_OBJ_TYPE, PI_COMMENT IN VARCHAR2, PI_ISINSTONLY IN VARCHAR2, PI_OPTYPE IN VARCHAR2 );
Parameters
This API has standard parameters (see Standard Parameters) and the following parameters:
- PIO_CDRNOTIF [Mandatory] This is a parameter of table type
CDR_BASE_OBJ_TYPE. Identify the Notification definition you want to check out.
Provide the basic naming attributes: COMPANY_ID, OBJECT_ID, OBJECT_VER, NAMESPACE_OBJ_ID, NAMESPACE_OBJ_VER, OBJECT_VERSION_NUMBER. Initialize these attributes in CDR_BASE_OBJ_TYPE.
- PI_COMMENT (Optional) Enter the reason you are checking in the Notification.
- PI_ISINSTONLY Enter $YESNO$NO.
- PI_OPTYPE Enter NULL for this parameter.
Parent topic: Create and Modify Notifications
Modify a Notification Definition
Use this API to modify a Notification definition. You need to check out the Notification definition first.
Name
CDR_PUB_DF_NOTIFICATIONS.ModifyNotification
Signature
PROCEDURE MODIFYNOTIFICATION( P_API_VERSION IN NUMBER, P_INIT_MSG_LIST IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_COMMIT IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_VALIDATION_LEVEL IN NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, X_RETURN_STATUS OUT VARCHAR2, X_MSG_COUNT OUT NUMBER, X_MSG_DATA OUT VARCHAR2, PIO_SOURCECDRNAMING IN OUT CDR_NAMING_VERSION_OBJ_TYPE, PI_CDRNOTIFICATION IN CDR_NOTIFICATION_OBJ_TYPE );
Parameters
This API has standard parameters (see Standard Parameters) and the following parameters:
- PIO_SOURCECDRNAMING (Mandatory) This is a parameter of table type
CDR_NAMING_VERSIONS_OBJ_TYPE that contains CDR Naming Version attributes.
Initialize the attributes COMPANY_ID, OBJECT_ID, and OBJECT_VER.
- PI_CDRNOTIFICATION (Mandatory) This is a parameter of table type CDR_NOTIFICATION_OBJ_TYPE. Provide values for the attributes you want to modify.
Parent topic: Create and Modify Notifications
Modify a Notification Instance
Use this API to modify a Notification instance.
Name
CDR_PUB_DF_NOTIFICATIONS.ModifyNotificationInstance
Signature
PROCEDURE MODIFYNOTIFICATIONINSTANCE( P_API_VERSION IN NUMBER, P_INIT_MSG_LIST IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_COMMIT IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_VALIDATION_LEVEL IN NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, X_RETURN_STATUS OUT VARCHAR2, X_MSG_COUNT OUT NUMBER, X_MSG_DATA OUT VARCHAR2, PIO_SOURCECDRNAMING IN OUT CDR_NAMING_VERSION_OBJ_TYPE, PI_CDRNOTIFICATION IN CDR_NOTIFICATION_OBJ_TYPE );
Parameters
This API has standard parameters (see Standard Parameters) and the following parameters:
- PIO_SOURCECDRNAMING (Mandatory) This is a parameter of table type
CDR_NAMING_VERSIONS_OBJ_TYPE that contains CDR Naming Version attributes.
Initialize the attributes COMPANY_ID, OBJECT_ID, and OBJECT_VER.
- PI_CDRNOTIFICATION (Mandatory) This is a parameter of table type CDR_NOTIFICATION_OBJ_TYPE. Provide values for the attributes you want to modify.
Parent topic: Create and Modify Notifications
Send a Notification
Use this API to send an information Notification either from a Program or from another database user.
Name
CDR_PUB_DF_NOTIFICATIONS.Send_FYI_Notification
Signature
PROCEDURE SEND_FYI_NOTIFICATION PI_JOB_ID NUMBER IN PI_USER_GROUP VARCHAR2 IN PI_ROLE_CODE VARCHAR2 IN PI_SUBJECT VARCHAR2 IN PI_BODY VARCHAR2 IN PI_URL VARCHAR2 IN PI_URLNAME VARCHAR2 IN DEFAULT PI_CDRNOTIFLINKS CDR_NOTIF_LINKS_OBJ_COLL IN DEFAULT, );
If the user wants to include just one URL in the notification, it can be passed in pi_url and the string to be shown for the hyperlink should be passed in pi_urlName.
On the other hand if the user wants to include links to some or all of the outputs generated by the job, then the list of the corresponding planned output IDs should be passed in the last collection parameter.
Parameters
This API has standard parameters (see Standard Parameters) and the following parameters:
- PI_JOB_ID Enter the job ID created for the corresponding job for the notifications sent.
- PI_USER_GROUP Enter the user group identifier.
- PI_ROLE_CODE Enter the role code identifier.
- PI_SUBJECT Enter the subject of the notification.
- PI_BODY Enter the body content of the notification.
- PI_URL Enter the URL to be embedded in the notification.
Parent topic: Create and Modify Notifications
Check In a Notification Definition
Use this API to check in a Notification definition.
Name
CDR_PUB_DF_NOTIFICATIONS.CheckInNotifDef
Signature
PROCEDURE CHECKINNOTIFDEF( P_API_VERSION IN NUMBER, P_INIT_MSG_LIST IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_COMMIT IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_VALIDATION_LEVEL IN NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, X_RETURN_STATUS OUT VARCHAR2, X_MSG_COUNT OUT NUMBER, X_MSG_DATA OUT VARCHAR2, PIO_CDRNOTIF IN OUT CDR_BASE_OBJ_TYPE, PI_COMMENT IN VARCHAR2 );
Parameters
This API has standard parameters (see Standard Parameters) and the following parameters:
- PIO_CDRNOTIF [Mandatory] This is a parameter of table type CDR_BASE_OBJ_TYPE
that object attributes.
Identify the Notification definition you want to check in. Provide the basic naming attributes: COMPANY_ID, OBJECT_ID, OBJECT_VER, NAMESPACE_OBJ_ID, NAMESPACE_OBJ_VER, OBJECT_VERSION_NUMBER. Initialize these attributes in CDR_BASE_OBJ_TYPE.
- PI_COMMENT (Optional) Enter the reason you are checking in the Notification.
Parent topic: Create and Modify Notifications
Remove a Notification Link
Use this API to remove links to Planned Outputs of executables owned by the Workflow.
Name
CDR_PUB_DF_NOTIFICATIONS.RemoveNotificationLinks
Signature
PROCEDURE REMOVENOTIFICATIONLINKS( P_API_VERSION IN NUMBER, P_INIT_MSG_LIST IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_COMMIT IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_VALIDATION_LEVEL IN NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, X_RETURN_STATUS OUT VARCHAR2, X_MSG_COUNT OUT NUMBER, X_MSG_DATA OUT VARCHAR2, PI_CDRNOTIFLINKS IN CDR_NOTIF_LINKS_OBJ_COLL );
Parameters
This API has standard parameters (see Standard Parameters) and the following parameter:
PI_CDRNOTIFLINKS (Mandatory) This is a collection of CDR_NOTIF_LINKS_OBJ_TYPE. For each Planned Output link that you want to remove, initialize a CDR_NOTIF_LINKS_OBJ_TYPE and then extend the collection.
Parent topic: Create and Modify Notifications
Remove a Notification Recipient
Use this API to remove a Notification recipient.
Name
CDR_PUB_DF_NOTIFICATIONS.RemoveNotificationRecipients
Signature
PROCEDURE REMOVENOTIFICATIONRECIPIENTS( P_API_VERSION IN NUMBER, P_INIT_MSG_LIST IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_COMMIT IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_VALIDATION_LEVEL IN NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, X_RETURN_STATUS OUT VARCHAR2, X_MSG_COUNT OUT NUMBER, X_MSG_DATA OUT VARCHAR2, PI_CDRNOTIFRECIPIENTS IN CDR_NTFRCP_COLL );
Parameters
This API has standard parameters (see Standard Parameters) and the following parameters:
PI_CDRNOTIFRECIPIENTS This is a collection of CDR_NOTIF_RECIPIENT_OBJ_TYPE.
For each Recipient that you want to remove, initialize a CDR_NOTIF_RECIPIENT_OBJ_TYPE and then extend the collection.
The following attributes are required: COMPANY_ID,OBJ_ID,OBJ_VER,USER_GROUP_ID,ROLE_ID,FALLBACK_FLAG_RC.
Parent topic: Create and Modify Notifications
Remove a Notification
Use this API to remove a Notification definition.
Name
CDR_PUB_DF_NOTIFICATIONS.RemoveNotifications
Signature
PROCEDURE REMOVENOTIFICATIONS( P_API_VERSION IN NUMBER, P_INIT_MSG_LIST IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_COMMIT IN VARCHAR2 := CDR_PUB_DEF_CONSTANTS.G_FALSE, P_VALIDATION_LEVEL IN NUMBER := CDR_PUB_DEF_CONSTANTS.G_VALID_LEVEL_FULL, X_RETURN_STATUS OUT VARCHAR2, X_MSG_COUNT OUT NUMBER, X_MSG_DATA OUT VARCHAR2, PI_BASEOBJCOLL IN OUT CDR_BASE_OBJ_COLL );
Parameters
This API has standard parameters (see Standard Parameters) and the following parameter:
PI_BASEOBJCOLL (Mandatory) This is a collection of CDR_BASE_OBJ_TYPE. For each Notification that you want to remove, initialize a CDR_BASE_OBJ_TYPE and then extend the collection.
The following attributes are required: COMPANY_ID,OBJ_ID,OBJ_VER,OBJECT_VERSION_NUMBER,NAMESPACE_OBJ_ID,NAMESPACE_OBJ_VER.
Parent topic: Create and Modify Notifications