11-29-2001, 10:12
B2B Server 4.0.1
Trading Networks: N/A
PROBLEM:
For an integration, the end user must be able to use the B2B Server Administration GUI to view (/i{and sometimes edit}) Integration documentation, prior transactions, system properties, and other features.
How can we simplify the process for the end user (customer OR internal employee) to launch this Integration GUI.
SOLUTION:
Add a menu item to the B2B Server Administration GUI that launches the Integration GUI. This is same process by which a Database is configured, or Routing Rules are configured, or MySAP parameters are configured, etc.
Attached below is the code to add a menu item to the B2B Server Administration GUI in the section "Adapters".
To use this code, create a Java service and give it any name that makes sense (i.e. "addPackageToAdministrator"). Then, add this new service to the Startup Services for your integration package. This will ensure that every time that the integration package is loaded by the B2B Server, the new menu item will be incorporated into the "Adapters" section of the B2B Server Administration GUI.
Be sure to replace the text in [brackets] with your appropriate text.
[begin code]
// IMPORTS
// com.wm.lang.ns.NSName
// java.io.*
// java.util.*
// java.lang.String
// Build the menu items Object for the Integration GUI. This will be the left-side menu on your Integration GUI.
Object guiMenu[][][] =
{
{
{ "name", "[Section 1]" } ,
{ "url", "[Section 1 URL]" }
},
{
{ "name", "[Section 2]" } ,
{ "url", "[Section 2 URL]" }
},
{
{ "name", "[Section 3]" } ,
{ "url", "[Section 3 URL]" }
},
{
{ "name", "[Section 4]" },
{ "url", "[Section 4 URL]" }
}
};
Values args[] = new Values[guiMenu.length];
for(int i = 0; i < guiMenu.length; i++)
args[i] = new Values(guiMenu[i]);
// Build the added menu item in the B2B Server Administration GUI. This will be the menu item that launches your Integration GUI.
Object adminNewItem[][] =
{
{ "name", "[Your Integration GUI]" },
{ "url", "[Your Integration GUI URL]" },
{ "tabs", args },
{ "highlight", "Home" }
};
Values v = new Values(adminNewItem);
// Add the menu item to the B2B Server Administration GUI
try
{
Service.doInvoke(NSName.create("wm.server.ui:addMenu"), v);
}
catch (Exception e)
{
System.out.println("ERROR occurred while adding [Your Integration GUI] package to the webMethods B2B Server Administrator");
}
[end code]
Trading Networks: N/A
PROBLEM:
For an integration, the end user must be able to use the B2B Server Administration GUI to view (/i{and sometimes edit}) Integration documentation, prior transactions, system properties, and other features.
How can we simplify the process for the end user (customer OR internal employee) to launch this Integration GUI.
SOLUTION:
Add a menu item to the B2B Server Administration GUI that launches the Integration GUI. This is same process by which a Database is configured, or Routing Rules are configured, or MySAP parameters are configured, etc.
Attached below is the code to add a menu item to the B2B Server Administration GUI in the section "Adapters".
To use this code, create a Java service and give it any name that makes sense (i.e. "addPackageToAdministrator"). Then, add this new service to the Startup Services for your integration package. This will ensure that every time that the integration package is loaded by the B2B Server, the new menu item will be incorporated into the "Adapters" section of the B2B Server Administration GUI.
Be sure to replace the text in [brackets] with your appropriate text.
[begin code]
// IMPORTS
// com.wm.lang.ns.NSName
// java.io.*
// java.util.*
// java.lang.String
// Build the menu items Object for the Integration GUI. This will be the left-side menu on your Integration GUI.
Object guiMenu[][][] =
{
{
{ "name", "[Section 1]" } ,
{ "url", "[Section 1 URL]" }
},
{
{ "name", "[Section 2]" } ,
{ "url", "[Section 2 URL]" }
},
{
{ "name", "[Section 3]" } ,
{ "url", "[Section 3 URL]" }
},
{
{ "name", "[Section 4]" },
{ "url", "[Section 4 URL]" }
}
};
Values args[] = new Values[guiMenu.length];
for(int i = 0; i < guiMenu.length; i++)
args[i] = new Values(guiMenu[i]);
// Build the added menu item in the B2B Server Administration GUI. This will be the menu item that launches your Integration GUI.
Object adminNewItem[][] =
{
{ "name", "[Your Integration GUI]" },
{ "url", "[Your Integration GUI URL]" },
{ "tabs", args },
{ "highlight", "Home" }
};
Values v = new Values(adminNewItem);
// Add the menu item to the B2B Server Administration GUI
try
{
Service.doInvoke(NSName.create("wm.server.ui:addMenu"), v);
}
catch (Exception e)
{
System.out.println("ERROR occurred while adding [Your Integration GUI] package to the webMethods B2B Server Administrator");
}
[end code]