AS

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)

File attachments
by Kabelo Mangole
Posted on Mon, 12/05/2016 - 11:22

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.

0
by Ana Sequeira Author
Posted on Mon, 12/05/2016 - 12:13

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.

0
by Ana Sequeira Author
Posted on Wed, 12/07/2016 - 12:39

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);

}

 

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock