ARIS Community - We Love BPM

Query to list all the starting, ending process interfaces in an EPC?

Ana CSequeira's picture
by Ana Sequeira in Professional ARIS posted on 2016-12-02

Hello, 

I have to make a query that will list to an excel file, the following:

- All the process interfaces in an EPC that have no incomming connections, this means we are talking about a starting process interface (a process interface that it's the starting element of the EPC)

and the process interfaces that have no outgoing connections, this means we are talking about the process interface as

an ending element.

 

The image attached to this post shows the type of excel that is exactly what I want according to the EPC on the image on the left side.

 

(the import thing here is to identify which images are inputs and which images are outputs)

4234 Views
0 Likes
3 Comments
Sorry there are no tags
Attachments
Kabelo Mangole posted on 2016-12-05

Hi Ana, this can be done with a script using the below code:

oModel.BuildGraph(true);//Creates (internally) the model graph and assigns the marks.

var oStartObjects = oModel.StartNodeList();// Returns the list of all start objects or roots of a model graph

var oEndObjects = oModel.EndNodeList();// Returns the list of all end objects or sheets in the model graph

 

From then on you can use an if statement within a for loop to sort out process interfaces from events.

Ana Sequeira posted on 2016-12-05

Thank you a lot for your help.

I was trying to solve the problem with the query because my client has no direct permissions for scripting so it was easier that way.

But I can also take your advise, make the script and have my client request those permissions, since I have been trying to solve this with the query and looks impossible to get the output I want.

Ana Sequeira posted on 2016-12-07

My solution: 

 

  foldersList = ArisData.getActiveDatabase().GroupList(ArisData.getSelectedGroups()[0]);

    for (var j = 0; j < foldersList.length; j++) {  

        var positionFolder = foldersList[j].Name(selectedLanguage); //isto imprime na consola o nome da pasta atual (no ciclo)
        dummyOutput.TableRow();
        dummyOutput.TableCell(foldersList[j].Name(selectedLanguage), 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);

        oGroup = foldersList[j]; //pasta atual
        oModelList = oGroup.ModelList(false);
        dummyOutput.TableCell("", 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
        for (k = 0; k < oModelList.length; k++) {
            if (oModelList[k].Type().equals("EPC")) {
                dummyOutput.TableCell(oModelList[k].Name(selectedLanguage), 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
                var symbols = [Constants.ST_PRCS_IF];

                var proInterface = oModelList[k].ObjDefListBySymbols(symbols);

                oModelList[k].BuildGraph(true); //Creates (internally) the model graph and assigns the marks.
                var oStartObjects =  oModelList[k].StartNodeList(); // Returns the list of all start objects or roots of a model graph
                var oEndObjects =  oModelList[k].EndNodeList(); // Returns the list of all end objects or sheets in the mode //graph  

                for (var i = 0; i < proInterface.length; i++) {
                    dummyOutput.TableRow();
                    dummyOutput.TableCell("", 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
                    dummyOutput.TableCell("", 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);

                    if (existsInArray(oStartObjects, proInterface[i])) {
                        dummyOutput.TableCell(proInterface[i].Name(selectedLanguage) + "\nINPUT", 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
                    } else {
                        if (existsInArray(oEndObjects, proInterface[i])) {
                            dummyOutput.TableCell(proInterface[i].Name(selectedLanguage) + "\nOUTPUT", 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);
                        } else {
                            dummyOutput.TableCell(proInterface[i].Name(selectedLanguage), 20, "Arial", 10, Constants.C_BLACK, Constants.C_WHITE, 0, Constants.FMT_CENTER, 0);

                        }
                 
                    } 

  dummyOutput.EndTable("TESTSHEET1", 100, "Arial", 10, Constants.C_BLACK, Constants.C_BLACK, 0, Constants.FMT_LEFT | Constants.FMT_ITALIC, 0);
}