Hi,
We can embed an OAF region into an existing workflow notification using the following steps:
1) Create a StandAlone Region in jdev and associate an AM and View Object to it.
2) import the region and create a form function for it using System Administrator Resp.
3) Take an attribute of type Document and in the value write :
JSP:/OA_HTML/OA.jsp?OAFunc=FunctName
4) Call this attribute in message body using Token "&ATTR_NAME".
This will show the OAF region on to notification if in your notification body all the attrbutes reffered by Token & refers to OAF regions. But, in case the notification body also contains Text Attributes then you will get error on the screen that.
&ATTR_TEXT does not refer to an OAF Region.
To avoid this, we can dynamically create the OAF region lets say a table region through PL/SQL and call that Pl/SQL Package in a document type attribute in the WorkFlow Notification Body. The Steps involved are:
1) Create an activity in Workflow Process calling the Package.
for ex : PA_CANDIDATE_CUSTOM_EXTN.GET_FEEDBACK(document_id in varchar2,
display_type in varchar2,
document in out varchar2,
document_type in out varchar2)
The Document ID is the unique identifier being used. This is the parameter which you want to pass from the notification into table region to show details related to this only. Suppose in this case we are passing the person_name to get his records.
CURSOR feedback_cur (P_PERSON_NAME IN VARCHAR2) IS
SELECT a.person_id,
a.effective_start_date,
a.effective_end_date
FROM per_all_people_f
WHERE full_name = P_PERSON_NAME;
We want the output of the above query to get displayed on Notification as table region.
Now in the procedure : GET_FEEDBACK write as in the image.
2) Create an attribute of type document and in the value call the above package passing the document id and use this attribute in notification body
using token &ATTR_NAME
value : plsql:PA_CANDIDATE_CUSTOM_EXTN.GET_FEEDBACK/&PERSON_NAME
Thanks,
Gaurav
can you collect data throght OAF embded in workflow
ReplyDeleteor processFormRequest fire in OAF region when
the user submit approve
HI Gaurav,
ReplyDeletei have Done the setup the way you have mentioned. but i am still getting the error saying the "&ATTR_NAME" does not refers a OAF page region. what could be the issue.
In my notification body, i have two attributes , &HR_NOTIFICATION_REGION(whcih is a OAF region) and Document Attribute (&DOC_ID). in &DOC_ID , i am generating the html table just like the way you mentioned.
But the problem is, if the seuence is &DOC_ID and then &HR_NOTIFICATION_REGION , notification body getting printed as TEXT and for &HR_NOTIFICATION_REGION func info as text instaed of OAF page region .
if &HR_NOTIFICATION_REGION is encountered first and then &DOC_ID . OAF page region getting dispalyed along with a message "&DOC_ID" does not refers a OAF page region.
what is the solution for this ?
Thank You and I have a super offer you: Whole House Remodel Cost remodeling construction companies
ReplyDelete