General
Visual Builder AppUIs empower us to create custom-built screens within the Oracle Fusion interface, significantly simplifying user actions and automating complex activities.
The following use case illustrates how Visual Builder AppUIs can enhance efficiency by enabling users to submit a shipping label ESS job directly from the delivery screen.
With a single click, the system automatically captures the delivery parameters from the current screen, submits an ESS job using a predefined template, and sends it to a printer specified in the Application Profile.
This post will guide you through the detailed steps to accomplish this task.
High Level Implementation Details
- Identify the ESS job you want to submit from AppUI.
- Submit and ESS job manually and specify the required parameters, BIP template and destination printer.
- Use method described in the previous post to extract the JSON from the manually submitted job.
- Create JS action chain to generate the JSON based on the template above by using current delivery and destination printer retrieved from a profile.
Detailed Implementation Details
- Use standard FSCM backend REST endpoint /profileOptions to get value of the destination printer specified in the application profile
See below the following code that can be used in a JS action chain:const getPrinterProfileValueResult = await Actions.callRest(context, {
endpoint: 'ac_packing_form:fscm/getall_profileOptions-siteProfileOptionValues',
uriParams: {
'profileOptions_Id': 'AC SHIPPING LABEL PRINTER',
},
});
let printerName = getPrinterProfileValueResult.body.items[0].ProfileOptionValue; - Use the code below to build the JSON payload based on the JSON extracted from the manual submission:
let deliveryName = $page.variables.deliveryId; let templateName = "Shipping_Label"; let submitRequest = ` { "description": "AC Shipping Label", "jobDefinitionId": "JobDefinition://oracle/apps/ess/custom/ACSHIPPINGLABEL/ACSHIPPINGLABEL", "application": "FscmEss", "requestParameters": [ { "name": "pp.1.on_success", "paramType": "STRING", "value": "Y" }, { "name": "pp.1.description", "paramType": "STRING", "value": "ACSHIPPINGLABEL Document1" }, { "name": "outputOverrideParameter", "paramType": "STRING", "value": "9909" }, { "name": "pp.2.on_warning", "paramType": "STRING", "value": "Y" }, { "name": "filePersistenceMode", "paramType": "STRING", "value": "content" }, { "name": "pp.1.on_error", "paramType": "STRING", "value": "N" }, { "name": "pp.1.file_mgmt_group", "paramType": "STRING", "value": "XML" }, { "name": "pp.2.on_error", "paramType": "STRING", "value": "N" }, { "name": "pp.1.on_warning", "paramType": "STRING", "value": "Y" }, { "name": "pp.2.argument1", "paramType": "STRING", "value": "${printerName}" }, { "name": "pp.2.argument2", "paramType": "STRING", "value": "1" }, { "name": "pp.1.status", "paramType": "STRING", "value": " " } ] } `;
- Submit the ESS job with the payload generated above.