System Administrators can create new tabs for additional
functionality in myFileGateway. This sample is meant to serve
as a starting point for the creation of your own custom tabs. Please
do not make your changes directly in the <install>/samples directory,
as these may be overwritten in a future patch. Instead, you may maintain
the WAR file in a directory entirely separate from the <install>
directory, as long as the HTTP Server Adapter is configured to find
it.
About this task
With this change, every HTTP Server Adapter that hosts
myfilegateway.war will also have to host sampletab.war. In particular,
visiting http://<host>:<baseport>/myfilegateway will fail unless
sampletab.war is copied to <install>/noapp/deploy. If this condition
hasn't been met, a request to /myfilegateway will fail to load the
login page. Use the browser to visit http://<host>:<baseport>/sampletab/welcomepage.js
and verify that the content of that file is shown.
One example
of a custom tab you can add to
myFileGateway is a Welcome Tab,
which is supplied as a sample in the install. When creating a custom
permission like the one in this example, make sure its "Permission
Type" is "File Gateway". You can use these assets, which ship with
the sample, as the basis for your own implementation:
- <install>/samples/filegateway/sample_myfg_tab/sampletab.war
- <install>/samples/filegateway/sample_myfg_tab/sampletab_imports.xml.in
This procedure describes how to create a new Welcome Tab in
myFileGateway.
- Modify the <install>/properties/customer_overrides.properties
and add this line:
filegateway_ui.myfilegateway.extension_js_file_1=/sampletab/welcomepage.js
- Create a permission named "Custom myFileGateway Sample
Tab" with the ID "CUSTOM_MYFG_WELCOME" and an HTTP Server Adapter
instance named "myFileGatewayWithSampleTab" by selecting Tools > B2B
Console > Deployment >Resources Manager >Import/Export and importing
the file:
<install>/samples/filegateway/sample_myfg_tab/sampletab_imports.xml
The password for the import file is "password" without
the quotes. Import all three assets within the import file.
- Modify the HTTP Server Adapter Instance by selecting and finding
the HTTP Server Adapter that you created in the previous step. Make
these modifications:
- On the first page, set the Group to None.
- On the second page, change the port to one that doesn't
conflict with any other port on the instance.
- Enable the adapter instance by clicking the "Enable
Service for Business Processes" box on the confirmation page.
- Select and verify that the "File Gateway Partner Users" group
includes the permission named "Custom myFileGateway Sample Tab". Custom
permissions relating to the custom tabs must be of the "File Gateway"
type.
- Restart the server:
- <install_dir>/bin/hardstop.sh
- <install_dir>/bin/run.sh
- Login to myFileGateway using the port specified
in Step 3 to verify that the new tab named "Custom Welcome Page" is
visible. The custom tab web application may need to know the name
of the user that is logged into myFileGateway. You can determine
this by retrieving the HTTP Session attributes "dlssoAuthenticated"
and "autho". If the visitor to the custom tab web application authenticated
to myFileGateway, the value of the "dlssoAuthenticated" attribute
will be the string "true" and the value of the "autho" attribute will
be the name of the logged in user as a string.