model variable (bug or reserved word?)

Started by malcolm_t_evans, October 09, 2020, 08:38:53 AM

Previous topic - Next topic

malcolm_t_evans

Whilst testing out some scripts I used a variable model as a string whilst importing a csv file.  However when trying to run the script, jArchi produces the following error:

Script Error: javax.script.ScriptException: TypeError: model.find is not a function in <eval> at line number X

As soon as I change the variable name to something other than model, the script works fine.  I couldn't find any mention of "model" as a existing variable or declared function in the jArchi wiki.  So is this a potential bug or a reserved word that should be mentioned in the wiki to avoid using?

Thanks,

Malcolm

Jean-Baptiste Sarrodie

Hi,

Yes, 'model' is already defined by jArchi and references the current model. It's API is described here: https://github.com/archimatetool/archi-scripting-plugin/wiki/jArchi-Object#model-2

Regards,

JB
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.