AG

Dear Community, 

 

I just started to study scripting for the reports, so the questions may seem silly, but please tell me.    There is a problem, I need to develop the report in table form for the model eEPC. In the table for each function I need to display role, information system, incoming and outgoing documents.    Tell me please, how to define for each function role, information system, and documents?    I understand that I need to analyze all the communications to function, and thus find the desired object. I need to use the methods getConnectedObj, getConnectedObjOccs, does it?    Please, If you can explain with an example.   Please suggest!    Thanks!    Best Regards,  Anastasia 
by Łukasz Kowol
Posted on Mon, 04/18/2011 - 15:27
//1-st step - get selecter EPC model(s)
var oModelsEPCList = ArisData.getSelectedModels();
//2-nd step - get object occurrences in selected model - un this case FUNCTIONS
var oObjFUNC = oModelsEPCList [0].ObjOccListFilter(Constants.OT_FUNC);

Now You have function list from Your EPC model. From each function object You can get attributes like name, description, type, etc (as You need), by object definition 

for ( nObjFuncL=0 ; nObjFuncL < oObjFUNC.length ; ObjFuncL ++ ) {
var My_name = oObjFUNC[nObjFuncL].ObjDef().Attribute(Constants.AT_NAME, g_nloc).GetValue(true)
var My_desc = oObjFUNC[nObjFuncL].ObjDef().Attribute(Constants.AT_DESC, g_nloc).GetValue(true)
//etc

If You want to get objects connected with each function You can find it by incoming or outgoing connections and source/target objects.
var InCxn = oObjFUNC[nObjFuncL].InEdges(Constants.EDGES_ALL);
var OutCxn = oObjFUNC[nObjFuncL].InEdges(Constants.EDGES_ALL);
var SourceObj = InCxn[nInCxnL].SourceObjOcc();
var TargetObj = OutCxn[nOutCxnL].TargetObjOcc();
You can also use getConnectedObjOccs(SymbolTypes) function...
For example (connected documents):
var ConnObjOccs = oObjFUNC[nObjFuncL].getConnectedObjOccs(Constants.ST_DOC)

If You want to get more by one type You must invoke this method with array of types by parameter
Example:
getConnectedObjOccs([Constants.ST_APPL_SYS_TYPE; Constants.ST_DOC])

 

0
by Łukasz Kowol
Posted on Mon, 04/18/2011 - 15:36
of course it's wrong (syntax error) getConnectedObjOccs([Constants.ST_APPL_SYS_TYPE; Constants.ST_DOC]); this ic correct: getConnectedObjOccs([Constants.ST_APPL_SYS_TYPE, Constants.ST_DOC]);
0
by Anastasia Guskova Author
Posted on Tue, 04/19/2011 - 12:26

Lukasz, Thank you very much for Your help!

Now I understood everything.

 

Best Regards, 

Anastasia 
0
by Libor Zvalo
Posted on Fri, 01/04/2019 - 15:13

Thank you Lukasz,really good explanation, maybe one more correction (isnt it ?):

var OutCxn = oObjFUNC[nObjFuncL].InEdges(Constants.EDGES_ALL);

correct:

var OutCxn = oObjFUNC[nObjFuncL].OutEdges(Constants.EDGES_ALL);

Best,

Libor

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