Oracle Workflow API Reference Release 2.6.3.5 Part Number B12163-02 |
Previous | Next | Contents | Index | Glossary |
procedure Propagate_Role
(p_orig_system in varchar2,
p_orig_system_id in number,
p_attributes in wf_parameter_list_t,
p_start_date in date default null,
p_expiration_date in date default null);
Description
Synchronizes the information for a role from an application table with the WF_LOCAL_ROLES table and sets the user flag for the role to N. The role is identified by the specified originating system and originating system ID. The partition ID where the role's information is stored is set automatically depending on the originating system.
The role information to be stored in the WF_LOCAL_ROLES table must be provided in the WF_PARAMETER_LIST_T format. You can use the WF_EVENT.AddParameterToList() API to add attributes to the list. The following table shows the attributes that should be included in the list to populate the required columns in WF_LOCAL_ROLES. The standard LDAP attribute names should be used for these attributes.
Database Column | Attribute Name |
---|---|
NAME | [USER_NAME] |
DISPLAY_NAME | [DisplayName] |
DESCRIPTION | [description] |
NOTIFICATION_ PREFERENCE | [orclWorkFlowNotificationPref] |
LANGUAGE | [preferredLanguage] |
TERRITORY | [orclNLSTerritory] |
EMAIL_ADDRESS | [mail] |
FAX | [FacsimileTelephoneNumber] |
STATUS | [orclIsEnabled] |
EXPIRATION_DATE | [ExpirationDate] |
ORIG_SYSTEM | [orclWFOrigSystem] |
ORIG_SYSTEM_ID | [orclWFOrigSystemID] |
PARENT_ORIG_SYSTEM | [orclWFParentOrigSys] |
PARENT_ORIG_SYSTEM_ ID | [orclWFParentOrigSysID] |
OWNER_TAG | [OWNER_TAG] |
LAST_UPDATED_BY | [LAST_UPDATED_BY] |
LAST_UPDATE_DATE | [LAST_UPDATE_DATE] |
LAST_UPDATE_LOGIN | [LAST_UPDATE_LOGIN] |
CREATED_BY | [CREATED_BY] |
CREATION_DATE | [CREATION_DATE] |
For more robust code, you should always pass all of the listed attributes when calling Propagate_Role(). In this way you can avoid errors caused by trying to determine dynamically which attributes to pass.
Note: If a display name is not provided in the attribute list when the role record is first created in normal operating mode, this value is set by default to a composite value in the format <orig_system>:<orig_system_ID> in the role record in WF_LOCAL_ROLES. Additionally, if no notification preference is provided, the notification preference for the role record is set by default to MAILHTML, and if no status is provided, the status for the role record is set by default to ACTIVE.
You can also call Propagate_Role() in overwrite mode by including a special attribute named WFSYNCH_OVERWRITE with a value of 'TRUE'. In overwrite mode, if one of the following attributes is not passed or is null, the procedure sets the value of the corresponding field in WF_LOCAL_ROLES to null, deleting the previous value.
Note: The DISPLAY_NAME, NOTIFICATION_PREFERENCE, STATUS, ORIG_SYSTEM, and ORIG_SYSTEM_ID columns in the WF_LOCAL_ROLES table have a NOT NULL constraint, so these columns retain their existing values if you do not pass a value for the corresponding attributes, even if you are using overwrite mode.
The NAME column in WF_LOCAL_ROLES also has a NOT NULL constraint, and you cannot omit the USER_NAME attribute in any case because it is required for the API.
You can also call Propagate_Role() in overwrite mode by including a special attribute named WFSYNCH_OVERWRITE with a value of 'TRUE'. In overwrite mode, if any attribute is not passed or is null, the procedure sets the value of the corresponding field in WF_LOCAL_ROLES to null, deleting the previous value. Consequently, when you are using overwrite mode, you must pass values for all the attributes that you do not want to be null. Also, the NAME, DISPLAY_NAME, NOTIFICATION_PREFERENCE, STATUS, ORIG_SYSTEM, and ORIG_SYSTEM_ID columns in the WF_LOCAL_ROLES table have a NOT NULL constraint, so you must always pass the corresponding attributes for those columns when you are using overwrite mode. Otherwise, the procedure will fail and no update will take place.
Certain values, including the originating system, originating system ID, and expiration date, can be passed both as parameters for the Propagate_Role() API and as attributes within the attribute list parameter. These values are repeated in the attribute list because Propagate_Role() sends only the attribute list to the Entity Manager that coordinates LDAP integration, and not any of the procedure's other parameters.
to_char(<your date variable>, WF_ENGINE.Date_Format)
Oracle Workflow also provides two additional special attributes that you can use to specify how the role information should be modified.
Note: If you also pass a value for the p_expiration_date parameter, however, that value will override the DELETE attribute. Additionally, if the p_expiration_date parameter is null but you include the ExpirationDate attribute, that attribute value will override the DELETE attribute. In these cases the role will remain valid and active until the specified expiration date.
Note: In Oracle Applications, if an Oracle Human Resources person role with an originating system of PER_ROLE is propagated using Propagate_Role(), and that person is linked to an Oracle Applications user, then the procedure updates the corresponding user record with an originating system of PER in WF_LOCAL_ROLES, as well as the person record.
Arguments (input)
p_orig_system | A code that you assign to the directory repository that is the source of the role information. |
p_orig_system_id | The primary key that identifies the role in this repository system. |
p_attributes | A list of attribute name and value pairs containing information about the role. |
p_start_date | The date at which the role becomes valid in the directory service. |
p_expiration_ date | The date at which the role is no longer valid in the directory service. |
Previous | Next | Contents | Index | Glossary |