ARIS Community - We Love BPM

Data from Macro to Report

prosci8's picture
by Pro Sci in Reports & Macros posted on 2017-05-17

Good day,

I have a question regarding the use of macros. I run a macro whenever a user creates a new folder. This macro executes a report that sets the access for the user. However, I'm not sure how to pass the newly created folder to the report, so currently I set the rights for every folder owned by that user. Long, slow process.

Can anyone please suggest a way to pass the newly created folder from the macro to the report please?

Thank you,


Sorry there are no tags
There are no attachments
Robert Goldenbaum posted on 2017-05-17


well, this should not be necessary, If someone CAN create a sub group, he has to have write access to the parent group. And as far as I know, each sub group is always created with the access rights of the parent group...

BR Robert

Pro Sci posted on 2017-05-19

Hi Robert,

Thank you for your response. When a user creates a folder, they are automatically given RWD access even if the parent folder is RW. If a user belongs to a UserGroup and has RW access to the parent folder, it will inherit from the parent folder and give RW access via the UserGroup, but the user will still have explicit RWD access to the folder he created.

What we do with the script, is remove the Delete access from the newly created folder. Perhaps that's the wrong way to go about it.

Robert Goldenbaum posted on 2017-05-19

Ah yes ok...

Well, you could set a property with the group path or the GUID of the group...   Group path would be better...

Pro Sci posted on 2017-05-19

Indeed setting a property is a good idea. I thought perhaps to have access to the Group object itself though. I found some information on an older thread. If this is my macro:

selection = Context.getSelectedGroups();
if(selection.length > 0)
    reportInfo = Report.createExecInfo("SOME_GUID", selection, Context.getSelectedLanguage());
    result = Report.execute(reportInfo, Context.getShowResult());

To get access to selection object/variable/data in the Report, it appears I just use ArisData.getSelectedGroups(). I was confused about it cause it didn't seem like that would pass through the right data from the macro to the report. I will try both the property way and the other way and see what works/works best. :-)