Monday, February 17, 2014

Basic Workflow for Leave management:

(A)   Basic Workflow for Leave management:

This section leads you through the creation of a test workflow process definition. The values you are instructed to use for Internal Names and Display Names are suggestions for the purpose of consistent references throughout the exercise. You can use different Internal or Display Names. However, Internal Names must have no spaces or colons (:) within them.  Also, an internal name cannot be changed after the object is created.
On the Windows client PC where The Builder has been installed:


Example
In this example a workflow demonstrating the approval process of leave request submitted by an employee has been created. (This is basic flow to understand the Workflow concepts for Beginner.)

Steps of creating The Workflow

    1.  Open Workflow Builder
            Select Start --> Programs --> Oracle for Windows --> Oracle Workflow Builder

    2.  Create a data store (or workspace) for your new process definition with the label 'Untitled'
            Select File --> New

    3.  Copy the Standard and system error Item Type into your new data store.

a.     Open WFSTD.WFT and WFERROR.WFT Files from your workflow home.
            Select File --> New -> Open -> Browse -> <Oracle Workflow Home>-> WF -> Data -> US

b.    Copy Standard and system error Item Type from Respective WFT files to your untitled
Close your WFT files Except 'Untitled' using
Select File --> Close Store
    4. Create a new item type in your data store.
        a. Right click the 'Untitled' data store, then choose 'New Item Type'
b. This opens a dialog box for the properties of your item type.

On the 'Item Type' tab:
            1. For 'Internal', enter XX_LEAVE
            2. For ''Display Name', enter XX_LEAVE
            3. For Description ‘XX_LEAVE’
            4. Click OK

Item Type Attributes

We accept the Start Date, End date, required approver name and requestor name from the user. So we create item type attributes for these parameters.

        a. Right click the “Attribute” then choose 'New Item Attribute
b. This opens a dialog box for the properties of your item type. 

 On the 'Attribute' tab:
            1. For 'Internal', enter XX_REQUESTOR
            2. For ''Display Name', enter XX_REQUESTOR
            3. For Description ‘XX_REQUESTOR
            4. Click OK

(Note: Similarly create attribute for Approver, Start Date and End Date (Keep Type as Date for start and End date))

Notification

To send message to Approver We have to create message and we need to attach this message to Notification.

1.     Message Creation:
       a. Right click the “Messages” then choose 'New Message
b. This opens a dialog box for the properties of your item type.
 On the ‘Message’ tab:
            1. For 'Internal', enter XX_LEAVE_APPLICATION
            2. For ''Display Name', enter XX_LEAVE_APPLICATION
            3. For Description ‘XX_LEAVE_APPLICATION’
            4. Click OK
On the ‘Body’ tab:
            In text Body Write some Description for Leave application

On the ‘’Result’ tab:
            1. For ''Display Name', enter RESULT
            2. for Description ‘RESULT
            3. For Lookup Type select Approval
            4. Click OK
(Note: You can use Attribute to populate values runtime use &<Attribute_name>)



2.     Notification:
a. Right click the “Notifications” then choose 'New Notification
b. This opens a dialog box for the properties of your item type


On the ‘Activity’ tab:
            1. For 'Internal', enter XX_LEAVE_NOTI
            2. For ''Display Name', enter XX_LEAVE_NOTI
            3. For Description ‘XX_LEAVE_NOTI
            4. Attached message created in previous step by selecting it from drop down list.
            5. For Result Type Select Approval from lookup list.
            6. Click ‘OK’


On the ‘Node tab:
1.     For Performer
a.     Type ‘Item Attribute’
b.     Value ‘XX_approver’
          2. Click ‘OK’

Now we have to create actual Process:
           
   3.     Process:
a. Right click the “Processes” then choose 'New Process’
b. This opens a dialog box for the properties of your item type


On the ‘Activity’ tab:
            1. For 'Internal', enter XX_LEAVE
            2. For ''Display Name', enter XX_LEAVE
            3. For Description ‘XX_LEAVE’
            4. Click ‘OK’

Build your test workflow process definition:

        a. Expand the 'Standard' item type by clicking the '+' beside it
        b. Under the 'Standard' item type, expand 'Functions' by clicking the '+' beside it
        c. Under 'Functions' for the 'Standard' item type
 1.  Select the 'Start' function, then drag and drop it into the diagram window (Visible when u double click on                                       Process)
            2. Right click on the 'Start' icon in the diagram window and choose properties.  This opens a dialog box for
                The properties
               Of the function
            3. on the Node’ tab:
               For 'Start/End', click the drop-down menu and select 'Start'
            4. Click OK
         d. Under 'Functions' for the 'Standard' item type (Use two End function to end with different result)
            1. Select the 'End' function, then drag and drop it into the diagram window
            2. Right click on the 'End' icon in the diagram window and choose properties.  This opens a dialog box for
                The   properties
               Of the function.
            3. on the ‘Node’ tab:
               For 'Start/End', click the drop-down menu and select 'End'
a.     Click OK

.  Under 'Notifications' for your 'Untitled' item type
               Select the ’ XX_LEAVE_NOTI’, then drag and drop it into the diagram window
         Within the diagram window:
            1. Right-click on the 'Start' icon and drag a line over to the XX_LEAVE_NOTI icon
            2. Right-click on the XX_LEAVE_NOTI icon and drag a line
               Over to the 'End' icon one for Approve and another for reject.


Now compile your Workflow using  button and save it in data Base.



No comments:

Post a Comment