WY

Hi,

I am new to Aris reports and macros. Glad to be here communicating with all you expert.

I now trying to re-writing a legacy VB script which export process definitions to excel. My goal is to create a report in ARIS Business Architect 7.1 with javascript which can generate the same report as VB script.

In the VB script, it get an 'object ID' of numeric type through a COM object. The code is

<code>

Set oProcessDefList = CreateObject("ARIS.OBJDEFLIST." & cARISVersion)

...

oObjDef = oProcessDefList.Get(nI)

...

oWorksheet.Cells(nRow, A).value = oObjDef.ObjectID()

</code>

The ObjectID() method in the last line returns a number and put it into a cell.

In javascript, I tried Item.GUID(), Item.ObjectID() and Item.OID() method to get object ID. None of them returns the same value as what VB script returns. I also tried some attributes like AT_EGOV_ELAK_ID, AT_ID, AT_OBJ_ACS_ID,AT_RBE_OBJ_ID, and AT_EXTERNAL_ID, still not correct. It seems in new version of Aris, the object ID of numeric type is no longer supported.

 

My question is if there is a way to get the numeric object ID with javascript. Or if it is possible to create COM object in javascript like it is in VB script?

Any tips is appreciated. Thanks in advance.

 

Regards,

Will

by Torsten Haase
Posted on Thu, 12/09/2010 - 11:24

Hi Will,

the method to use is "Item.ObjectID()" which returns the objectID as a string.

If you really need to create an array in JavaScript just use var myArray = new Array()  or the short form, for example if you have 2 ObjOccs (occ1 and occ2), which should be placed in an array:

var myArray = [occ1, occ2]

You should not need to use the Microsoft-specific COM in JavaScript. You can create excel output using the built-in Excel support (Context.createExcelWorkbook(...)).

I hope this helps. Feel free to ask if youo have any furter questions.



BR, Torsten

0
by Will Yang Author
Posted on Tue, 12/14/2010 - 03:45

Hi Torsten,

Thanks for your help and sorry for late to reply.

I have tried the method "Item.ObjectID()" which returns a String, but what I need is object ID of  numeric type.

Maybe I failed to express my problem clearly. Let me try again. Previouse version of ARIS, say ARIS 5.0, supports two types of objectID. The string one looks like "aa####bb##" just the same as what we got by using "Item.ObjectID()"  and the other one is numeric like 183000. The numeric objectID is retrieved through a Microsoft-specific COM object. As my company have decided to update ARIS to version 7.1, I can no longer get the numeric objectID which is critical to our other applications. That's why I have to find the method returning numerci objectID or to find a way to use COM object in ARIS script.

Really appreciate your help.

Regards,

Will

0
by Torsten Haase
Posted on Tue, 12/14/2010 - 09:21

Hi Will,

there is a way to get the old-style OID:

use Item.OID() which returns an array of 4 integers:

[0] is always 0

[1] is the first integer you'll need

[2] is the second integer you'll need

[3] has not been used in ARIS 5

the old OID was a concatenation of value[2] and value[1] using string format "%u%u".

BR,

Torsten

0
by Will Yang Author
Posted on Thu, 12/16/2010 - 04:02

Hi Torsten,

The method works! Thank you so much!

Regards,

Will

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