我正在尝试在打开案例时预览类似的 IBM Case manager 案例,我收到错误 onBroadcastEvent is not a function it is not included inside self. 我正在使用连接到脚本适配器(发送工作项)
require(["icm/model/properties/controller/ControllerManager", "ecm/model/Desktop" ], function(ControllerManager, Desktop) {
var solution = Desktop.currentSolution;
var params = {};
var self = this;
var prefix = solution.prefix;
params.ObjectStore = solution.getTargetOS().id;
var custID = payload.workItemEditable.propertiesCollection.LSS_IdentificationValue.value;
console.log ("Customer ID: ",custID);
var caseObj = payload.workItemEditable.icmWorkItem.caseObject;
caseObj.retrieveCachedAttributes(function(caseObject) {
var caseID = caseObject.caseIdentifier;
console.log ("Case ID: ",caseID);
/* Find all of these */
var criterion1 = new ecm.model.SearchCriterion({"id": prefix+"IdentificationValue", "name" : "Identification Type", "selectedOperator": "STARTSWITH", "defaultOperator": "STARTSWITH", "dataType": "xs:string"});
criterion1.value = custID ;
criterion1.defaultValue = custID ;
criterion1.setValues( [custID]);
params.criterions = [criterion1];
params.CaseType = ""; /* all case types */
params.solution = solution;
var searchPayload = new icm.util.SearchPayload();
searchPayload.setModel(params);
searchPayload.getSearchPayload(function(payload) {
self.onBroadcastEvent("icm.SearchCases", payload);
});
});
});