The Model.setTemporaryUserInfo ( Occ ObjOrCxnOcc, int nType, String sText ) method is a neat way of indicating semantic problems with models from ordinary reports (not just semantic checks) that depend on specific conventions: you get a highlight and a text on each connection or object that you want to indicate a warning for, transiently.
However, it seems to work only in the Designer/Architect client: I have not managed to get any indication or problems when running it in Connect or Connect Designer. (Portal version: 10.0.17.4.1609029; ARIS version: 10.0.17.4.1609029). Am I missing something?
Is there an overview of what report methods and functionality (like Fragments, or Architect method & filter management) differ between the Java Designer client and the Connect Designer?
Hello Pontus,
on https://documentation.softwareag.com/aris/Architect/10-0sr18/yaa10-0sr18e/index.htm
> Additional documentation
you can find references for the differences with regard to client/license types
Functional Product Matrix |
Method Matrix |
Report Matrix |
Technical Product Matrix |
and changes between Aris releases: Report Script Changes
re: setTemporaryUserInfo
I did not try this one, but in general it is a pity that differences between the client types are not marked in the script help. The only hint on methods available in the thin client is the historic formula "This method is also available in ARIS Publisher report." And it happens to be the case for
Report class Context - Method addActionResult
Context.addActionResult(Constants.ACTION_INFO, "temporary information", currentObjOcc) //displays a temporary info text next to an object in a model
Maybe it is an alternative for your purpose.
Regards, Martin
Hi Pontus
Please find below a report code snippet which run from Aris Connect on models, display temporary decorations around multiple occurrences of the same definition object . Works fine on Aris Connect Enterprise 10.0.13
var g_nLoc = Context.getSelectedLanguage();
function main()
{var models = ArisData.getSelectedModels();
for( var m in models)
{
try
{
var model=models[m] ;
model.openModel() ;
var objDefsMap = getOccListWithCount(model) ;
decorateModel(model,objDefsMap) ;
}
catch(ex)
{
var line = ex.lineNumber;
var message = ex.message;
var filename = ex.fileName;
Dialogs.MsgBox("Exception in file "+filename+", line "+line+":\n"+message) ;
}
}
}
main();/**
* Return an associative array
* Key is Guid of the object definition GUID
* Value is an array :
* - first element is the number of occurrences in the model
* - second element is the object name
* - third element is the list of ccurrences in the model
*/
function getOccListWithCount(model)
{
var ojbOccs = model.ObjOccList();
var objDefsMap = {};
for( var o in ojbOccs)
{
var objDef = ojbOccs[o].ObjDef();
var guid = objDef.GUID();
if (guid in objDefsMap)
{
objDefsMap[guid][0]++;
objDefsMap[guid][2].push(ojbOccs[o]);
}
else
objDefsMap[guid]=[1,objDef.Name(g_nLoc),[ojbOccs[o]]];
}
return objDefsMap;
}
/**
* add temporary user info to each duplicate occurrence in the model
*/
function decorateModel(model,objDefsMap)
{
for (var g in objDefsMap)
{
if (objDefsMap[g][0]>1)
{
for(var occ in objDefsMap[g][2])
model.setTemporaryUserInfo(objDefsMap[g][2][occ],Constants.MODEL_INFO_WARNING,getString("DUPLICATE")) ;
}
}
}