I am working on setting a Dashboard Box on the Identity Self Service Home using sandboxes in OIM (11gr2ps3). The purpose of this box is to call the Create User form. And while it opens correctly, the Cancel and Submit buttons from the form will not close the tab (however, the submit button will submit and create a user correctly).
This is how I called the task flow:
(\oracle\iam\ui\homepage\home\pages\mdssys\cust\site\site\self-service-home.jsff.xml)
<mds:insert parent="gr2" position="last">
<af:gridCell xmlns:af="http://xmlns.oracle.com/adf/faces/rich" id="e2545093324" halign="center">
<oim:DashboardBox xmlns:oim="/componentLib1" titleText="#{uiBundle['CREATE_USER_HEADER']}" image="/images/Dashboard/myAccess.png" hoverImage="/images/Dashboard/myAccess_s2.png" iconClickable="true" id="db2545093324"
iconClickAction="#{backingBeanScope.dashboardNavigationBean.launchTaskFlow}">
<af:clientAttribute xmlns:af="http://xmlns.oracle.com/adf/faces/rich" name="taskFlowId" value="/WEB-INF/oracle/iam/ui/taskflows/public/tfs/create-user-tf.xml#create-user-tf"/>
<af:clientAttribute xmlns:af="http://xmlns.oracle.com/adf/faces/rich" name="title" value="#{uiBundle['CREATE_USER_HEADER']}"/>
</oim:DashboardBox>
</af:gridCell>
</mds:insert>
The logs do not leave any error when clicking on the cancel button, although it seems that the managed beans might be refreshing. Any ideas? Is there any other attribute or customization I should add to, perhaps, the catalog files in order for them to close the task flow and tab correctly?
Update: I tried making a task flow launcher by raising a contextual event as suggested and using the documentation that Amr Gawish shared. It is called by updating the iconClickAction attribute of the Dashboard Box with the new bean. Here is the method I created:
public void launchCreateUserTaskFlow(ActionEvent evt) {
ResourceBundle bundle = ResourceBundle.getBundle(OIM_USR_BUNDLE, locale);
String taskFlowId = "/WEB-INF/oracle/iam/ui/taskflows/public/tfs/create-user-tf.xml#create-user-tf";
String id = "create_user";
String name = bundle.getString("CREATE_USER_HEADER");
String jsonPayLoad = TaskFlowUtils.createContextualEventPayLoad(id, taskFlowId, name);
TaskFlowUtils.raiseContextualEvent(TaskFlowUtils.RAISE_TASK_FLOW_LAUNCH_EVENT, jsonPayLoad);
}
It kind of worked, but only halfway. The Cancel button will close the tab correctly every time, but the Submit button will only close the tab when the request does not leave a Request ID. Any ideas?