b) Requirement Mapping & Custom Workflow Design
Now we are comfortable with ABC of workflow (refer our earlier post ABC of Workflow). As of now we know most of the workflow components and their uses.
Lets design a simple custom workflow process and step-by-step we will make it more complex. Basic RequirementOur business requirement is when a person applies for a leave it should go his/her supervisor for approval and once it is approved save the information in database (say in custom table*). If the leave gets rejected, don’t store any information in database. * => Here we are storing the information in custom table instead of absence management table of oracle apps. Here our objective just to demonstrate how we can use function activity. Hence to keep the discussion simple and to avoid using oracle API,we are considering custom table. Pre-Requisite Following are the pre-requisite to implement the solution 1) Web application which will call our custom procedure to trigger custom workflow process, is ready and accessible. 2) Oracle Workflow builder is installed and power user access is provided. 3) Access to development database is present. Design AppraochFollowing assumption holds true for our design approach and our discussion
To design a workflow processes we can consider any of the following approach
a) Top-Down Design approach.
b) Bottom-up approach.
We will consider the Bottom-up approach. We will first create individual workflow components and then we will use those components and design our process. Lets take a pen and paper and design the flow diagram. A:- User will log into the system and opens up the leave application form. Once he/she filled up with the relevant information he/she will submit the page. Once the page gets submitted, it should call our stored pl/sql procedure with the following information
1) The requestor person id
2) Leave Type
3) Leave from date
4) Leave to date
Here the control is with the web page.
B:-At this point we will take all the input values and will store it in the required item attributes.
So following item attributes needs to be defined
1) Requestor person id
2) Requestor User name
3) Requestor full name
4) Leave Type
5) Leave from date
6) Leave to date
Here the control is with the pl/sql procedure.Workflow will be triggered at this level.
C:-
Since at this point we need to send notification to supervisor, hence the performer of the notification is Supervisor.Thus we need to create
a) A notification
b) A message
c) Item attribute to store supervisor full name
d) Item attribute to store supervisor user name
e) Item attribute to store supervisor person id
Here workflow is triggered,control is with workflow engine.D:- Since we have to store the information in a table hence we have to use a function that will call our procedure to store the information in database.
E:-
So, we have to create a lookup type containing two lookup code a) Approve b) RejectSupervisor can either Approve leave requisition or Reject the same. Hence the possible response could be a) Approve b) Reject. From the above discussion we can finalize our list of workflow components required for our workflow process
Item Attribute
1) Requestor person id (Type-Number)
2) Requestor User name (Type-Text)
3) Requestor full name (Type-Text)
4) Leave Type (Type-Text)
5) Leave from date (Type-Date)
6) Leave to date (Type-Date)
7) Supervisor person id (Type-Number)
8) Supervisor User name (Type-Text)
9) Supervisor full name (Type-Text)
Notification
A single notification to send information to supervisor of requestor
Message
Lookup Type/CodeA message needs to be created to pass the leave information to supervisor A lookup type containing two lookup code a) Approve b) Reject needs to be created. Function Activity Each process has to have a Start activity that identifies the beginning point of the process. An End activity should return a result that represents the completion result of the process. Start activities are marked with a small green arrow, and End activities by a red arrow.(As shown in picture below) Hence we have to create two function a) Start (should be marked as Start Activity) b) End (should be marked as End Activity) When initiating a process, the Workflow engine begins at the Start activity with no IN transitions (no arrows pointing to the activity). If more than one Start activity qualifies, the engine runs each possible Start activity and transitions through the process until an End result is reached.
Sample Design
Sample Design diagram shows position of different nodes (A,B,C) its position and transfer of control.
We understand from the below picture that "Web Page Leave requisition details" activity and "Pl/Sql Procedure to trigger workflow" activity is outside the oracle workflow process.
|
No comments:
Post a Comment