I am here by going to discuss on a few of the tricks and scenarios related to Oracle Workflow. If you think we cannot do much with the limitations of the workflow then you are going wrong. There are ways we can play with a workflow notification.
(1) Hide default Action History and show your custom Action History region
At times you feel like hiding default Action History region and show your own action history from your custom table in OAF region being displayed inside Workflow message. There are two ways you can do that:
(a) In OAF region controller : You can use the below lines to hide Oracle default Action History region:
OAWebBean rootWebBean = pageContext.getRootWebBean();
//Don`t show standard action history region in notification
OAStackLayoutBean ntfHistoryRN = (OAStackLayoutBean)rootWebBean.findIndexedChildRecursive("NtfHistoryRG");
if(ntfHistoryRN != null)
ntfHistoryRN.setRendered(false);
(b) #HISTORY item attribute : You can add an attribute with internal name #HISTORY in your message and then you can specify the value to point to required OAF region which will be displayed in notification instead of Action History region. You can pass parameters as well in your URL. Example - JSP:/OA_HTML/OA.jsp?OAFunc=XXXX_ACTION_HIST_RN-&pRequestId=-&REQUESTID
OAWebBean rootWebBean = pageContext.getRootWebBean();
(b) #HISTORY item attribute : You can add an attribute with internal name #HISTORY in your message and then you can specify the value to point to required OAF region which will be displayed in notification instead of Action History region. You can pass parameters as well in your URL. Example - JSP:/OA_HTML/OA.jsp?OAFunc=XXXX_ACTION_HIST_RN-&pRequestId=-&REQUESTID
(2) Hide custom buttons coming through lookup
If you are thinking about hiding default workflow
buttons like Reassign or More Info, no I am not talking about them here. Hiding
them has been documented in so many places – you just need to add an ATTRIBUTE
with internal name #HIDE_REASSIGN or #HIDE_MOREINFO in your workflow message
with value as “Y”. It is shown in the figure below:
I am here going to talk about other buttons which
come up in your workflow notification through a lookup defined in workflow process
as shown below:
Now obviously when the above notification
goes to any user he will see 1 button – Submit.
This is a notification which goes to the
user when the approver returns it for correction back to the employee. Now I
don`t want employee to submit the notification from notification itself, rather I want employee to be
redirected to my custom page and there he will do all necessary actions and
finally submit back the request.
To do this we need to hide the Submit button
and create a new button for redirection. This can be done in two ways:
a. (a) In OAF region controller: You can use the below lines to hide button coming from lookup and then create a
new button to redirect to your custom page:
OAWebBean rootWebBean = pageContext.getRootWebBean();OATableLayoutBean pgBtnBarBean = (OATableLayoutBean)
rootWebBean.findChildRecursive("pgBtnBarTbl");
OARowLayoutBean stdRowLayout =
(OARowLayoutBean)
pgBtnBarBean.getIndexedNodeList().getUINode(pageContext.getRenderingContext(),
0);
// Render the row containing buttons to
false
stdRowLayout.setRendered(false);
// Create a new button and add it in Page
Button Bar
OARowLayoutBean rowLayoutBean =
(OARowLayoutBean)createWebBean(pageContext,
OAWebBeanConstants.ROW_LAYOUT_BEAN);
OAButtonBean buttonBean =
(OAButtonBean)createWebBean(pageContext, OAWebBeanConstants.BUTTON_BEAN);
buttonBean.setText("Update
Request");
buttonBean.setShortDesc("Update Request");
// request_id parametet being passed from workflow
String request_id =
pageContext.getParameter("request_id");
buttonBean.setDestination("OA.jsp?page=/oracle/apps/xx/abc/webui/TestPG&action=update&
request_id="+ request_id);
rowLayoutBean.addIndexedChild(buttonBean);
pgBtnBarBean.addIndexedChild(rowLayoutBean);
b. (b) Extending NtfDetailsControlsCO: Second way to achieve the
same requirement is by extending NtfDetailsControlsCO and hide the buttons in
the processRequest of your custom controller:
public class xxhrTLMNtfControlsCO extends NtfDetailsControlsCO
// Oracle creates the buttons from lookup with IDs as RR0, RR1 and so on
OAButtonBean oabuttonbean1 =
(OAButtonBean)oawebBean.findChildRecursive("RR0");
if(oabuttonbean1 != null)
oabuttonbean1.setRendered(false);
Now you can create a new button same as
shown in 2(a)
You have to make sure to personalize the
Page Button Bar of Notification Page(/oracle/apps/fnd/wf/worklist/webui/NotifDetailsPG) at function level(the function used to show oaf region in notification) and put your new
controller as shown below:
In your custom page when employee is clicking
on programmatically created button you need to give correct result as per your
lookup type so that it follows the next activity in the workflow:
wf_notification.SetAttrText(lv_ntf_id, 'RESULT',
'SUBMIT');
wf_notification.Respond(lv_ntf_id, NULL, lv_responder, 'WF');
wf_notification.Respond(lv_ntf_id, NULL, lv_responder, 'WF');
(3) Recall functionality:
One of the biggest challenges related to
workflows is user does some mistake while submitting the request and he wants
it to be recalled so that he can resubmit it. To achieve this functionality we
can have an extra link <Default> from our Approval Notification. We can
have a recall button in our custom page which gets enabled once the user
submits the request. Once the requester clicks on Recall button, in the code we
need to get hold of the current notification which is pending on the approver and
respond to it with Result Recall. As a result it will follow the
<Default> path as shown in the workflow below and a Recall notification is sent to the requester.
A sample workflow showing all different actions |
I hope the above functionalities will be helpful to the developers. Please drop a comment if you have any query on the above.
Thanks to my colleague Manish Goel from whom I learnt Oracle Workflow recently and to Munish Narang whose code has been very helpful.
Regards,
Deepak
Gr8 work Deepak, If possible can you share your code.
ReplyDeleteEmail id: pvrmsc@gmail.com
Most of the code and directions are already there. Let me know if you have any query.
Deletecould you please explain more regarding Return for correction functionality ? how we can achieve it in custom WF ?
ReplyDeleteWhen an approver clicks on return for correction, it calls a function which in turn sets requester as current performer and then sends RFC notification to requester.
DeleteNow there can be two ways - either you want requester to take action on the same notification or you want to hide workflow buttons and programatically put a button in your OAF region clicking on which the requester is directed to another page. The requester finally clicks on submit and in your code you will have to retrieve the notification and respond it with the requester`s action so that it again moves to the next approver.
Hello Deepak,
ReplyDeleteI have a requirement in which I need to default the Update Installment Rule and Update Revenue Rule to in Notification page,so that user will not fill anything and can proceed further. Could you please help me out in this.
I am trying to extend NtfDetailsResponseCO.
Will be grateful if you please respond to my query.
Thanks
HI Anwesha,
DeleteDefault the Update Installment Rule and Update Revenue Rule? Can you explain more on this?
I am not sure which page you are customizing and if possible you can email me your exact requirement at deepak.jain@yahoo.co.in with screenshots.
Regards,
Deepak
You can extend NtfDetailsResponseCO and do it. You can retrieve those message choice and set the values after super.processRequest().
DeleteBut make sure you do it at function level and the function should be the same one which is being used inside this notification to show oaf region.
Hello Deepak,
DeleteThank you so much for your response.I am extending the CO but facing some difficulty in retrieving the message choice.
Request to please suggest how can i get hold of the message choice.
The message choice is getting created programmatically and so I am very confused.Please find the below code for message choice creation in seeded NtfDetailsResponseCO class:
if ("LOOKUP".equalsIgnoreCase((String)object4)) {
string8 = (OAViewObject)oAApplicationModule.findViewObject("LookupCodesVO" + j);
if (string8 == null) {
string8 = (OAViewObject)oAApplicationModule.createViewObject("LookupCodesVO" + j, "oracle.apps.fnd.wf.worklist.server.LookupCodesVO");
}
Serializable[] arrserializable4 = new Serializable[]{object3};
if (bl2) {
string8.invokeMethod("initQueryDigSig", arrserializable4);
} else {
string8.invokeMethod("initQuery", arrserializable4);
}
string8.reset();
string9 = (OAMessageChoiceBean)this.createWebBean(oAPageContext, "MESSAGE_POPLIST");
string9.setUINodeName("NRR" + j);
string9.setListDisplayAttribute("Meaning");
string9.setListValueAttribute("LookupCode");
string9.setListViewObject(oAPageContext, (ViewObject)string8);
string9.setPickListCacheEnabled(false);
string10 = (String)oARow.getAttribute("TextValue");
string9.setSelectionValue(oAPageContext, string10);
string9.setVAlign("middle");
string9.setPrompt(string12);
string9.setShortDesc(string13);
oAMessageComponentLayoutBean.addIndexedChild((UINode)string9);
continue;
}
Hi Deepak,
ReplyDeleteThanks for your post.
When i am using the code to extend the CO, its throwing an error:
Error(26,56): cannot make a static reference to non-static method findChildRecursive(java.lang.String)
Seeking your help and support please.
Thanks,
Saikumar CG
hello deepak,
ReplyDeletei tried extending controller oracle.apps.fnd.wf.worklist.webui.NtfDetailsControlsCO but the buttons are not getting disabled.
did you try the same?
href="https://istanbulolala.biz/">https://istanbulolala.biz/
ReplyDeleteS3V
şırnak evden eve nakliyat
ReplyDeleteçankırı evden eve nakliyat
nevşehir evden eve nakliyat
antalya evden eve nakliyat
artvin evden eve nakliyat
LMZ
3F5F3
ReplyDeleteBatman Şehir İçi Nakliyat
Ardahan Parça Eşya Taşıma
Çerkezköy Motor Ustası
Çankırı Şehir İçi Nakliyat
steroid cycles
Tokat Evden Eve Nakliyat
Malatya Şehirler Arası Nakliyat
arama motoru optimizasyonu
Zonguldak Şehirler Arası Nakliyat
B8394
ReplyDeleteBitexen Güvenilir mi
Erzincan Evden Eve Nakliyat
Binance Referans Kodu
Ünye Televizyon Tamircisi
Çerkezköy Çelik Kapı
Bibox Güvenilir mi
Malatya Evden Eve Nakliyat
Gölbaşı Boya Ustası
Referans Kimliği Nedir
CDFBC
ReplyDeleteSilivri Çatı Ustası
Batman Evden Eve Nakliyat
Binance Referans Kodu
Bitexen Güvenilir mi
Erzurum Evden Eve Nakliyat
Pursaklar Boya Ustası
Zonguldak Evden Eve Nakliyat
Karaman Evden Eve Nakliyat
Ankara Asansör Tamiri
0092F
ReplyDeleteEskişehir Evden Eve Nakliyat
Çerkezköy Cam Balkon
Altındağ Fayans Ustası
Gümüşhane Evden Eve Nakliyat
Bayburt Evden Eve Nakliyat
Afyon Evden Eve Nakliyat
Erzincan Evden Eve Nakliyat
Bitfinex Güvenilir mi
Çerkezköy Oto Lastik
0E66D
ReplyDeleteKripto Para Nasıl Üretilir
Coin Çıkarma
https://resimlimag.net/
Bitcoin Madenciliği Nasıl Yapılır
Yeni Çıkan Coin Nasıl Alınır
Kripto Para Nasıl Alınır
Binance Kaldıraçlı İşlem Nasıl Yapılır
Bitcoin Giriş Nasıl Yapılır
Kripto Para Oynama
0B75F
ReplyDeleteCoin Çıkarma Siteleri
Coin Çıkarma
Bitcoin Nedir
Binance Hesap Açma
Paribu Borsası Güvenilir mi
Bitcoin Çıkarma
Coin Kazanma
Bitcoin Oynama
Bitcoin Nasıl Alınır
9F208
ReplyDeleteKripto Para Madenciliği Siteleri
Binance Ne Kadar Komisyon Alıyor
Yeni Çıkan Coin Nasıl Alınır
Bitcoin Nasıl Çıkarılır
Kripto Para Çıkarma
Paribu Borsası Güvenilir mi
Mexc Borsası Kimin
Coin Kazanma
Ön Satış Coin Nasıl Alınır
B6B91
ReplyDeleteCoin Çıkarma Siteleri
Coin Madenciliği Nedir
Binance Nasıl Oynanır
Binance Hangi Ülkenin
Kripto Para Kazma
Bitcoin Para Kazanma
Binance Sahibi Kim
Coin Çıkarma Siteleri
Bitcoin Kazma Siteleri
F74AC
ReplyDeletekaldıraç nasıl yapılır
kızlarla canlı sohbet
kraken
binance
bitcoin haram mı
referans kimligi nedir
btcturk
4g proxy
kripto para kanalları telegram
13370
ReplyDeletebinance referans kimliği nedir
en iyi kripto grupları telegram
toptan mum
mexc
kizlarla canli sohbet
canlı sohbet
binance
4g proxy
btcturk
39625
ReplyDeleterastgele canlı sohbet
telegram türk kripto kanalları
okex
btcturk
gate io
kaldıraç ne demek
referans kimliği nedir
canlı sohbet odaları
aax
vfdfdfferdfwsdse
ReplyDeleteشركة تنظيف افران