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