IBM Support

Access to the IBM Case Manager runtime configuration items

Question & Answer


Question

When you are developing custom widgets to work along with IBM Case Manager widgets, they might need to be aware of some basic configuration items like the base URL for REST service and solution name or target object store name.

Answer

In IBM Case Manager Case Client, there are two types of configuration items:

  1. The Case Client scope configurations which are shared by all IBM Case Manager widgets in different IBM Mashup Center spaces, like base REST service URL.
  2. The configuration items about the solution. For example, the solution name might change when a space is switched.

The list of the exposed configuration items:



Property Name
Comments
API for access
IBM Case Manager Case Client scope configuration items
cmisServiceBaseURLCMIS REST base URLecmwdgt.settings.cmisServiceBaseURL
bpmServiceBaseURLPE REST base URLecmwdgt.settings.bpmServiceBaseURL
caseServiceBaseURLCASE REST base URLecmwdgt.settings.caseServiceBaseURL
workplaceXTBaseURLWorkplaceXT base urlecmwdgt.settings.workplaceXTBaseURL
mashupServerURIThe mashup server URLecmwdgt.settings.mashupServerURI
cmdosNameADOS nameecmwdgt.settings.cmdosName
IBM Lotus Mashup Center space scope configuration
SolutionThe solution name for current working solutionecmwdgt.getBean("spaceConfig").getSolution()
TargetOSThe target object store name for current working solutionecmwdgt.getBean("spaceConfig").getTargetOS()
EffectiveRoleThe effective role of current user.ecmwdgt.getBean("spaceConfig").getEffectiveRole()
PEConnectionPointThe PE connection point for current solution. ecmwdgt.getBean("spaceConfig").getPEConnectionPoint()
WebAppIDThe application id.ecmwdgt.getBean("spaceConfig").getWebAppID()

To access the configuration items by using the APIs, you must load and evaluate the Case Client code in the support.js file and your widget must be located in a page that belongs to a IBM Lotus Mashup Center space. The space is created during solution deployment either through the IBM Case Manager Case Builder or the IBM Case Manager Administration Client. The deployment configures the solution information as the space metadata.
Here is a sample widget code to list all the configuration items.

1. The sample widget definition file:

<iw:iwidget name="ACMConfiguration" xmlns:iw="http://www.ibm.com/xmlns/prod/iWidget"
iScope="sample.widget.ICMConfiguration"  allowInstanceContent="true"
supportedModes="view" mode="view">
    <iw:resource uri="ICMConfiguration.js"/>
    <iw:content mode="view">
      <![CDATA[
        <div id="_IWID_view">                
        </div>        
      ]]>
    </iw:content>
</iw:iwidget>

2. The code for sample widget's iScope definition file. The code in bold font is the key step to load the solution configuration items.

dojo.provide("sample.widget.ICMConfiguration");

dojo.declare("sample.widget.ICMConfiguration", null, {
 
    onLoad: function() {

        //load and eval the support.js, user have to know the root context for the Case Widget application.
       //It's "/CaseWidget" by default.
       if(!dojo.getObject("ecmwdgt") || !ecmwdgt.settings){//if other widgets like IBM Case Manager Runtime widget already load the support.js
         eval(dojo._getText("/CaseWidgets/catalog/iwidget/support.js"));
        }

        //get the space config object for retrieving space scope configuration
        var spconfig = ecmwdgt.getBean("spaceConfig");
       
        var viewNode = dojo.byId("_" + this.iContext.widgetId + "_" + "view");
       
        var settings = "<div>";        
//read runtime scope configuration
        settings += "ICM Config cmisServiceBaseURL         :" + ecmwdgt.settings.cmisServiceBaseURL + "<br>";
settings += "ICM Config bpmServiceBaseURL          :" + ecmwdgt.settings.bpmServiceBaseURL + "<br>";
        settings += "ICM Config caseServiceBaseURL         :" + ecmwdgt.settings.caseServiceBaseURL + "<br>";
settings += "ICM Config workplaceXTBaseURL         :" + ecmwdgt.settings.workplaceXTBaseURL + "<br>";
settings += "ICM Config mashupServerURI            :" + ecmwdgt.settings.mashupServerURI + "<br>";
settings += "ICM Config cmdosName                  :" + ecmwdgt.settings.cmdosName + "<br>";
    settings += "<br>";

        //read space scope configuration
    settings += "Space Config solution: " + ecmwdgt.getBean("spaceConfig").getSolution() + "<br>";
settings += "Space Config targetOS: " + ecmwdgt.getBean("spaceConfig").getTargetOS() + "<br>";
settings += "Space Config effectiveRole: " + ecmwdgt.getBean("spaceConfig").getEffectiveRole() + "<br>";
settings += "Space Config peConnectionPoint: " + ecmwdgt.getBean("spaceConfig").getPEConnectionPoint() + "<br>";
settings += "Space Config webAppID: " + ecmwdgt.getBean("spaceConfig").getWebAppID() + "<br>";
settings += "</div>";

viewNode.innerHTML = settings;
    }

});

3. Deploy the custom widget. You should now get the following configuration items displayed when running the widget.
ICM Configuration items

[{"Product":{"code":"SSCTJ4","label":"IBM Case Manager"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Case Manager Client","Platform":[{"code":"PF033","label":"Windows"},{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"}],"Version":"5.0.0;5.0.0.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SSCTJ4","label":"IBM Case Manager"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Case Manager Client","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"","label":"Linux on System z"}],"Version":"5.0.0;5.0.0.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
17 June 2018

UID

swg21460118