WF_USER_ROLES

Nel documento Oracle WorkflowGuide r (pagine 63-68)

Setup Steps

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. The Oracle database server is 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: page 8 – 121.

Predefined Directory Services

Oracle Workflow provides scripts for you to implement any one of three directory service environments. If you are using the version of Oracle Workflow embedded in Oracle Applications you automatically:

• Integrate your Oracle Workflow directory service with a unified Oracle Applications environment.

If you are using the standalone version Oracle Workflow, you can choose to implement one of the following two directory services or create your own:

• A directory services with native Oracle users.

• A directory services with local workflow users.

You can customize any of these directory services environments further by editing and rerunning their scripts against your Workflow Server.

Attention: If you create your own directory service or edit any of the predefined directory services listed above, you should run the script wfdirchk.sql to validate your directory service data model. The script is located on your server in the Oracle Workflow admin/sql subdirectory for the standalone version of Oracle Workflow, or in the sql subdirectory under

$FND_TOP for the version of Oracle Workflow embedded in Oracle Applications. See: Wfdirchk.sql: page 16 – 10.

" Integrating Oracle Workflow Directory Services with a Unified Oracle Applications Environment

If you are using the version of Oracle Workflow embedded in Oracle Applications, your Oracle Workflow directory service views are automatically based on a unified Oracle Applications environment.

The unified environment maps over Oracle Human Resources tables, Oracle Application Object Library tables, various Oracle Applications tables, and the WF_LOCAL tables.

Oracle Workflow provides a sql script that defines the WF_USERS, WF_ROLES, and WF_USER_ROLES views that map to this unified environment. When you install Oracle Applications, you automatically install this script to create the unified environment. However, if you should need to edit and rerun this script for whatever reason, the script is called wfdirhrv.sql and is located on your server in the admin/sql subdirectory under $FND_TOP.

Aside from the users and roles stored in WF_LOCAL_USERS and WF_LOCAL_ROLES, the default notification preference for all workflow users and roles in the unified environment is set to

’MAILHTML’.

" Integrating Oracle Workflow Directory Services with Native Oracle Users

If you plan to use the standalone version of Oracle Workflow, you can map your directory service to the native users and roles in the Oracle RDBMS. You base your views on the tables DBA_USERS,

WF_LOCAL_USERS, DBA_ROLES, and WF_LOCAL_ROLES.

Oracle Workflow provides a script you can use to setup the views. Use the wfdirouv.sql script in the Oracle Workflow sql subdirectory on your server. This script is automatically run by the Oracle Universal Installer when you install the standalone version of Oracle Workflow.

You can customize and rerun this script if necessary. The script creates three views.

The WF_USERS view creates a workflow user for each DBA user and any users stored in WF_LOCAL_USERS. For each DBA user, the originating system is called ORACLE, and the originating system ID is the USERNAME column in DBA_USERS. The default notification preference for each DBA user is MAILHTML.

The WF_ROLES view includes all users in the WF_USERS view, all roles defined in the WF_LOCAL_ROLES table, and all roles in DBA_ROLES, where role_name begins with WF. For each DBA role, the originating system is ORACLE and the originating system ID is the ROLE column in DBA_ROLES. The default notification preference for each DBA role is MAILHTML.

The WF_USER_ROLES view consists of the names and originating system information of both users and roles in WF_USERS and WF_ROLES.

Note: The wfdirouv.sql script sets each native Oracle user’s e–mail address to the user’s respective username. As a minimal setup step, you should edit the wfdirouv.sql script to either link your native Oracle users to an existing mail directory store through the WF_ROLES view definition, or, if the usernames and e–mail account names match, then simply add the domain for your organization, such as ’@oracle.com’, to the usernames in the WF_USERS view definition. Typically, the columns that you change are EMAIL_ADDRESS in WF_USERS and EMAIL_ADDRESS in WF_ROLES.

" Integrating Oracle Workflow Directory Services with Local Workflow Users

If you plan to use the standalone version of Oracle Workflow and the users and roles of your directory repository are not stored in any existing database tables, you can enter your users and roles information in the WF_LOCAL tables and map your directory service to these tables.

Oracle Workflow provides a script you can use to set up the views.

Use the wfdircsv.sql script in the Oracle Workflow sql subdirectory on your server. This script creates three views. You can customize the views in this script to incorporate the users and roles from your custom directory repository.

Attention: If you want to implement Oracle Internet Directory (OID) integration for the standalone version of Oracle

Workflow, you must run the wfdircsv.sql script to ensure that your directory service views are mapped only to the

WF_LOCAL tables, because only the WF_LOCAL_USERS table

will be synchronized with OID. (Only users are maintained through OID, not Workflow roles.) In this case, you must not customize the script to incorporate any other tables. After implementing OID integration, you maintain your user information only through OID. See: Synchronizing Workflow Directory Services with Oracle Internet Directory: page 2 – 30.

The originating system in the WF_USERS view is called WF_LOCAL_USERS, and the originating system ID is 0.

The WF_ROLES view includes all users in WF_LOCAL_USERS and all roles defined in WF_LOCAL_ROLES. The originating system is WF_LOCAL_ROLES and the originating system ID is 0.

The WF_USER_ROLES view consists of the names and originating system information of both users and roles in WF_USERS and WF_ROLES.

Step 4 Synchronizing Workflow Directory Services with Oracle Internet

Nel documento Oracle WorkflowGuide r (pagine 63-68)