The Lesson 2 of Oracle Workflow training is driven by screenshots.
Thanks to all the responses from Lesson 1 of Oracle Workflows Training. The most promising response was that from Swetha who mentioned that although
Audio-Visual training is good, however if someone wants to practice the steps as they read then its best to have screenshot.
Another problem with Audio-Visual is that it is not possible to print such audio-video presentations of macromedia.
( Many thanks Swetha, I appreciate your sincere views. )
Hence the Lesson 2 of Workflow training is driven by screenshots. Please note that Workflows Training Lesson 1 ( Audio Visual)
is a pre-requisite for fresh workflow learners.
In this lesson we are going to learn:-
1. How to creates lookups in workflow.
2. How to provide a drop down list in notification to user. User will be select the response(approve or reject) from drop down list.
3. How to make a user enter rejection reason in free text response field within notification.
4. Validate that the value of rejection reason is not null, if user selects rejected. Effectivley this will train you on how to do
validations on notification responses using pl/sql.
Step 1. Open the Workflow “XX Training Workflow†that we created in lesson one.
The source code for this is in Workflow Training Lesson 1.
Step 2. Under ItemType†XX Training Workflowâ€, right click on “Lookup Types†and select New.
Select lookup type XX_MY_RESPONSE_TYPE.
Click on Apply and OK, after having created the Lookup Type.
Step3. Within lookup type, right click and select New, to create two new lookup codes.
Create lookup codes like as below.
Lookup code:XX_APPROVED
Ditto as above for Lookup Code: XX_REJECTED
Step 4. Now lets define two attributes.
These attributes will later be assigned to workflow message that we created in Training Lesson 1 .
Attribute: XX_RESPONSE_ACTION
Note: This attribute will be used in conjunction with the Lookup Type “XX_MY_RESPONSE_TYPE†to display the drop-down list in notification response.
Each lookup code value will be presented to the user in notification.
Attribute: XX_RESPONSE_REASON
Note: User will be able to enter a free text response reason. Please note that we will validate the value entered into this Notification response field using PL/SQL.
For this training, we will validate to ensure that Response Reason is entered if the user decides to reject notification.
Step 5. Drag these two attributes one by one using left mouse click, into the message “PO Informationâ€. You will be prompted with a message box when you drag
these attributes, simply click OK to those messages. After dragging the two attributes to message, these will appear in Workflow as below.
Step 6. Double click on attribute "XX Response Action" within the Message.
Set type to a value of “Lookupâ€.
Set Source to a value of “Respondâ€.
Set Lookup Type to "XX My Response Type"
Now double click on attribute "XX Response Reason" within the message "PO Information".
Set Source to "Respond". Leave everything else to its default value and click on OK.
Step7 Important Note: This Oracle Workflow training lesson is simply trying to depict how to present drop down list for response to notification.
Ideally, for approvals, you will simply attach a Lookup Type to notification itself.
Double click on notification “PO Notif Infoâ€.
In the Function Name field assign “xxxx_po_wf_training_pkg.xx_validate_responseâ€
Step 8
Write the pl/sql function as below for xx_validate_response (dont worry, I am attaching the code for this tutorial).
PROCEDURE xx_validate_response(itemtype IN VARCHAR2
,itemkey IN VARCHAR2
,actid IN NUMBER
,funcmode IN VARCHAR2
,RESULT IN OUT VARCHAR2) IS
l_nid NUMBER;
l_activity_result_code VARCHAR2(200);
v_response_reason VARCHAR2(50);
BEGIN
IF (funcmode IN ('RESPOND'))
THEN
l_nid := wf_engine.context_nid;
l_activity_result_code := wf_notification.getattrtext(l_nid
,'XX_RESPONSE_ACTION');
v_response_reason := wf_notification.getattrtext(l_nid
,'XX_RESPONSE_REASON');
IF l_activity_result_code = 'XX_REJECTED' AND
v_response_reason IS NULL
THEN
RESULT := 'ERROR: You must enter rejection reason if rejecting.';
RETURN;
END IF;
END IF;
EXCEPTION
WHEN OTHERS THEN
RESULT := SQLERRM;
END xx_validate_response;
Step9 Now save the workflow in database.
The definition of Workflow File can be downloaded by right clicking here
Step 10 Test your workflow.
The remainder PL/SQL scripts for this training tutorial can be downloaded from Lesson 2 Scripts
When testing, select "XX Rejected" in response while leaving the rejection reason blank. You will then see the error as below.
For any comments/questions for this training session, leave a comment here.
Comments
I certainly will write up on that, but will probably be after xmas holidays.
I think there is a white paper on metalink too for Payables/Expens es. Did you have a look at that?
thanks
anil
Can you please direct me to some documentation on using AME in Workflow.I could not find much informative docs on this.
It would be great if you could handle a session on this.
Please help me in this regard.
Than k you in advance,
Srika nth
I certainly will write up on that, but will probably be after xmas holidays.
I think there is a white paper on metalink too for Payables/Expens es. Did you have a look at that?
thanks
anil
Can you please direct me to some documentation on using AME in Workflow.I could not find much informative docs on this.
It would be great if you could handle a session on this.
Please help me in this regard.
Than k you in advance,
Srika nth
I didnt find the document.Can you give the details of the white paper .
Thank you,
Srikanth
Refer to Metalink Notes 369040.1 and 251770.1
Tho se will provide you an insight
Than ks
Anil Passi
I didnt find the document.Can you give the details of the white paper .
Thank you,
Srikanth
Refer to Metalink Notes 369040.1 and 251770.1
Tho se will provide you an insight
Than ks
Anil Passi
I have followed the steps in WF Lesson1.The issue is it is working in Lical instance but the same Package and same WF Process are not working in client instance.
Wi ll there be any differences for on the fly roles from instance to instance.
Th e status field in wf_notification s table of client is CLOSED where as in local instance it is OPEN.
Thanks ,
Sri
.
.
.
Hi Sri,
Is the ad Hoc Role API returning an error?
Try calling that API from SQL*Plus and see how it behaves.
Tha nks
Anil Passi
.
.
.
I have followed the steps in WF Lesson1.The issue is it is working in Lical instance but the same Package and same WF Process are not working in client instance.
Wi ll there be any differences for on the fly roles from instance to instance.
Th e status field in wf_notification s table of client is CLOSED where as in local instance it is OPEN.
Thanks ,
Sri
.
.
.
Hi Sri,
Is the ad Hoc Role API returning an error?
Try calling that API from SQL*Plus and see how it behaves.
Tha nks
Anil Passi
.
.
.
.
.
Hi Jon,
Great yuo fixed the problem. Many thanks for sharnig your experience/rese arch on this error.
Thank s
Anil pAssi
.
.
Hi Jon,
Great yuo fixed the problem. Many thanks for sharnig your experience/rese arch on this error.
Thank s
Anil pAssi
This is a great work you are doing man keep it up
.I am a fresher to oracle apps and am trying to do the screen shots in leson two and i was not able to figure out where can i see the last screen shot in which ican select aprroved or rejected.i checked my mail and have not recieved any thing can you please explain that last step in detail
Thank s
Sai
Great job Man. Its really a good one for the freshers like me to get started with the Work Flows.
Thank s,
Raj.
Thanks for sharing the knowledge.
I Have a case where in the Action is not been captured inside an attribute, we simply attached a lookup to the Message, in this case how can i achieve the validation for reason column.
Thanks in Advance.
Reg ards,
Sasidhar .
Have you attached a lookup to attribute of type Respond ? If so, the workflow notification will convert the lokkupcodes into a List Of Values, and it will be presented in notification as drop down list. In this case, no further validation is required as LOV will be restricted to the list of valid values in lookup.
Than ks
Anil
Thanks for responce.
In continuation of my previous question, is there any way to capture the Events of Approved, Rejected on the notification if we are not maintaining any attribute to store the lookup values but directly attaching the lookup to the Message.
Reg ards,
Sasidhar
If you wish to store the auditing of action/response s on custom notifications [so that you can report that elsewhere], then you would need a custom table and then using post notification insert record into that table. Much like PO_APPROVAL_HIS TORY, whereby Oracle captures the entire lifespan of a purchase order which includes creation, reservation, approval, timeout etc.
Thanks
Anil
The articles what you are providing are really fantastic to have a good start. Thank you for your wonderful effort.
Regards,
J agdish
Its Good.Its really helpfull for oracle Apps Consultants.Its Good work from your side.Keep it up.If any issues i will mail to you.
Regards
Basha
In our current project we had a requirement to invoke a child workflow process from the Parent Workflow. We have achieved this by calling the start process in a loop for each child workflow process. Here the Problem is, in the Status Monitor we are seeing as many lines as child workflow process are invoked.
We donot want these child workflow process appear in the Status Monitor is there a way to do that.
This is all becoz our client wants only one Process against one workflow in Status Monitor.
As wel we want the main workflow to error state if any child process fails.
Thank s in Advance...
R egards,
Sasidh ar.
Thank you very very much for your WF training materials. It is more than a tutor for me... Excellent job....
I have a query regarding the FUNCTIONS executed thru WF Notification. For eg., in your sample procedure xx_validate_res ponse is called from the WF. My query is, when exactly is this xx_validate_res ponse procedure getting executed, i mean before the APPROVE/REJECT action from the user or after the APPROVE/REJECT action.
I asssume that the function is executed after the user select either APPROV/REJECT. Kindly confirm me.
Thanx
Suresh
thanks in advance.
- Pavan.
Thanks for this tutorial, its has helped me a lot .. but i am facing one problem if i select response action as rejected and click on submit with response reason as null i get an error as
Cannot create picklist ViewObject for region item (N40); Pick list view object definition must be supplied, if pick list view usage or list view object is not set.
plz help me ..
thanks a alot
I just need to ask one think...how would the User be able to Launch the Workflow?
regar ds
Premal mehta
Thanks a lot for such wonderful tutorial.
I follwed all the steps of Step 1 & Step 2 & it worked successfully.
I am trying to follow the same steps for my project requirement as its almost the same.
The only change is my notification has the the result type of Approval.
I am getting following error:
Notific ation activity's message must have a respond attribute named 'RESULT' with lookup type 'WFSTD_APPROVAL '.
What's the solution for the same?
Thanks & Regards,
Jayesh
:)
Thank s & Regards,
Jayesh
It is a great online training tutorial...
Th ank you so much , I was new for workflow, Now I can start work on WF independently .
Once agian
Thank you
Regards
Hirde sh
I am going through your articles and training.I would like to appreciate your efforts on this.I got several vision access where i can access application but i dont have any free database access.Do you have any idea where i can get free vision database access so that i can have trails on your training stuff.
Thanks for your efforts.
Regar ds
Siva V
I am trying to display the data from IRC_DEFAULT_POS TINGS_TL table, in this table some of the fields are of CLOB datatype,
for example org_description is Bulleted Text, i would like to display this in the WF notification as regular text without any html tags. how could i do that?
Regards
Hemanth
I have gone through your articles and presentations. They are really very much useful to everyone who ever with the
thirst of learning Apps... The way you present things is superb and have no words to admire you. I appreciate your work
from the bottom of my heart and would like to extend my sincere thanks. Thanks a lot.
Regards,
Santhosh
Thank you very very much for your WF training materials
Than ks
Praveen
Thanks for sharing the wondersful articles which make learning easy.
I had a question , how can we capture the re assign activity as the result and take the workflow to next step after re-assign ?
I just want to capture the re-assigned username and go to the next step .
I am using post notification function to capture the value without sending the notification.
B ut the worklfow doesn seem to move fwd
Thanks
Sujath a
Thank s & Regards
Imran Baig
MSat
Hyder abad, IND
amend your site, how can i subscribe for a blog web site?
The account helped me a acceptable deal. I had been tiny bit acquainted of this
your broadcast provided bright clear idea
for posts, thanks to web.
RSS feed for comments to this post