ARIS Community - We Love BPM

Report to Export groups, models and objects in XML

Ana CSequeira's picture
by Ana Sequeira in Reports & Macros posted on 2017-02-08

I want to make a report that gives the same result as the ARIS functionality of exporting a model or group as an xml file, and allows to import that xml file in another database.

 

I am trying to make this report but I can't get the file to appear on my computer. This is the code I am using to make the xml export:

    var selectedG = ArisData.getSelectedGroups();
    var xmlExport = Context.getComponent("XMLExport");  
    var options = xmlExport.createDefaultXMLExportOptions(selectedG[0], [g_nloc] );

    options.setZipExport(false);  // No compression
    options.setHierarchyDepth(0); // Assignment level
    options.setRelationDepth(0);  // Connection level
    options.setIsSimpleExport(false); // Minimum export off
    options.setExportUsersAndUsergroups(false); // Users and Usergroups off
    options.setExportCompleteGroupPaths(true); // Complete paths off
    var result = xmlExport.startExport(options);
    var myResult = result.getFileResult();

 

no file is opened when i run the script, i created the script so it would have output xml and I cant seem to find the problem here

5641 Views
0 Likes
1 Comments
Sorry there are no tags
There are no attachments
M. Zschuckelt posted on 2017-02-09

Hello Ana,

apparently you are trying to write a report. Reports are executed on the server. They do not have access to the client file system. You would have to write a macro instead using the macro API.

Regards, M. Zschuckelt