archimatetool / archi-scripting-plugin

jArchi - Scripting for Archi: ArchiMate Modelling Tool
https://www.archimatetool.com
122 stars 33 forks source link

error when set specialization #103

Closed osanimmnt closed 2 years ago

osanimmnt commented 2 years ago

selection.filter("node").each(function(e) { console.log("start"); var so = e.prop("Sistema Operativo"); if (so!=null){ console.log(so); if (so.indexOf("Window") !== -1 || so.indexOf("window") !== -1){ console.log("Windows"); if (so.indexOf("2003") !== -1) {e.specialization = "Windows Server 2003";} if (so.indexOf("2008") !== -1) {e.specialization = "Windows Server 2008";} if (so.indexOf("2012") !== -1) {e.specialization = "Windows Server 2012";} if (so.indexOf("2016") !== -1) {e.specialization = "Windows Server 2016";} if (so.indexOf("2019") !== -1) {e.specialization = "Windows Server 2019";}

     }

     if (so.indexOf("Linux") !== -1 || so.indexOf("linux") !== -1){
        console.log("linux");  
        if (so.indexOf("Oracle") !== -1 || so.indexOf("oracle") !== -1) {e.specialization = "Linux Oracle";}
        else {
            {e.specialization = "Linux";}
        }         
     }
 }

});

Version of jArchi, Operating System

1.1.1.202108181210

Expected Behaviour

specialization is no set.

Actual Behaviour

Steps to Reproduce the Behaviour (with attached test files/script)

  1. run script
  2. nothing happend
osanimmnt commented 2 years ago

the script worked properly with previous version

Phillipus commented 2 years ago

Version of jArchi, Operating System 1.1.1.202108181210

Did you try with jArchi version 1.2.0 which supports Specializations?