Quantcast
Channel: Reports & Macros
Viewing all 1118 articles
Browse latest View live

ARIS Report script with dialog box

$
0
0

Hi all,

Please if anyone can help.

I have to do report with dialog box where the user can select groups, objects and models. 

The idea is from the root group to have tree with parent and child groups, models and objects .Probably this can be shown in ListBox.

The thing is that next to every group, model object there has to be checkbox for the user to select or not for the item.

Can anyone help me how to do this with script?

Thank you.


Trigger APG via external system

$
0
0

Looking for some type of external API which can trigger my APG workflow automatically.

I am aware of he Macros which can trigger on particular events but can we enhance those event with custom one

Thanks

Select destination folder group

$
0
0

Hi everyone,

In my report I have to give option to the user with dialog box to select a destination folder inside ARIS before further selection of objects and models.

How can I present the user all folders(groups) in database?

Thank you in advance

Execute a report out of a model object or attribute

$
0
0

Hello,

In my company we use a report to create a process handbook. For more inexperienced ARIS users (especially the ones that just view processes in the publisher) it would be handy to have an OLE object or any other kind of object called "process handbook" with a hyperlink to the report.

Does anymone know it this is possible and how that works?

Best regards,

Dennis von Schoenfeldt

Manipulate the output object after writeReport()

$
0
0

Hi,

I am trying to typecast the object to an excel format and add some hyperlinks. I am trying to get the output object after WriteReport(). Below are the code snippet.

var outObj= Context.createOutputObject();

//Creating a table in below method.

file.BeginTable(.......
file.DefineF("He.......
file.DefineF("He.......
file.DefineF("Co.......
file.DefineF("Re.......

file.TableRow();.......
//file.TableCell.......
file.TableCell(p.......
file.TableRow();
//file.TableCell.......
file.TableCell(".......
file.TableRow();

....

outObj.WriteReport();

//Then trying  manipulate the data

var excelSheet = Context.getFile("sample.xls", Constants.LOCATION_OUTPUT);

Here I am getting null value for excelSheet .

Could you please guide me if I am missing anything.

    

(Macro) getAttribute() from Objects

$
0
0

Hey guys,

i want to create a dialog, where the user can select an object (Context.BrowseArisItems(...)) to edit the attributes of the selected object.

The problem is, that some objects have attributes which are language dependent.

E.g. the name of the object can be in "en_US" and in "de_DE".

 

When I use this code:

var userObject = Context.BrowseArisItems("Select an object", "Select an object to edit the attributes.", Constants.CID_OBJDEF)
var oSelectedObject = userObject[0];                                   //Selected User Object
var objectTypeName = Designer.getAttribute(oSelectedObject,389,null)

I get just the attribute in the database language (en_US or de_DE), but I need the attribute in "en_US" and in "de_DE".

 

How I can get the attributes in de and in en_US?

 

 

ARIS Architect: Output group information report modification

$
0
0

Hello everyone 

I'm definitely not a Javascript guy so I think that what I'm going to ask is a piece of cake for those who have the skills.

The thing is, I was asked to modify the Output Group Information report so the users won't appear in the report. At that time what I did was simply to comment those lines involving users such as:

 

// ---------------------------------
// Output of users.
// ---------------------------------
/* function userout(ousers, ocurrentgroup, bUserColored_holder) {
    // Output of users.
    for (var k = 0 ; k < ousers.length ; k++ ){
        var ocurrentuser = ousers[k];
        var ocurrentattribute = ocurrentuser.Attribute(1000, g_nloc);
        
        var currentAccessRights = ocurrentuser.AccessRights(ocurrentgroup);
        var bread = (currentAccessRights & Constants.AR_READ) == Constants.AR_READ;
        var bwrite = (currentAccessRights & Constants.AR_WRITE) == Constants.AR_WRITE;
        var bdelete = (currentAccessRights & Constants.AR_DELETE) == Constants.AR_DELETE;    
        var bsubmit = g_bIsDbVersionable && ((currentAccessRights & Constants.AR_SUBMIT) == Constants.AR_SUBMIT);
        
        g_ooutfile.TableRow();
        g_nRowCount++;
        g_ooutfile.TableCell("", 24, getString("TEXT1"), 10, Constants.C_BLACK, getTableCellColor_AttrBk(bUserColored_holder.value), 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
        g_ooutfile.TableCell("", 20, getString("TEXT1"), 10, Constants.C_BLACK, getTableCellColor_AttrBk(bUserColored_holder.value), 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
        g_ooutfile.TableCell(ocurrentattribute.GetValue(true), 20, getString("TEXT1"), 10, Constants.C_BLACK, getTableCellColor_AttrBk(bUserColored_holder.value), 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
        g_ooutfile.TableCell((bread ? "X" : ""), g_nWidthAR, getString("TEXT1"), 10, Constants.C_BLACK, getTableCellColor_AttrBk(bUserColored_holder.value), 0, Constants.FMT_CENTER | Constants.FMT_VTOP, 0);
        g_ooutfile.TableCell((bwrite ? "X" : ""), g_nWidthAR, getString("TEXT1"), 10, Constants.C_BLACK, getTableCellColor_AttrBk(bUserColored_holder.value), 0, Constants.FMT_CENTER | Constants.FMT_VTOP, 0);
        g_ooutfile.TableCell((bdelete ? "X" : ""), g_nWidthAR, getString("TEXT1"), 10, Constants.C_BLACK, getTableCellColor_AttrBk(bUserColored_holder.value), 0, Constants.FMT_CENTER | Constants.FMT_VTOP, 0);
        if (g_bIsDbVersionable) {
            g_ooutfile.TableCell((bsubmit ? "X" : ""), g_nWidthAR, getString("TEXT1"), 10, Constants.C_BLACK, getTableCellColor_AttrBk(bUserColored_holder.value), 0, Constants.FMT_CENTER | Constants.FMT_VTOP, 0);
        }
        bUserColored_holder.value = !bUserColored_holder.value; // Change background color
    }
} */

Now I'm asked to remove all user groups without any type of access and here's where I'm stuck at right now.

To explain it better, the current outcome is the first image whereas the desired outcome is the second image

In other words, those user groups without access rights should not appear in the report when a particular process is being displayed.

 

The code of this report is attached to this thread in case you want to take a look on it.

As usual, thank you so much for your assistance

Kind regards

Pedro.

 

File attachments: 

Matrix Model Creation

$
0
0

Lot of the users are facing issues in creating Matrix Models via script. This forum will help in discussing various issues related to Matrix Model Creation script.


ARIS Connect: how to make an attached file available on a report

$
0
0

Hello everyone

My customer asks me if it's possible to print an attached file in a report when running a report in a model. I tried to do it from both ARIS Connect and ARIS Architect without success. 

I would like to check the feasibility of that. Here's what I did on my own with an example. I first took this model from the Unified Motor Group database

 

Then selected the attribute Documentation on the Human Resources box and uploaded a test file (.docx)

 

I had no results so I uploaded the same file on the ARIS Repository

But at the time of running reports, I got the same results (no attached file is considered for the output file)

Is it feasible? is it possible to get the attached file on a final report when running a report?

Thank you in advance for your help

Best regards

Pedro.

Concurrent threads in reports

$
0
0

Hi -

I've created an import script that creates/updates objects from Excel. I would like to make this run faster with threads, but I can't get the code working.

 

This page was my reference: https://crunchify.com/how-to-run-multiple-threads-concurrently-in-java-executorservice-approach/

 

Does anyone know how to do something like this within the context of the ARIS API? Here is a sample script I was trying:

 

 

var log = "";

function main() {
var MYTHREADS = 4;
var executor = new java.util.concurrent.Executors.newFixedThreadPool(MYTHREADS);
var objectNames = ["Object 1", "Object 2", "Object 3", "Object 4"];

for (var i in objectNames) {
var objName = objectNames[i];
var worker = new MyRunnable(objName);
executor.execute(worker);
}

executor.shutdown();
// Wait until all threads are finish
while (!executor.isTerminated()) {

}
Dialogs.MsgBox("\nFinished all threads");
}

function MyRunnable(objName) {
this.objName = objName;

this.run = function() {
var result = "";
try {
var oObjDef = ArisData.getActiveDatabase().RootGroup().CreateObjDef(Constants.OT_FUNC, this.objName, 1033);
} catch (e) {
result = "->Red<-\t";
}
log += this.objName + " created\n";
}
}

main();

Report script methods for CHANGING custom attributes' value list

$
0
0

Dear all,

Summary: I need to import a list of possible attribute values from an external system through a report script. How can I do this?

Explanation:

A customer wants to identify weak points (OT_RISK/ST_WEAK_POINT) in his business processes. He requested that each weak point shall be categorized, using two custom attributes with value lists.

He also requested that the possible values for these attributes should be imported and continually synchronized with an external system, which I planned to implement as a report script.

However, I can not find any report script methods that would allow me to change the Aris Metamodel in use. Note that I'm not trying to add or change attribute types on the fly, only the list of possible attribute values.

Can this be done through a report script? Or a macro? It certainly is possible through ARIS Architect's Administration interface, so, as far as I can see, there's no conceptual conflict....

Any help?

 

process modelling and simulation

$
0
0

Hello,

I am actually interested only in the process modeling and simulation capabilities of Aris. What is the best Aris Software Edition that offer these features with the best pricing.

Thank you for your advice.

Best regards.

Superior Model filtered by Model type

$
0
0

Hi, 

I am new to ARIS Reports and Scripts and I am using the design view for developing the script. I want to get the list of superior processes for a process represented in BPMN Collaboration diagram. Right now I am getting all the superior processes by using the {Selected models.Superior objects.Occurrences.Model.Name} which lists down the superior BPMN Collaboration diagram and Function allocation diagrams.

How do I filter to get only the BPMN Collaboration diagrams? I could not find any options to filter by Model type.

Could any one help me in getting this in design view?

Thanks & Regards,

Kanjana N

 

General traverse a model tree report code

$
0
0

We have a need to generate reports on model assignment hierarchies in Aris, to a predefined deapth. For example, our metamodel adoption allows one policy to be broken down into subpolices. That is, we on definition level can have something like this:

A
   A1
   A2
   A3
      A31
      A32
B
   B1
   B2
   B3
 

Is there possibly a general example of report/script code that as a starting point takes a given model, identifies objects A and B, and on object definition traverses the tree and outputs some information (attributes) of all the objects?

Given such an example, I can adopt to any object/model type and tree depth.

(Macro) setSelection() doesn´t work (ComboBox)

$
0
0

Hey guys,

I want to create a reset button, that reset all inputs from the user. (should actually be no problem)

But i get some issues with: this.dialog.getPage(0).getDialogElement("COMBO_LANGUAGE").setSelection(0)

I don´t know why, but when I want to set the selection of a combobox, Aris doesn´t want to change the selection.

I want to set the selection to index 0 and then make the combobox setEnabled(false).

But the only thing what aris does, is to set the combox enabled(false) but not to set the selection to index 0.

 

But, when I print the current getSelection() of the combobox I get the value of index 0, so it seems that Aris doesn´t  update the dialog view ...

Is there a way to refresh/update the window? 

Thanks!!

 

 

The code:

this.OPTIONGROUP_selChanged = function() {  
       
        (...)

        
        if (this.dialog.getPage(0).getDialogElement("OPTIONGROUP").getSelectedIndex() == 1) {
            this.dialog.getPage(0).getDialogElement("COMBO_LANGUAGE").setEnabled(true);
            (...)

        } else{
            this.dialog.getPage(0).getDialogElement("COMBO_LANGUAGE").setSelection(0);
            if(this.dialog.getPage(0).getDialogElement("COMBO_LANGUAGE").isEnabled()){
            this.dialog.getPage(0).getDialogElement("COMBO_LANGUAGE").setEnabled(false);
            }
            (...)
                  
    }

Tags: 

Semantic Checks cannot find functions like __createArray

$
0
0

Hi,

In the ARIS downloadclient (ARIS 10 SR5) I created a new semantic checks ruletype and coded this check.

When running this semantic check on a model I get an error message telling me that __createArray is not defined.

When looking in an existing ruletype (structure rules) I see the same construction and this ruletype can be run.
I know that __createArray is defined as a function in Common Files/convertertools.js but I cannot find a way to indicate this as you can in normal reporting.
How can I use __createArray and __sort in my ruletype? 

Jan Roza

How to make a bat file for executing an ARIS script using scriptrunner

$
0
0

Hi All,

does anyone know how to make a bat file for executing an ARIS script using scriptrunner, I have done the modification in the "scriptrunner.cfg.template" file (PFA, have converted to notepad file for attaching purpose). I am struggling to make a bat file so that it can be scheduled using windows scheduler and the ARIS script is executed as per the schedule.

Any hints or lead for the above are welcomed. :)

 

Thanks & regards 

Sumeet Satwani

File attachments: 

Check what client version is the same as server version

Model Version Attribute

$
0
0
Hello everyone,
I'm writing a report that starts on a VACD model.
In the VACD there is a user-defined attribute called revision.
I need to show the value of this attribute in all versions of the model.
I found this code:
 
var vcomponent = context. Getcomponent ( "version ");
 var rlist = vcomponent. Getmodelrevisions (Oselmodel);
 for (var r = 0; r < rlist. Length; R + +) {
 var revinfo = rlist [R];
 var Avermodel = getmodelversion (Oselmodel, Revinfo. Getrevisionnumber ());
 }

 
 
But I don't know if it's correct to access the revision attribute of version 1 of the selected model, revision attribute of version 2 of the selected model, and so on.
I'm using ARIS 10.
 
Can you help me, please?

Getting Type value of an Object as Attribute

$
0
0

Hi Everyone,

I'm trying to find a way to display object types as function,event etc. on my report. Is there a way to do that? 

I already tried to use Constants.AT_TYPE , but I got just empty results.

Thanks,

Arda Ay

Viewing all 1118 articles
Browse latest View live