Quantcast
Channel: ARIS Report Scripting
Viewing all 257 articles
Browse latest View live

RegEx - Strip HTML from text

$
0
0

Hello Everyone,

I've been trying to clear a string from the HTML tags contained in it. Below is the code, I tried:

var oRegExp =  new RegExp('/]+(>|$)/', 'g');
retrievedExtDesc = retrievedExtDesc.replace(oRegExp, '');

But this is the error, I get:

I tried using double quotation marks also. I tried removing the single quotation mark from the letter g in the RegExp constructor, but that did not help - I get another error - g not recognised or something, if I do that.

I'd appreciate any suggestions. Thanks!
 


The report in ARIS Aware

$
0
0

Good morning,

I hope you all meet well. I have a question related to ARIS Aware.

Contextualizing:
The client intends to create a dashboard with statistical information related to user actions (Viewers) in ARIS Connect (number of clicks on models, number of views for each model, number of entries for each user, etc.) . To meet these needs we will proceed with the installation of Matomo. Matomo will process the information and extract the statistical data we want, in turn, this data will be integrated with ARIS Aware to create a dashboard.
In addition, after the dashboard is created, the client wants to be able to extract a report from the dashboard (a dasboard button), with this functionality the user should be able to extract the information and use it as intended , convert, change, share, ect).
 
Is it possible to integrate a report into dashboard - ARIS Aware?
In other words, is it possible to have a button on the Dashboard that allows the extraction?
If yes, where should we develop the report (Designer, ARCM), considering that it needs information from Matomo?

Thank you, 

Ana Rita Lopes

Fetching list of connected objects with passive relations

$
0
0

Hello Everyone,

I have been working on a report where there is a need to fetch list of assigned objects for a specific objet type.

The connection details is as follows:

Original active name : is process-oriented superior

Original passive name : is process-oriented subordinate

As per the requirement i need to list down the assigned objects with the passive connection.

I have tried to get the list using the below code snippet:

var arrChildProcessesObjList = processObject.getConnectedObjs([Constants.FUNC], Constants.EDGES_ASSIGN, [Constants.CT_IS_PRCS_ORNT_SUPER]);

But it is giving me the list of objects in the active connection assignment, not the passive.

As per the scripting manual :

"Constants.EDGES_ASSIGN: Only returns assignment relationships. A link of this constant with EDGES_IN and EDGES_OUT via OR is possible. (Default: Link with EDGES_OUT)."

But i am syntacticaly unable to perform the OR with EDGES_IN.

Kindly guide me on the syntax part. In case you think i can achieve the same output by some different approach as well, kindly suggest that.

Thanks in advance to you all 

Cannot generate the backup database

$
0
0

Hallo everyone,

I'm writing a report about create a backup for a selected database via backupDatabase().

Here is my code:

var g_startTime = new Date();

function main()
{

    var ADB   = ArisData.getActiveDatabase();
    var oFile;
    var oDbAdmin;
    var sPath = "C://Userdata";
    var sFile = "WorkDB_"+getTimeStampAsString();
    Context.setSelectedPath(sPath);
    Context.setSelectedFile(sFile);
    oFile     = new java.io.File(sPath, sFile);
    dbAdmin  = Context.getComponent("ServerAdmin");
    if(dbAdmin.backupDatabase(ADB,oFile)){
             Dialogs.MsgBox("Work DB"+" was backed up on "+new Date());
         }else{
             Dialogs.MsgBox("Work DB"+" could not be backed up on "+new Date());
         }      
    return;
}

function getTimeStampAsString() {
    var date = g_startTime;
    return date.getFullYear() + "_" +
                ((parseInt(date.getMonth())+1)>9 ? '' : '0') + (parseInt(date.getMonth())+1) + "_" +
                (date.getDate()>9 ? '' : '0') + date.getDate() + "_" +
                (date.getHours()>9 ? '' : '0') + date.getHours() + "_" +
                (date.getMinutes()>9 ? '' : '0') + date.getMinutes() + "_" +
                (date.getSeconds()>9 ? '' : '0') + date.getSeconds()
                }
               
main();

 

But somehow the function backupDatabase() always return false. Could anyone give some suggestions?

Thanks a lot.

Web service providing API to ARIS

$
0
0

The build-in ARIS capabilities of interaction with different systems include the utilization of two approaches: official ARIS API and scripts.

Official ARIS API provides limited opportunities for interaction but solves one of the most important tasks such as ARIS response to external requests. It is possible to get some raw information from ARIS databases using ARIS API. Each request to the REST API is a single transaction receiving discrete scattered and unprocessed information. If amounts of data are large, this mechanism may have significant delays in the system interaction and complex development outside of ARIS. Finally, this mechanism cannot be considered as the main one for non-trivial manipulations in ARIS.

In contrast, scripts are universal means of obtaining information from ARIS databases, processing and preparation for transferring data to other systems. This mechanism has the completest capabilities in terms of obtaining data or saving it in ARIS. However, the mechanism has also some drawbacks. The first drawback is the lack of ready-made solutions in ARIS for interactions with different systems. Speaking the language of programmers, there are no relevant libraries. The second significant drawback is that scripts can only be executed on the initiative of the ARIS user.  The most attractive interaction scenario is a request from an external system to ARIS, its processing by scripts and sending a response. Scripts are powerful and ready-made mechanism, but because of the described drawbacks such scenario for work with them is not available.

image

Picture 1. Available and unavailable scenarios of ARIS interaction with other systems.

Dainova Consulting has developed a special Web service that provides interaction with ARIS and has the following benefits: script capabilities are used, and service is open for external requests. The interaction scenario is as follows (Picture 2): an external system sends a request to the Web service (1), the service runs the script in ARIS and transfers the request data there (2), the script prepares a response and transfers it back to the Web service (3), the Web service returns the response to the system that requested data (4).

image

Picture 2. Interaction scenario using Web service.

Thus, the Web service acts as a layer between two interacting systems, ensures the use of script capabilities, the handing the initiative of the script launches as well as the information transfer. The interaction is synchronous (there is no delay between request and response) and multithreaded (several requests can be processed at the same time). The object of a two-way transfer can be either a small text or entire files, even several files within a single request-response transaction.

For the convenient use of the Web service there are following artifacts:

  • WSDL description of Web service and access to its functions.

WSDL description can be used for preparing an external system for interaction. The Web service and its WSDL description are universal for any platforms and programming languages used in external systems.

  • Java library for integration with scripts in ARIS.

This library gives an opportunity to use any existing or newly developed scripts. The library makes the scripts an independent service with standardized inputs and outputs. For script developers this actually means adding a few lines of code:

image

Picture 3. Example of code.

  • Examples of working with Web service when implementing in Java language on Java RE and Android SDK platforms.

Web service can be utilized as a provider of information from ARIS and, conversely, to provide data to ARIS for model generations, automated updating of object attributes, making other changes.

The solution is also mature in terms of ensuring the protection of the transferred information. The data transfer between the Web service and an external system is carried out under a secure HTTPS protocol using SSL. It also gives an opportunity not to be limited to interaction of systems within one contour of the information network. For example, it is possible to interact with the following architecture:

image

Picture 4. Example of interaction architecture.

The use of the Web service opens the way to full integration of ARIS with production systems and can also become a basis for the development of new useful ARIS-compatible solutions.

If you have interest, please ask questions, put comments or contact us and we provide you with more information

Show an URL image from objectattribute not working

$
0
0

Good day everyone :)

Can i get a little help please?

I want to generate a doc file from a model and wanna show an image from an attribute which have an image url.

I have an object, which has a description attribute. 

This attribute contains an image url, which is :

https://csoportmunka.mvmh.hu/mvmcsoport/szabdoktar/mvmi/Munka/Kapcsolodo-publikalashoz/20160605_Anett.jpg

My problem is, when i ran my code, it makes a system path from the url like this:

https:\csoportmunka.mvmh.hu\mvmcsoport\szabdoktar\mvmi\Munka\Kapcsolodo-publikalashoz\20160605_Anett.jpg

And the error message is : The filename, directory name, or volume label syntax is incorrect

 

I am running the following code below:

 

//----------------------------Read Image from Attribute----------------------------------
                
                //Path of the requested picture
                var path = oObjList[i1].ObjDef().Attribute(9, nloc).GetValue(false); --> get the correct url link
                                
                //Java File to get the picture
                var fileMyFile = new java.io.File(path); --> Convert to system path
                                
                //FileReader
                var reader = new java.io.FileReader(fileMyFile);
                var fileByteArray = [];
                //Convert picture to ByteArray
                fileByteArray = java.nio.file.Files.readAllBytes(fileMyFile.toPath());
                 
                //Create JavaScript Array
                var javaScriptArray = new Array();
                 
                //Now push data from Java Array to JavaScript Array
                for (var i = 0; i < fileByteArray.length; i++){
                    javaScriptArray.push(fileByteArray[i]);
                }
         
                //Create Image from data
                var image = Context.createPicture(javaScriptArray, Constants.IMAGE_FORMAT_JPG);
                
                ooutfile.value.OutGraphic(image,-1,100,100);
                
                //----------------------------Read Image from Attribute----------------------------------

Thank you for helping me out :)

File attachments: 
Choose content type: 
Ask a question

Generating hierarchical identities

$
0
0

If we want to manage hierarchical data in ARIS: is there a recommended way of generating/suggesting hierarchical identities of the format 2.5.2.17.9 for a fifth-level object or model? I'm open to either reassigning the ARIS Identity, using one of the may default identities such as AT_REFERENCE_ID, or creating yet another a custom attribute. Let me exemplify.

We have process hierarchies across our company (separate process hierarchies for different business areas and divisions), with functions at one process level being assigned to models at a lower process level. We have derived diffferent model types (VACD's and EPC's) for the different levels, and restrict assignments so we cannot point upward. From a quality perspective, we would like to have a stable and recognizable identity for each model. We could use the ARIS generated ones (currently set to numerically increasing STD.nnnnn), but those aren't meaningful to business users. Ideally, we would like to provide a stable numerical identity on new models (allowing models to be renamed without messing up references in e.g. quality manuals), with process models below a Function getting an identity consisting of with the parent model's identity plus the number of the Function (possibly itself auto-generated from the order of the main flow, or assigned manually). In some cases, running an explicit renumbering process models within a tree would be useful.

Similarly, we want to manage a hierarchy of business capabilities within e.g. Service allocation diagrams (not sure if theyr'e the best type, though!), with superior hierarchy levels encompassing lower levels, and want to at least suggest identities for new lowest-level capabilities being added. We're probably never going to renumber them, ever, but would like to ensure that identities are not reused by mistake e.g. via reporting or good old-fashioned eyball inspection.

I can't find any built-in functionality for such generation as within e.g. a PDM or ECM solution. What are possible approaches? For semi-automatically generating identities, something along the lines of https://www.ariscommunity.com/users/nique/2012-07-12-how-number-objects-semi-automatic seems workable, perhaps tying it to events such as assignment creation or connection definition creation, with a solid investment in coding and testing. Macros will be runnable in Designer clients, as I understand it, and at least some events will be executable if we should switch to ARIS Connect Designer in the future. 

Is it worth the effort of creating and maintaining it, though? Any thoughts on alternate approaches? Macros will be runnable in Designer clients, as I understand it, and at least some events will be executable if we should switch to ARIS Connect Designer in the future. 

Choose content type: 
Ask a question

How to use Bpmn2ReportServices?

$
0
0

Dear Community,

I am currently trying to analyze BPMN models and would like to receive all successors to an object (occurence), which are connected to the current object with a sequence flow. In the documentation I found the getBpmnSuccessors function of the Bpmn2ReportServices class, but I don't know how to access it. So my question is: How do I get an instance of the Bpmn2ReportServices class in a report?

Thanks in advance!

Choose content type: 
Ask a question

Consolidation of Objects

$
0
0

Hi,

I'm an ARIS Cloud Advanced and ARIS Cloud Administration user.

In my ARIS database, the same type of object(Say Role) with the same name is at two instances occurring at many processes. Could you please help me how to run a report to consolidate these two objects into one.

Best Regards,

Naveen

Choose content type: 
Ask a question

I want to make the ARIS Model with fit to page option for a group of selected models through script. Kindly advise.

ARIS Skripteditor

$
0
0

Hello,

i'm new to Aris and I wonder about the differences about the different versions. (Aris Express and Cloud Versions)

Im looking for a tool to model a process (BPMN). I can easily do this in Aris Express and the cloud versions. In addition to that, I would like to create a customized output report. A standard report I can download in Aris Express, but I can't change the structure and add additional structure points in Aris. I would prefer to do this in Aris and not in Word. 

I found out about the tool Aris Skripteditor. It looks like as it is the additional tool I am looking for. Does someone know where I can get it from? Or is it included in the Aris Cloud versions? Or even in Aris Express and I just did noit find it. 

 

Many thanks for your help!

 

Forum: 
Choose content type: 
Ask a question

Find objects without connections

$
0
0

Hi ARIS Community,

What is the method to search or find objects that do not have a connection?

We can use a query or ad hoc analysis to find objects 'with' a connection of any specific type, but cannot seem to serch for 'without' a connection.

The situation is, have a matrix model (for example) with many objects and some do not have a connection. We want to filter for the objects that do not have a connection to be able to focus on them. We don't mind performing a search and creating a new model, but we cannot work out how to filter, find or search for objects without connections.

Is there a way to search or filter based on connection?

Thanks,
Mal.

Choose content type: 
Ask a question

SetTitle to 1. subprocess name or 2. process name if more than one subprocess is selected

$
0
0

Hi

I'd like to set the title of the report to be the selected subprocess name, if there is only one selected subprocess, or to be the process name, if there is more than one subprocess selected.  Is this possible?

At the moment the title of the report is set to be the script name, which I understand is the default.

Thank you in advance for your help.

Bruno Rocha

Choose content type: 
Ask a question

GUID of an object type

$
0
0

Hi ARIS-Fans,

sorry, but I need a little assistence.

I have an object. This can ba a model, an objdef, a symbol/occurance, a connection or an attribut.

Now I need to know the object type. But because some of these objects are self defined, the way over .TypeNum() does not work at all. On every server the typenum is different. Thats why I want to use the GUID of the object type. I know the GUID because in Administration/Method I can see it.

But witch function gives me the GUID of the object type?

I'm sure, it is easy. But I can't find it in the ARIS helpsite. We use ARIS 9.8 on two servers.

Many thanks in advance

Holger

Choose content type: 
Ask a question

Printing multiple models within one PDF


BPMN Lane in Lane via report?

$
0
0

Hi there!

Im working on script for BPMN model creation (transformation), the idea behind is to create new (e)BPMN collaboraation diagram via report script. I can create pool and lane inside with standard methods:

// targetGroup defined in dialog window
targetModel = targetGroup.CreateModel(Constants.MT_ENTERPRISE_BPMN_COLLABORATION, "Model Name", locale);
// access BPMN 2 support component
    var bpmnComponent = Context.getComponent("Designer");
    bpmnSupport = bpmnComponent.getBPMNSupport(targetModel);

// create the pool and the system lane
    var pool = targetGroup.CreateObjDef(Constants.OT_BPMN_POOL,"Test Process", locale);
    var defaultPool = bpmnSupport.createBpmnObject(pool, null, Constants.ST_BPMN_POOL_1);

    var lane = targetGroup.CreateObjDef(Constants.OT_BPMN_LANE,"Application System Lane 1"), locale);
    var defaultLane = bpmnSupport.createBpmnObject(lane, null, Constants.ST_BPMN_LANE_1);

    bpmnSupport.setBpmnParent(defaultLane, defaultPool);  // set parent for Lane 

This part is OK. Now Im struggling with specific task - to create Lane in Lane and here appears a question if it is possible to create Lane in Lane via script?

In Aris Architect you can create it manually very easy - just click on big "+" inside a Lane in which you want to create, let´s say "nested" lane, define number of lanes, symbol, position and that´s all:

My idea is to create a Role lane in Application system type lane

When I try an approach from code above, similar code but instead of pool I use Lane and try to set parent of Lane to other Lane:

   var ObjDefForLane = systemObjDef
   var ObjDefForLaneChild = targetGroup.CreateObjDef(Constants.OT_BPMN_LANE, "Automatic", locale);

   var laneOcc = createLane(typeNum, symbolNum, ObjDefForLane)  // lane from Object definition created in pool - adjusted method similar to bpmnSupport.createBpmnObject(arisObject, defaultPool, symbolNum)
   var laneOccChild = bpmnSupport.createBpmnObject(ObjDefForLaneChild, null, Constants.ST_BPMN_LANE_1);    //( ObjDef  objDef, ObjOcc  parent, int  symbolNum ) 
bpmnSupport.setBpmnParent(laneOccChild, laneOcc);

I get an error on  last "setBpmnParent" method"Error: JavaException: java.lang.IllegalArgumentException: lanes can only have pools as parent"

Does somebody know, if it is possible to create such think as in my example "Automatic" Role lane in "Application System Lane"? Thank you a lot in advance..

Libor

Choose content type: 
Ask a question

Report information

Object Type and Symbol Problem - Need Help

$
0
0

I added this question to another Post (https://www.ariscommunity.com/users/hessphilipp/2010-02-04-symbol-attribute-object-aris-report-script#comment-27487), but it was an old post so I thought I would also add this New Post.

Wondering if anyone can help with a problem I am having. I have some very simple code (see below) to report (from Group or Model focus) Objects on Models including Model Path, Object Path, and Object Type which come from the ObjDefList. Where I am having a problem is I want to include the Object Symbol. I get the Symbols using the ObjOccList.

The problem is the Object Symbols come out in a DIFFERENT ORDER from th eloop than the Object Name and Type.

Is there are way to do this correctly? I have been doing a lot of searching and trying different things without success. It seems to have something to do with having to get some information from the Object Definition Method and some of the information from the Object Occurrence Method I think, but I can't figure it out. Any help would be much appreciated.

Thanks.

============================================================================

var output = Context.createOutputObject();

main();

function main() {
    output.BeginTable(150, Constants.C_BLACK, Constants.C_WHITE, Constants.FMT_LEFT | Constants.FMT_ITALIC, 0);
    
    output.TableRow();
    output.TableCell("Model Path", 75, "Arial", 10, Constants.C_BLACK, Constants.C_LIGHT_BLUE, 0, Constants.FMT_LEFT | Constants.FMT_BOLD, 0);
    output.TableCell("Model Name", 25, "Arial", 10, Constants.C_BLACK, Constants.C_LIGHT_BLUE, 0, Constants.FMT_LEFT | Constants.FMT_BOLD, 0);
    output.TableCell("Object Path", 75, "Arial", 10, Constants.C_BLACK, Constants.C_LIGHT_BLUE, 0, Constants.FMT_LEFT | Constants.FMT_BOLD, 0);
    output.TableCell("Object Name", 50, "Arial", 10, Constants.C_BLACK, Constants.C_LIGHT_BLUE, 0, Constants.FMT_LEFT | Constants.FMT_BOLD, 0);
    output.TableCell("Object Type", 25, "Arial", 10, Constants.C_BLACK, Constants.C_LIGHT_BLUE, 0, Constants.FMT_LEFT | Constants.FMT_BOLD, 0);
    output.TableCell("Object Symbol", 25, "Arial", 10, Constants.C_BLACK, Constants.C_LIGHT_BLUE, 0, Constants.FMT_LEFT | Constants.FMT_BOLD, 0);
    
    var oModels = getRelevantModels();
    for(var x = 0; x < oModels.length; x++)
    {
        var groupPath = oModels[x].Group().Path(Context.getSelectedLanguage());
        var modelName = oModels[x].Name(Context.getSelectedLanguage());
        var cModel = oModels[x];                                                 // Current model   
        var aObjDefs = cModel.ObjDefList();                             // All object definitions that have occurrences in the model
        var ObjOcc = cModel.ObjOccList();                                        // Occurrences of All Object on model
        for (var j = 0; j < aObjDefs.length; j++)                                // Loop through the object definitions
        {
            var oObjDef = aObjDefs[j];                                                                          // Current object definition
            var sObjName = oObjDef.Name(Context.getSelectedLanguage());          // Name of current object
            var sObjPath = oObjDef.Group().Path(Context.getSelectedLanguage())   // Group/Path of current object
            var sObjType = oObjDef.Type()                                                               // Type of current object
            var sObjSym = ObjOcc.SymbolName()                                                  // Default Symbol of current object 
            output.TableRow();
            output.TableCell(groupPath.replace("Main group\\", ""), 75, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT, 0);
            output.TableCell(modelName, 25, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT, 0);
            output.TableCell(sObjPath, 75, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT, 0);
            output.TableCell(sObjName, 50, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT, 0);
            output.TableCell(sObjType, 25, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT, 0);
            output.TableCell(sObjSym, 25, "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT, 0);
        } // for (var j...Object definitions
    }     // for (var x...Models
    
    output.EndTable("Model Object Occurrences", 100, "Arial", 10, Constants.C_BLACK, Constants.C_BLACK, 0, Constants.FMT_LEFT | Constants.FMT_ITALIC, 0);   
    output.WriteReport();
}

function getRelevantModels() {
    var selectedModels = ArisData.getSelectedModels();
    if (selectedModels.length == 0) {
        var selectedGroups = ArisData.getSelectedGroups();
        for (var i = 0; i < selectedGroups.length; i++) {
            var oRelevantModels = selectedGroups[i].ModelList(true);
            if (oRelevantModels.length > 0) {
                selectedModels = selectedModels.concat(oRelevantModels);
            }
        }
    }
    return selectedModels;
}
    

Choose content type: 
Ask a question

Replace logo report

How to get a diagram positionned under a group ?

$
0
0

Hi everyone.

I'm writing a report and I need to launch the report from a Group.

From this group I need to get all the subgroups and eventually get all the EPC's and FAD's, so I'm trying to think about a solution (a recursive one might be the best option) but I'm not sure how it should be done.

Beside that, I'm using the "Childs()" methods, but I only get the subgroups and not the actual EPC or FAD I need.

Here is an example of the problem : 

(0)Group :

                 (1)sub group :

                                     (2)sub sub group:

                                                               (3)sub sub sub group 1 :

                                                                                               (4) Sub sub sub sub group 1

                                                                                                (4)Sub sub sub sub group 2:

                                                                                                                                                 EPC 

                                                                                                                                                 FAD

                                                              (3)sub sub sub group 2:

 

                                    

 If I launch the report from Group , I can get all the subgroups , but I can't reach the EPC and the FAD stored in the sub sub sub sub group 2

If someone has a solution for the problem, I would really appreciate !

Thank you.

Choose content type: 
Ask a question
Viewing all 257 articles
Browse latest View live