Wednesday, January 19, 2011

Opening a Remote HTTP URL inan ADF Dialog using Bounded Taskflow

We want to open an HTTP remote URL(say in an ADF Dialog Framework window while user clicks a commandLink in the base jspx/jsff page.

1.Create a wrapper TF called MyFlowTF in adfc-config.xml.

<?xml version="1.0" encoding="UTF-8" ?>
<adfc-config xmlns="" version="1.2" id="__8">
<task-flow-definition id="MyFlowTF">
<default-activity id="__1">MyPage</default-activity>
<transaction id="__6">
<data-control-scope id="__7">
<managed-bean id="__4">
<managed-bean-name id="__2">popupBean</managed-bean-name>
<managed-bean-class id="__3">oracle.ui.bean.popupBean</managed-bean-class>
<managed-bean-scope id="__5">backingBean</managed-bean-scope>
<view id="NotificationPage">
<page id="__9">/oracle/ui/page/MyPage.jsff</page>
<task-flow-call id="PopupNotifWrapperTF">
<input-parameter id="__11">
<input-parameter id="__12">
<input-parameter id="__13">
<input-parameter id="__14">
<run-as-dialog id="__10"/>
<control-flow-rule id="__20">
<from-activity-id id="__21">MyPage</from-activity-id>
<control-flow-case id="__22">
<from-outcome id="__24">taskDetails</from-outcome>
<to-activity-id id="__23">PopupWrapperTF</to-activity-id>

2.Wrapper TF code:

<?xml version="1.0" encoding="UTF-8" ?>
<adfc-config xmlns="" version="1.2">
<task-flow-definition id="PopupWrapperTF">
<default-activity id="__3">remoteTaskFlowCall</default-activity>
<input-parameter-definition id="__1">
<name id="__2">remoteAppUrl</name>
<input-parameter-definition id="__6">
<name id="__5">dynamicTaskDefId</name>
<managed-bean id="__10">
<managed-bean-name id="__8">opupBean</managed-bean-name>
<managed-bean-class id="__9">oracle.ui.bean.PopupBean</managed-bean-class>
<managed-bean-scope id="__7">backingBean</managed-bean-scope>
<task-flow-call id="remoteTaskFlowCall">

Add the permission for this TF in jazn-data.xml, if your WebApp is secured.

UI Change: 

<af:commandImageLink text="#{'MyMessage'}" id="cil2"
<af:setActionListener from="#{''}"

3.Add required code in the bean method..

public String remoteAppUrl = null;
public TaskFlowId taskflowDefId = null;

public void setTaskDefId(TaskFlowId taskflowDefId) {
this.taskflowDefId = taskflowDefId;

public TaskFlowId getTaskflowDefId() {
return taskflowDefId;

public void setRemoteAppUrl(String remoteAppUrl) {
this.remoteAppUrl = remoteAppUrl;

public String getRemoteAppUrl() {
return remoteAppUrl;

public void onClick(ActionEvent actionEvent) {
// Add event code here...
//gets the taskflow details url.
String taskflowUrl = (String)ADFUtil.evaluateEL("#{pageFlowScope.detailsUrl}");
//sets the taskflow Id and remote url to be passed to the remote task flow call activity.

* This method gets the task flow Id from the complete url.
* @param taskDetailsURL
* @return
public TaskFlowId getTaskFlowDefinitionId(String detailsURL) {
//Checks if the url is null.
if (detailsURL == null)
return null;
//gets the parameter list from the url.
String parameterList =
detailsURL.substring(detailsURL.indexOf("?") + 1,
//tokenizes the url.
StringTokenizer stok = new StringTokenizer(parameterList, "&");
String taskFlowId = null;
String documentName = null;
//gets the taskflowId from the url.
while (stok.hasMoreTokens()) {
String parameter = stok.nextToken();
String[] parts = parameter.split("=", 2);
if (parts[0].equals("_id"))
taskFlowId = parts[1];
if (parts[0].equals("_document"))
documentName = parts[1];

//decodes the encoded url.
try {

documentName = URLDecoder.decode(documentName, "UTF-8");
taskFlowId = URLDecoder.decode(taskFlowId, "UTF-8");

} catch (Exception ex) {

return new TaskFlowId(documentName, taskFlowId);

* This method extracts the remoteAppUrl.
* @param detailsURL
* @return
public String getRemoteAppURL(String detailsURL) {
if (detailsURL == null)
return null;
int index = detailsURL.indexOf("&_id");

String url = "";
//extracts the remote app url part.
if(index > 0)
url = detailsURL.substring(0,taskDetailsURL.indexOf("&_id"));

return url;


Register the notification bean in WrapperTF as backing bean scope to read the input parameters.


Anonymous said...

bret michaels dating [url=]christian dating oklahoma[/url] the best european dating sites
dating someone older [url=]corporate dating sites sa[/url] dating disparity east asian women
dating sim games 18 [url=]gay dating site nz[/url] best adult dating search engine

Anonymous said...

ebook palm french dictionary laptop ebook reader [url=]arc of justice boyal ebook download[/url] cpa prophet system ebook pdf megaupload

Anonymous said...

jodi picoult ebook free download greatest money making ebook ever [url=]voip ebook[/url] direct marketing ebook

Anonymous said...

ad aware se anit virus software t 37 fax software ifax [url=]shame software[/url] gps mapping pda software
[url=]Notepad Pro 3.2 - Software Store[/url] wii software solution

Anonymous said...

system software hp zv5000 slotting software [url=]serena software on google[/url] snapfire 1.0 software
[url=]CORExpress 0.1 - Download OEM, Software Sale, OEM Software[/url] adms-4b software

Anonymous said...

math magic software geforce 260 nvidia cad software [url=]writing iaq reports software[/url] mediamatics player software
[url=]Aurora Web Editor 2008 Professional 3.4 - Software Store[/url] wink mate kirk ruddy software

Anonymous said...

blocker downloads free pop software up gnu software [url=]wintotal software[/url] tcp ip model example software
[url=]Graphics & Publishing - Software Store[/url] big oven cookbook program software

Anonymous said...

pharmacy painting buying diazapam in a pharmacy in spain [url=]pfs pharmacy westerville[/url]
canadain pharmacy veterans affair pharmacy formulary [url=]synthroid[/url]
pharmacy formullary sav on pharmacy glenwood state boise [url=]ncmh pharmacy telephone number chapel hill[/url]
what does the hierarchy for a pharmacy technician look like texas pharmacy schools [url=]minocycline[/url]

Anonymous said...

alabama state board of pharmacy allied pharmacy management [url=]example pharmacy entrance essay[/url]
mcfarlands pharmacy morristown pharmacy refuses to dispense drug lawsuit [url=]diovan[/url]
fort collins safeway pharmacy harmony state of minnesota board of pharmacy [url=]online pharmacy degree[/url]
phendimetrazine online pharmacy health care screening in community pharmacy practice [url=]evista[/url]

Anonymous said...

mariupol dating agencies [url=]swingers women personals huge swinging[/url] how dating websites advertise
speed dating lake geneva wi dating someone with brain injury
go fishing dating [url=]dating with herpes in seattle[/url] advice dating

Anonymous said...

Wait for the burning procedure to complete so you're able to monetize your blog, allowing you to make your cake beautiful. If the team gets it in one minute they get three points. Montag has concluded t I went to the famous Anchor Bar with Andrew Kulyk and Peter Farrell, the local guys who have been requesting casino video game ideas wanted for download, today is your lucky day. As covert operative Sam Fisher, you'll infiltrate a vicious terrorist group and seek to destroy it from within.

Visit my homepage monster Jam video game

Anonymous said...

If they enjoy gaming, find games that you can negotiate with the
operator of the house for the sake of personal greed.

Xbox 360, OS Windows 7, the browser is a bit much, especially when underwater.
There are a variety of handheld controllers that are attached to the gaming
consoles using cords or are powered with wireless networking technologies that allow children to play.
Today there is an extensive video game terms, jargon and
genres as used by passionate gamers worldwide.

my web site ... video game timeline

Anonymous said...

adult dating sites site dating wikipedia
jeremiah shapero hb dating sites [url=]dating rules teenangers[/url] al qaeda on internet dating sites
free new dating sites in europe [url=]what to write in dating sites[/url] list of dating pet names [url=]ninna[/url] online rpg strategy dating sims

Anonymous said...

millionaire women dating sites www dating com
fish online dating [url=]wcmf dating[/url] aarp online dating
texas nights dating [url=]lynndee southern california dating[/url] craiglist dating site [url=]mountainbirdd[/url] free background check internet dating

Anonymous said...

Publica bien si vas a publicar dice el ioryi

Anonymous said...

rihanna who she is dating 100 free dating usa 2008 [url=]pof iphone[/url]
guam online dating service [url=]divorce rate verses time dating[/url] piano dating
alison fay dating middle school dating stories [url=]plenty of fish review 2013[/url]
johnhamler dating [url=]tips for safely dating onling[/url] times encounters dating

Jagna Co Kalani said...

Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Java developer learn from Java Training in Chennai. or learn thru Java Online Training in India . Nowadays Java has tons of job opportunities on various vertical industry.