AR

I am creating one report in this report I want to print all variants list which are associated with specific function(L4) entity in model.

how can I do this using script???

I can extract the list of all function now I want to  extract variant which is associated with each function.

please help me guys it's very important for me....

 

 

by Tricarico Romain
Posted on Tue, 07/08/2014 - 23:31

Hi Ankit,

To get the list of variants, use the API function "objdef.Variants()". this function returns a list of definition object that are variant of "objdef", or an empty list if "objdef" has no variant.

ex:

var variants = myDefinition.Variants();       //myDefinition is an object definition or a model

for(var i = 0; i < varaints.length; i++){
         var myVariant = variants[i];
         // write what you want to do with the variant here
}

 

Best Regards

ps. Don't forget to use "F1" key from script editor to get help.

Example : Type "ObjDef" in the script editor, select the word and type "F1" to get all function available for object definition.

0
by Ankit ranka Author
Posted on Thu, 07/10/2014 - 07:56

In reply to by BPMap

thanks alot  Tricarico Romain :)  this information is really helpful for me....  

I have one more question here that I want to extract organizational unit and location which are associated with this variant..

I am able to extract the organizational unit and location which are associated with any function entity only.. 

suppose in a model I have "A" function(L4) entity and on this function entity one variant "B" is present(it may be a normal variant or master object) now I want to extract organization unit and location which are associated with "B". 

please help me in this regards...:)

and please let me know if you have any confusion.....

0
by Tricarico Romain
Posted on Fri, 07/11/2014 - 11:46

Hi,

To get connected object to another one, use the function getConnectedObjs(objType):

this function return a list of object definitions.

In your case, to get the organizational unit connected to your variant :

var variants = myDefinition.Variants();       //myDefinition is an object definition or a model
 
for(var i = 0; i < varaints.length; i++){
         var myVariant = variants[i];
         var uos = myVariant.getConnectedObjs(Constants.OT_ORG_UNIT);
         for(var iuo = 0; iuo < uos.length; iuo++){
                  var uo = uos[iuo];
                  //write here what you want to do with each UO connected.
         }
}

Best Regards

Romain Tricarico

http://www.bpmap.fr

0
by Ankit ranka Author
Posted on Sat, 07/12/2014 - 12:42

Thanks a lot Tricarico once again I got the exact answer :) this is what i was looking for thanks again..

I have some more question for you :)

how can I  identify Master object of a function.....

 

 

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