Setting Up an Oracle Workflow Directory Service
Oracle Workflow offers you flexibility in defining who your workflow users and roles are. You determine the directory repository you want Oracle Workflow to reference for users and roles information by creating three views based on the database tables that make up that repository. The views are: WF_USERS, WF_ROLES, and WF_USER_ROLES.
In addition, Oracle Workflow provides three local tables called WF_LOCAL_USERS, WF_LOCAL_ROLES, and WF_LOCAL_USER_ROLES which you can use to add information about users and roles not included in your existing directory repository.
Note: Currently you must use SQL*PLUS or create your own custom application interface to enter data into these WF_LOCAL tables.
WF_USERS
The WF_USERS view should reference information about all the individuals in your organization who may receive workflow notifications. Create this view, making sure it contains the following columns:
- Name--The internal name of the user as referenced by the Workflow Engine and Notification System. For example, an internal name for a user can be mbeech or 009, where 009 represents the user's employee ID.
Attention: The Name column must be sourced from a column that is less than 30 characters long and is all uppercase. If your source table does not have a column that meets these criteria, DO NOT use string functions to force these restrictions. Instead, define the Name column to be <orig_system>:<orig_system_id> so that Oracle Workflow can reference the original base table where users are stored and a unique user in that table. For example, "PER_PEOPLE:009" represents a user whose employee ID is 009 and is stored in the personnel table called PER_PEOPLE.
- Display_Name--The display name of the user. An example of a display name can be 'Beech, Matthew'.
- Description--An optional description of the user.
- Notification_Preference--Indicate how this user prefers to receive notifications. A value of MAILTEXT or MAILHTML allows users to receive and respond to notifications by E-mail or by E-mail with HTML attachments, respectively. A value of QUERY allows users to query notifications from the Notifications Web page or Notification Viewer form. Finally, a value of SUMMARY allows users to get periodic E-mail summaries of their open notifications. However, to respond to the individual notifications, they have to query the notification from the Notification Web page or Notification Viewer form. See: Overview of Notification Handling.
Note: A notification preference of MAILTEXT or MAILHTML also allows users to query their notifications from the Notifications Web page or Notification Viewer form.
- Language--The value of the Oracle7 NLS_LANGUAGE initialization parameter that specifies the default language-dependent behavior of the user's notification session. Refer to your Oracle7 user's guide or installation manual for the list of supported language conventions.
- Territory--The value of the Oracle7 NLS_TERRITORY initialization parameter that specifies the default territory-dependant date and numeric formatting used in the user's notification session. Refer to your Oracle7 user's guide or installation manual for the list of supported territory conventions.
- Email_Address--A valid electronic mail address for this user or a mail distribution list defined by your electronic mail system.
- Fax--A Fax number for the user.
- Orig_System--A code that you assign to the directory repository that this view is based on. For example, if this view is based on the personnel data stored in a Human Resource Management System, Orig_System can be defined as PER.
- Orig_System_ID--The primary key that identifies the user in this repository system. For example, Orig_System_ID can be defined as the value stored in a column called PERSON_ID in a Human Resources database table called PER_PEOPLE.
- Status--The availability of the user to participate in a workflow process. The possible statuses are: active (ACTIVE), unavailable for an extended period (EXTLEAVE), permanently unavailable (INACTIVE), and temporarily unavailable (TMPLEAVE). These statuses are also stored in the lookup type called WFSTD_AVAILABILITY_STATUS.
WF_ROLES
The WF_ROLES view should reference information about all the roles in your organization who may receive workflow notifications. Create this view, making sure it contains the following columns pertaining to the roles in your repository, similar to those described for WF_USERS:
Attention: We require that you also define each user identified by WF_USERS as a role.
Note: If a user is a member of a role and the user information is different from the role information, the role information will override the user information when the Notification System delivers a notification to the role. For example, suppose a user has a notification preference of 'SUMMARY', and the user is also a member of a multi-user role, whose notification preference is 'MAILHTML'. When a notification is assigned to the multi-user role, the user will receive a single notification message addressed to the role, as opposed to a summary message that includes that notification in it.
Attention: The Name column must be sourced from a column that is less than 30 characters long and is all uppercase. If your source table does not have a column that meets these criteria, DO NOT use string functions to force these restrictions. Instead, define the Name column to be <orig_system>:<orig_system_id> so that Oracle Workflow can reference the original base table where roles are stored and a unique role in that table. For example, "PER_POSITION:009" represents a position whose ID is 009 and is stored in the personnel table called PER_POSITION.
WF_USER_ROLES
The WF_USER_ROLES view is an intersection of the users and roles in WF_USERS and WF_ROLES. Create this view, making sure it contains the following columns:
- User_Name--The internal name of the user as listed in the view WF_USERS.
- User_Orig_System--A code that you assign to the user directory repository as listed in the view WF_USERS.
- User_Orig_System_ID--The primary key that identifies the user in the user directory repository as listed in the view WF_USERS.
- Role_Name--The internal name of the role as listed in the view WF_ROLES.
- Role_Orig_System--A code that you assign to the role directory repository as listed in the view WF_ROLES.
- Role_Orig_System_ID--The primary key that identifies the role in the role directory repository as listed in the view WF_ROLES.
Attention: To take advantage of unique indexes when querying users, make sure you initially enter the usernames in your database in uppercase only. Forcing the usernames to uppercase in your view definition results in poor performance when accessing these views.
Warning: Avoid making a join to a view that contains a union as this results in poor database performance. Oracle7 is currently unable to preserve the indexes in that view when you make such a join. The workflow directory services views you create will most likely contain unions, therefore you should not join to them directly. If you need to retrieve data from any of the three directory services views, use the appropriate directory services API. See: Workflow Directory Services APIs.
See Also
Predefined Directory Services