Hi,
I want to create a script which on execution on selected model will ask an user to browse an file from his/ her local system and read the file and update the attributes.
Please suggest how this can be done in ARIS Business Architect 7.1
Thanks in advance.
Tricarico Romain on
Hello,
I do it with this code (here to open an xpdl file) :
var selFile = Dialogs.getFilePath("", "*.xpdl", "", "Select the template XPDL File", 0); if(selFile.length > 0){ var fl = selFile[0]; var xmlReader = Context.getXMLParser(fl.getData()); var document = xmlReader.getDocument(); //your code to read xpdl file }Now to open an Excel file :
var Files = Dialogs.getFilePath("", "*.xls", "D:/BPMap/1_clients/BPMap/CardGenerator", "Get Excel file", 0); //Open a browser on the client side if(Files != null){ var file = Files[0]; var wb = Context.getExcelReader(this.file.getData()); //return the Excel file for read only var shData = wb.getSheetAt(0); //return the first sheet var lines = shData.getRows(); //return all available lines }hope it helps you.
BR,
Romain Tricarico
BPMap.fr