OB

Can someone please point me to any documented examples, or help me with the following?

I would like to populate a UML Package Tree using macros, and have found that there is an method in the Uml Object Model, namely metamodel.UmlElementFactory.createPackage that looks like a contender.  How does one call it from within the macro?  I think I'm grappling with Aris Scripts' namespace references.

Also is there a way to direct macro output to a log or java console?

Many thanks.

by Nanji Katana
Posted on Tue, 03/29/2011 - 09:55

Hi Oren.

For logging to a file using Macro or Report scripts, you can use the setFile method of the Context class as shown below:

 var configFileData = (new java.lang.String(sLogFileContent)).getBytes("UTF-8")
 Context.setFile("info.cfg", Constants.LOCATION_COMMON_FILES, configFileData)

You just have to be careful in naming your file because it repels special characters. You could also replace the location argument value with Constants.LOCATION_OUTPUT.

Hope this helps.

 

 

 

 

0
by Oren Ben Author
Posted on Wed, 03/30/2011 - 21:07

Hi Nanji,

I've tried it out and yes this is exactly what I'm after.  Many thanks for the advice.

 

 

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