Solved

Oracle Workflow Cartridge

Posted on 1998-12-16
1
2,068 Views
Last Modified: 2008-03-06
Hi

Does anybody know from where can I get detailed information about Oracle Workflow  Cartridge?

 Thanks,
 Timur
0
Comment
Question by:timurt
1 Comment
 
LVL 3

Accepted Solution

by:
junfeb earned 50 total points
ID: 1083123
HEre's a bulletin on Workflow cartridges -
Overview
--------

This document describes how to install/configure Workflow 2.0.2 Embedded
within Oracle Applications and Workflow 2.0.3 Cartridge (Standalone).  This
document is not comprehensive in nature.  Therefore, you should read Oracle
Workflow 2.0.2 and Oracle Workflow 2.0.3 Cartridge Guides for a complete
understanding.  

Workflow documentation is available on MetaLink using the following
navigation path:

   Applications > Applications Core Technology > Oracle Workflow

From here, you may select:
   
   o Product Documentation
   o Release Notes
   o Install Manuals

The workflow process created in this document allows you to test your
notification mailer, notification web page, and notification monitor.  
These instructions are for Sun SPARC Solaris.  Other platforms may be
different; however, the concepts demonstrated are the same regardless
of the platform.  Read this document in conjunction with the Workflow
Installation Notes.


Contents
--------

I.    Workflow Definition
II.   Process Components of Workflow
III.  Differences Between Embedded and Standalone Workflows
IV.   Workflow Directory Services
V.    Workflow Installation
      A.  Workflow 2.0.2 Embedded
      B.  Workflow 2.0.3 Cartridge
VI.   Notification Mailer
      A.  Configuring
      B.  Running
      C.  Testing
VII.  Workflow Builder
VIII. Notes
IX.   References



I.  Workflow Definition
-----------------------

Workflow is a tool which provides a way to design, monitor, and respond to
business processes.  In general, a process is a series of activities that
must be completed to reach a desired end.  

Workflow contains the following major components:

1.  Workflow Builder:  This is a client-side GUI application that allows you
    to create, view, or alter a workflow process.  The Oracle Workflow
    Builder is installed on a PC.  Workflow processes designed with the
    Builder can either be saved as flatfiles (.wft files) or saved to the
    database residing on another server via a SQL*Net connection to that
    server.  

    Note:  Workflow processes that have been saved as flatfiles can later be
           saved to the database as well.  A process must be saved in the
           database in order for the Workflow Engine to manipulate it.

2.  Workflow Engine:  This is embedded within the Oracle 7 server.  It is
    responsible for monitoring activities and updating their status so the
    next activity can be initiated.

3.  Notification System:  This delivers and processes notification messages
    informing you that something needs to be done or is being done.  It uses
    the notification mailer and/or the notification web page.

4.  Workflow Monitor:  This is a JAVA based application allowing you to see
    what activity a workflow process is on at the moment.


II. Process Components of Workflow
----------------------------------  

Following are the two major components used to create a workflow process in
the workflow builder to save in the database:

   o Data Store:  This is the 'container' that stores Item Types.

   o Item Type:  This is stored in a database and contains the actual
     workflow processes, activities, functions, and attributes.  Refer
     to the Workflow Guides glossary for definitions of workflow process
     components.


III. Difference Between Embedded and Standalone Workflows
---------------------------------------------------------

Workflow Embedded within Oracle Applications is installed against a database
running Applications; Workflow Standalone is not.  Therefore, the Embedded
Workflow files exist under $FND_TOP.  The Standalone Workflow files exist
under a wf directory located under ORACLE_HOME.

Note:  Workflow files include the following:

       o SQL scripts to install the product
       o SQL scripts start workflow processes
       o configuration files
       o program executables
       o predefined workflow item types (.wft files)
       o troubleshooting scripts


IV. Workflow Directory Services
-------------------------------

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 views
based on the database tables that make up that repository.  

Each Workflow process requires a user or group of users to perform certain
tasks required to complete an activity.  A user or group of users can be
assigned a role, and an activity in the process can reference that role as a
performer of the task.  

Oracle Workflow Embedded within Applications makes use of users and
responsibilities for roles as defined by FND_USERS (or FND_WEB_USERS if
Oracle Self Service Web Applications is installed).  

Oracle Workflow Standalone can use native Oracle users.  

Following are the important tables and views associated with Directory
Services:

 o Tables:  WF_LOCAL_USERS       These tables can be used to add information
            WF_LOCAL_ROLES       about users and roles not included in your
            WF_LOCAL_USER_ROLES  existing directory repository.

 o Views:   WF_USERS             Users receiving notifications
            WF_ROLES             Roles in database receiving notifications
            WF_USER_ROLES        Intersection of previous views

Oracle Workflow Embedded in Applications has defined all of the various
Application responsibilities, such as Application Developer or GL Super User,
as workflow roles.  Therefore, when a process requires a role, and a role
such as Application Developer is assigned to that activity as a performer,
all Application users assigned to that responsibility are in that role.  
This feature is helpful for notification activities.  

Oracle Workflow Standalone requires you to create your own Directory Service.

For additional information on Directory Services, refer to the "Oracle
Workflow Guide Release 2.0.3", pages 2-7 through 2-12.


V.  Workflow Installation
-------------------------

A.  Workflow 2.0.2 Embedded within Oracle Applications

Refer to the installation notes available on MetaLink for information on
exact instructions to install Workflow 2.0.2 Embedded within Applications,
(A51731-01).

B.  Workflow 2.0.3 Cartridge (Standalone)
    -------------------------------------

Refer to the installation notes available on MetaLink for information on
exact instructions to install Workflow 2.0.3 Cartridge (Standalone),
(A61295-01).

Note:  The following steps may be used when performing an installation.
       However, it is important that you refer to the installation notes
       referred to above for exact instructions.

1.  If you do not already have a database on your server machine, install  
    7.3.3 or higher.  You can have a separate tablespace and index for
    Workflow 2.0.3.  Creating a database involves creating an environment
    file (.env), creating an init<SID>.ora file, and running a create
    database script.  

    The following is an example of an environment file.  This example uses
    csh, but this is not necessary.

      .ENV FILE

      setenv ORACLE_HOME /u06/oracle/prod/7.3.3.5
      setenv ORACLE_SID JROCK203
      set path=($path $ORACLE_HOME/bin)
      setenv LD_LIBRARY_PATH /usr/openwin/lib;/usr/ucblib:$ORACLE_HOME/lib
      setenv ORA_NLS33 $ORACLE_HOME/ocommon/nls/admin/datad2k
      setenv NLS_LANG AMERICAN_AMERICA.WE8ISO8859P1

    Note:  Workflow 2.0.3 Cartridge (Standalone) does not have an APPL_TOP.  
           Instead it has a wf subdirectory under your ORACLE_HOME.
           Therefore, you do not have to set APPL_TOP in your .env file.

2.  Run the create database script.

3.  Create a workflow user in the database.  For example, issue the following
    commands from SQL*Plus, logged in as system:

        SQL> create user wf203 identified by wf203;
        SQL> grant connect, resource to wf203;

4.  Install Oracle Web Application Server 2.1 or 3.0.1 or higher.  These
    instructions are for a 2.1.1 Oracle Web Application Server.  Follow the
    instructions for installing a web server documented in the "Oracle
    Workflow Cartridge Server Installation Notes (Release 2.0.3)".  As an
    academic exercise, it is beneficial to install the Web Server on your
    Windows NT PC.

5.  Copy the Workflow tar file on the Workflow CD to a staging area:
       
        cp <CD_ROM>/wf/server/wfserver.tar /whatever

6.  Untar the wfserver.tar file:

        tar xvf wfserver.tar

    The staging area, /whatever/wfstage, has an orainst directory, two
    unix.prd files, and a wf directory.  The orainst directory contains all
    of the files needed for Oracle Installer.  The wf directory has all of
    the Workflow Product Files.  The Workflow files are moved from the
    staging area to the area specified by the Oracle Installer.

7.  Run the Oracle Installer by following the prompts.

8.  Edit the $ORACLE_HOME/wf/res/US/wfcfg.msg according to the install notes.


VI. Notification Mailer
-----------------------

The Notification System is responsible for sending a message to an individual
(a user belonging to one role) or a group of individuals (several users
belonging to the same or a different role).  The message communicates that
something needs to be done.  

This notification can be an e-mail and/or part of the notification web page.  
The mechanism that assists in sending, receiving, and processing e-mail
notifications is the Notification Mailer.

This section contains information to configure, run, and test the notification
mailer.  Although it contains useful information, note that it is not a
complete reference.  Therefore, it does not replace the Workflow 2.X Guide.

A.  Configuring

Perform the following steps to configure the notification mailer.  This
procedure is based on UNIX sendmail.

1.  Create a UNIX account to serve as the account that workflow e-mail
    notifications contact when sending and receiving e-mail.  You can use
    an existing UNIX account, but we recommend that you create a new UNIX
    account on the server machine hosting the Oracle Applications database.

2.  Configure the notification mailer configuration file, wfmail.cfg.  
    Configuration files for Workflow are located under $FND_TOP/resource.  
   
    The wfmail.cfg informs the notification mailer, an executable named
    WFMAIL (located under $FND_TOP/bin), how to connect to the database (in
    order to update/see notification activity status).  It also informs the
    notification mailer where to find the mail spool files for processing
    mail.  The Workflow 2.X Guide describes all of the wfmail.cfg parameter
    files.  
   
    The following example wfmail.cfg file may be used as a reference:

       # $Header: wfmail.cfg 20.4 96/11/08 13:55:08 schang ship $
       # Workflow Mailer Configuration File
       #   All parameters are optional unless otherwise noted
       #   Some have default values if left unspecified
       #   Fill in all parameters according to site requirements
       #

       #
       # System Configuration
       #

       # Database Login Information
         CONNECT=apps/apps@sid

       # Mail Account: mail account to send and receive mail from (required)
       # CHANGE THIS!
         ACCOUNT=/var/mail/webmgr

       # From: value of the from field in the header of mail message sent
       #       by the Oracle Workflow Mailer
         FROM=Oracle Workflow

       # Mailer Node name: name to identify this mailer (required)
         NODE=wf

       # Send Notification Summary Only
         SUMMARYONLY=N

       # Idle time: time to wait between polling for new work (seconds)
         IDLE=30

       # Shutdown request file: when this file is detected, the mailer exits
         SHUTDOWN=shutdown

       # Fail command: os command to run when exiting with error
       # FAILCOMMAND=echo "Mailer has exited"

       # Debug mode: turns on extra debugging output
         DEBUG=N

       # Test Address: routes outgoing mail to the indicated address
                       (for testing)
       # TEST_ADDRESS=webmgr@us.oracle.com

       #
       # Send Configuration
       #

       # Reply To email address: email address that responses should go to
       # REPLYTO=<none>

       # HTML Web Agent path: (required for mailed html support)
       # CHANGE THIS!
         HTMLAGENT=http://jrock-pc.us.oracle.com:2000/sid/owa

       # HTML Attachment file: used a as the filename when attachment is saved
         HTMLFILE=attach.html

       # HTML Attachment desc: description of attachment type
         HTMLDESC=HTML

       # HTML Attachment type: numeric attachment code (oracle office)
       # HTMLTYPE=10003

       #
       # Respond Configuration
       #

       # Discard Folder: folder in which unrecognized incoming mail is placed
       # (leading '-' truncates folder on startup)
         DISCARD=-discard

       # Processed folder: folder in which successfully processed mail is
                           placed
         PROCESS=processed

       # Unprocessed folder: folder in which mail awaiting processing is
                             placed
         UNPROCESS=unprocessed

       # Response Tag file: file for response routing (optional)
       # CHANGE THIS!
         TAGFILE=/orappl/prod/10.7/w1070161/fnd/6.1.1/resource/wfmail.tag

     The CONNECT parameter above represents the Applications username/password
     and alias in the tnsnames.ora file to the instance.  The ACCOUNT parameter
     is the absolute path to the mail spool file for the UNIX account workflow.
 
     Discard, Processed, and Unprocessed are mail spool files automatically
     created when the notification mailer is started and running.  

     Note:  The wfmail.cfg file for Oracle Workflow Cartridge is similar to
            that above.  The connect field, however, does not contain
            apps/apps.  Instead, it contains the workflow database account
            you created earlier (Section V, Step 3 of the Workflow Install-
            ation).  

B.  Running

The notification mailer can be started from the command line or from within
Oracle Applications.  The latter method is recommended.  However, running
the notification mailer executable from the command line is a good debugging
tool to see what it is doing.  If you decide to do this, go to the /var/mail
directory and issue the following command from the workflow notification
account which was created earlier:

   WFMAIL apps/apps 0 Y $FND_TOP/resource/wfmail.cfg &

Run the notification mailer by submitting its concurrent program 'FNDWFMAIL'
as a Standard Report Submission (SRS).  The following navigation paths assume
character mode for Oracle Applications, but the GUI (SmartClient) paths are
similar:

1.  Find and configure the notification mailer concurrent program.  As the
    System Administrator responsibility, /Navigate Concurrent Program Define.  
    Query on the short name of the concurrent program, FNDWFMAIL.  Make
    certain that the Standard Submission and Enabled fields are set to Yes.

2.  Tab to the Concurrent Program Details screen.  Select the Parameters
    option.  Define a parameter for the concurrent program that points to
    the wfmail.cfg file.  Therefore, each time the concurrent program is run,
    the parameter wfmail.cfg is automatically populated in the run reports
    form.  

3.  Ensure the form contains the following information:

    Application:  Application Object Library
    Name:  Notification Mailer
    Sequence:  1
    Name:  Configuration file    
    Description:  File containing notification mailer parameter settings.
    Enabled:  Yes
    More:  Yes

4.  Move to the next zone in that form.  Ensure that the Parameter Detail
    zone contains the following information:

    Value Set:  FND_CHAR240
    Description:  240 characters,... (this should already be populated)
    Required:  Yes
    Enable Security:  No
    Display:  Yes
    Range: <blank> (nothing is entered here)
    Default Type:  Profile
    Default Value:  WF_MAIL_CONFIG_FILE
    Display Size:  30
    Description Size:  50
    Concatenated Description Size:  25
    Prompt:  Configuration File
    Token: <blank> (nothing is entered here)

5.  Save your changes.

6.  Create a site profile for the path to the wfmail.cfg file by going to:

       /Navigate Profile System

7.  Ensure the profile contains the following information:

    Level:  Site
    Name:  <Your machine name> (should be populated automatically)
    Option:  Workflow Mailer Configuration File
    Value:  /oraappl/prod/10.7/w1070161/fnd/6.1.1/resource/wfmail.cfg

8.  Save your changes.

9.  Register the FNDWFMAIL concurrent program with a report security group by
    going to /Navigate Security Responsibility Report Groups.  Refer to the
    "Oracle Applications System Administration Manual" for information on how
    to add a program to a report security group.

When you start the notification mailer from the run reports form
within Applications, an unprocessed mail spool file is placed under
the log directory that houses your log directories.  For example,
$FND_TOP/log could be the directory.  The notification mailer stays
in a normal running state until it is stopped.  

To stop the notification mailer, place a shutdown file (an empty
file named shutdown) in the directory that houses the unprocessed,
processed, and discard mail spool files.  This is very important for
backup purposes.  For database backup, you may have a cron job (script
running in background) touch a shutdown file in the appropriate directory
before the concurrent managers are brought down each night.  

Note:  For Oracle Workflow Cartridge, if you are using UNIX sendmail, the
       directory where the notification mailer starts contains the discard,
       processed, and unprocessed spool files.  Use the following syntax to
       start the notification mailer:
       
          wfmail.snd -f $ORACLE_HOME/wf/res/wfmail.cfg &

C. Testing

It is possible to run an initial test to see if the notification mailer is
working.  When you begin to define your own workflow process, however, you
need to create a notification activity to fully test the functionality
of the notification mailer.  

Perform the following steps to run the initial test:

1.  Start the notification mailer from the Run Reports form.

2.  Go to the appropriate log directory and look for the unprocessed mail
    spool file.

3.  Issue the following command to see if the notification mailer
    executable is running:

       ps -ef | grep -i wfmail
   
4.  Send an e-mail message to the workflow account created earlier and watch
    the message go from /var/mail/webmgr to a discard mail spool file.  The
    body of the message can have anything in it.  When a notification reply
    (e-mail) is sent to the notification account as part of an actual
    workflow process, it contains a notification ID (NID).  

The notification mailer scans /var/mail/webmgr for any new messages.  If
it finds one with a NID, it places it in the unprocessed file.  It makes
a connection to the database where the notification activity is updated,
and the mail message moves from the unprocessed to the processed mail
spool file on the file system.
 
In this case, however, you have not defined a notification activity in
a workflow process.  Therefore, the notification mailer considers the
message junk and moves it to the discard mail spool file.  This is another
good reason to have a separate UNIX account for the notification mailer.


VII. Oracle Workflow Builder
----------------------------

The Workflow Builder designs a sample workflow process to test the
notification system and monitor.

Install Oracle Workflow Builder on your PC and Oracle Web Application Server.  
They are 32-bit applications, so you need an entry in your Orant or Orawin95
directory to the database that has Workflow installed.

To create an Item Type which contains your sample workflow process and also
allows you to test your notification system and Workflow Monitor, perform the
following steps:

1.   Open the Workflow Builder and select File, then New.  This creates
     a data store called Untitled.  A data store can be thought of as a
     container for an item type.
2.   Select File then Open.
3.   Click the Database radio button and enter the username of the database
     user (apps in this case).
4.   Enter the password for the user and then the appropriate connect string
     (this value depends on your tnsnames.ora file for the Workflow Builder).
5.   Select the Standard Item Type and click Show.
6.   Drag the Standard Item Type onto the Untitled data store folder.
7.   Highlight the database connection that has the Standard Item Type and
     select File, then Close Store.

     Note:  At this point, the Standard Item Type has been copied to your
            data store.

8.   Right click on the untitled data store and select New Item Type.
9.   Give the Item Type:

       o an internal name (your application userid)
       o a display name (anything you want)
       o a description (anything you want)

10.  Select Apply then OK.

     Note:  The untitled data store contains two item types:
            a.  A Standard Item Type  
            b.  Your Item Type

11.  Expand the item type just created and right click on the Message icon.
12.  Select New Message and enter an Internal Name and Display Name for the
     Message.
13.  Select the Body tab and enter a Subject line.  Enter text in the message
     body.
14.  Select Apply then OK.
15.  Right click on the Notification icon and enter the following:

       o Internal Name
       o Display Name
       o Description

16.  Select None for the result type.
17.  Select the Message created earlier.
18.  Select Apply then OK.
19.  Right click on the Process icon and enter an Internal and Display Name,
     as well as a Description.
20.  Select None for the result type.
21.  Select Apply then OK.
22.  Double click on the Process Icon.

     Note:  The Process Diagram window now opens with the name of the process
            in the title bar.

23.  Expand the Standard Item Type.
24.  Expand the Functions icon under the Standard Item Type.
25.  Drag the Start icon and End icon into the Process Diagram Window.
26.  Drag the Notification Activity icon located under your item type
     into the Process Diagram Window.
27.  Right click on the Start icon and select Start for Start/End.
28.  Select Apply then OK.
29.  Right click on the End activity and Select End for Start/End.
30.  Select Apply then OK.
31.  Right click and drag a line from the Notification Activity to the End
     Activity.
32.  Right click and drag a line from the Start Activity to the Notification
     Activity.
33.  Select File then Save As.  
34.  Select the radio button for Database.  

     Note:  At this point, you receive a message that the Workflow is invalid
            because the notification does not have a role associated with it.  
            Save the workflow process to the database first in order to unload
            roles from the database.

35.  Connect to the database and load your item type that was just uploaded.
36.  Double click on the Process icon.
37.  Select File then Load Roles from Database.
38.  Load your Workflow Role.
39.  Double click on the Notification icon in the process diagram window.
40.  Select your Role in the Role field.
41.  Enter Normal for the Start/End field.
42.  Select Apply then OK.
43.  Select File then Save.

The workflow process is now complete.


VIII.  Notes
------------  

o Configure the Workflow Monitor according to the install notes.

o Configure the Web Server security according to the install notes.  
  Make username and password the same as your workflow database account.

o If you are not using Oracle Self Service Web Applications, then you
  must install Web Server Security.  

  Run wfsecwsb.sql under $FND_TOP/patchsc/107/sql.

o The Web Notification page relies on the user authentication feature of
  the Web Server.  You must protect the URL that generates the worklist
  so that users are required to enter a username and password before
  gaining access.  This username is used by the worklist procedure to
  produce the correct list.

o Protect the Database Connection Descriptor (DCD) by performing the
  following steps:

    1.  Connect to the Web Server Administrator Page.
    2.  Click on the 'Oracle Web Listener' link.
    3.  Click on 'Configure' for the appropriate listener.
    4.  Click on 'Security:  Access Control and Encryption'.
    5.  Fill in Basic usernames and passwords.
    6.  Assign the users to a group.
    7.  Assign the group to a realm 'Workflow'.
    8.  Press 'Modify Listener'.
    9.  Back out to the Listener Administration Page.
   10.  Click on 'Web Request Broker'.
   11.  Add the following line to the 'Protecting Applications' section:

        Virtual Path      Basic/Digest          Realm
         /<DCD>/owa          Basic             Workflow

   12.  Restart the listener.

o Start your workflow process by using the wfrun.sql script.  View the
  script to determine the parameters to send to it.

o The Notification Web page is viewable by going to:

    http://yourhost.us.oracle.com:portid/<DCD>/owa/wfa_html.worklist

o The Workflow Monitor Site is viewable by going to:

    http://yourhost.us.oracle.com:portid/<DCD>/owa/wf_monitor.find_instance


References
----------

PR:1011262.102  Oracle Workflow Setup Step for Workflow Monitor and
                Oracle Workflow Web

PR:1011345.102  TEST FOR WORKFLOW NOTIFICATION MAILER NOT CORRECT -
                HOW TO TEST
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now