Tuesday, February 16, 2010

USING WF ATTRIBUTES (Variables)


Every program needs variables at different stages of programming.


In WF also we can define variables of various data type. (Date, Text, Number to name a few)


To create new Attribute, right click on Attributes in Navigator > select “New Attribute”


image001


In all our messages we used an attribute named “REQ_NUM”


Define REQ_NUM as shown below,


image002




READING ATTRIBUTE VALUES RUNTIME



&<VARIABLE_NAME> : will return value of the variable at run time. (Example &REQ_NUM in our case)


VIMP: In Order to use any variable(Attribute) in message body,


Once the variable is defined, drag and drop the Variable from Attribute section to Message section as shown below.


If you want to read values of 10 different attributes in message body, you will have to drag and drop all those 10 variables from ATTRIBUTE section to appropriate Message in which you are using these variables as a part of message body.


image003

Monday, February 1, 2010

DEFINE WF COMPONENTS


DEFINE WORKFLOW COMPONENTS
To create any of the workflow component,
            In NAVIGATOR (left side of workflow builder) right click on any component you wish to define and
select “New ” , see examples below.



Lets recall the components required for our case.
·         Two “Notification” for sending notification to Approver to get his approval and to the employee in case of rejection of his requisition
·         Two “Messages” which will have the actual body/text of message to be conveyed to Approver and employee
·         One “Lookup” for the two options namely Approve and Reject
·         One “Function” for calling the procedure/function that will record requisition detail data in both the cases

NOTE: Every Notification is associated with its corresponding message

STEP 1
We will start creating a Notification and message for APPROVER.
  1. In Navigator Right Click on Notification and select “New Notification”, a property box will open
  2. Give name as per your business conventions        
  3. Give Result Type as “Approval” (this will automatically set the notification to have Approve/Reject option)
  4. Message field will have the corresponding Message name which we will define in following steps


STEP 2 Define Message

  1. In Navigator right click on Message, select New Message
  2. In property box fill in details in “Message” and “Body” tab as follows and click OK.



  1. This will create a message for approver now the next step is to associate this message with notification.
  2. In navigator right click on notification and select Properties, it will open Property Panel for it.
  3. Select “Message for Approver” from drop down box of Message as shown below



Now go ahead and create two more messages and two notifications for customer which will be sent in case of Approval and Rejection of withdrawal by manager.

First the Messages

 
 


Now define the Notifications and associate respecting Messages created above with it.


 


 

WF DESIGN

WF DESIGN
Lets get started with our WF Process design.

I. Start WF Builder either by



OR type “WFBLDR” in Start >> Run
Workflow Builder will open.

Following screen shot is just to make you familiar with the look and feel of various workflow builder components.


S START WORKFLOW DESIGN
Select File >> Quick Start Wizard from Menu




You can change the Name information as per your requirement and then click OK.
A New Process with just a START and END activities will be left open as shown below.
This blank process is the place where we will design our business logic/process.



UNDERSTANDING WORKFLOW COMPONENTS

Lets see the mapping of various WF components with the tasks they can perform.
This will help us understand what workflow component will be needed to perform each task in business process.


Now we will summarize what are the components required to design and develop our WF process.

·         Two “Notification” for sending notification to Approver to get his approval and to the employee in case of rejection of his requisition
·         Two “Messages” which will have the actual body/text of message to be conveyed to Approver and employee
·         One “Lookup” for the two options namely Approve and Reject
·         One “Function” for calling the procedure/function that will record requisition detail data in both the cases

Database object required
1.       New Package and procedure which will have logic to insert data in staging table
2.       Custom Table to capture requisition detail along with requisition status (APPROVED/REJECTED)