Navigating to the Persona-based UI from Entry Preview scripts
From the Entry Preview pop-up window, you can browse to the single-edit and multi-edit pages of the Persona-based UI. You can create Entry Preview actions, by using JSP, WPC, or HTML Entry Preview scripts.
Configuring the navigation
The redirectBusinessUI.js
file contains the methods that are used for navigation to the Persona-based UI.
Note: Use the same instructions to enable
navigation to the Persona-based UI for the Custom Tools from the
Custom Tools page.
- Get the redirectBusinessUI.js file from the following location for JSP and
WPC Entry preview
script:$WAS_HOME/profiles/<WAS profile>/installedApps/<NodeCell>/mdm_ui.war.ear/mdm_ui.war/ assets/customtool/scripts/redirectBusinessUI.js
- Add the redirectBusinessUI.js file in the Entry Preview script
page as an external script from the above location. Note: You can use the instructions
The
redirectToSingleEditCollab
is used for navigation to the
collaboration area of the single-edit
page.function navigateToSingleEditCollab ()
{
//set either item or category as string value
var collabType = 'item';
//set itemIds/categoryIds as entryIds based on collabType
var entryIds = [201, 202, 203]
var collabId = 101;
var collabName='Sample Collab';
var stepId = 1;
var stepName = 'Step1';
//call below method for navigation
businessUI.targetOrigin = “http://<ip address>:9090” //Persona UI url
businessUI.redirectToSingleEditCollab(entryIds, collabType,collabId,
collabName,stepId,stepName);
}
The
The
redirection flow handles invalid inputs, for example, if invalid catalogId is specified then an
error notification redirectToMultiEditCollab
is used for navigation to the collaboration area of the
single-edit
page.function navigateToMultiEditCollab ()
{
//set either item or category as string value
var collabType = 'item';
var collabId = 101;
var collabName='Sample Collab';
var stepId = 1;
var stepName = 'Step1';
//call below method for navigation
businessUI.targetOrigin = “http://<ip address>:9090” //Persona UI config.json’s customScriptBaseUrl
businessUI.redirectToMultiEditCollab(collabType,collabId,
collabName,stepId,stepName, stepItemCount,isReserveToEditEnabled);
}
"Please provide valid input criteria. Click Back, to redirect to the
previous page.”
is displayed. Following table lists the supported redirection flow:
Redirection | |||||
Entry points | Catalog single-edit | Catalog multi-edit | Collaboration single-edit | Collaboration multi-edit | |
Catalog single-edit | ❌ | ❌ | ✓ | ✓ | |
Catalog multi-edit | ❌ | ❌ | ✓ | ✓ | |
Collaboration single-edit | ❌ | ❌ | ❌ | ❌ | |
Collaboration multi-edit | ❌ | ❌ | ❌ | ❌ | |
Data explorer | ❌ | ❌ | ✓ | ✓ | |
Search | ❌ | ❌ | ✓ | ✓ | |
Custom Tool | ✓ | ✓ | ✓ | ✓ |
Limitations
Following are the list of limitations:
- Do not add
redirectBusinessUI.js
method as an inline script. - The JS file must be included as an external script for WPC/JSP Entry Preview page.
- Always pass all the parameters with valid values while calling methods.
- Persona-based UI catalog multi-edit page is read-only page having only Open and Action.
- Do not press Back on the catalog multi-edit page considering the overall system design.
Sample custom page
Following sample custom page demonstrates navigation to the catalog single-edit or multi-edit page. Based on the number of items, page redirects to the single-edit or multi-edit page. To run the action Script inside the intended domain, set the targetOrigin property of theredirectBusinessUI.js
file. The
targetOrigin property should have the value of the URL of the Persona-based UI.<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="user/redirectBusinessUI.js"></script>
<script>
businessUI.targetOrigin = “http://10.20.30.125:9090” //Persona UI url
function goToSingleEdit()
{
//set catalog id
var catalogId = 102 //
set itemids
var itemIds = [2022, 2023]
//call below method for navigation
businessUI.redirectToEditCatalogItem(catalogId, itemIds);
}
</script>
</head>
<body>
<center>
<h1></h1>