@@ -58,6 +58,7 @@ public Image getImage() {
5858
5959 @ Override
6060 public void readFromXML (ModelReader modelReader , Element actionXml ) throws Exception {
61+ String type = actionXml .getAttribute (XMLTags .TYPE );
6162 if (type .equalsIgnoreCase (EXECUTE_SCRIPT )) {
6263 // <script file="EmbeddedPy">
6364 // <text> the embedded text </text>
@@ -105,10 +106,10 @@ public void writeToXML(ModelWriter modelWriter, XMLStreamWriter writer) throws E
105106 writer .writeAttribute (XMLTags .TYPE , EXECUTE_SCRIPT );
106107 writeDescriptionToXML (writer , description );
107108 writer .writeStartElement (XMLTags .SCRIPT );
108- writer .writeAttribute (XMLTags .FILE , path );
109+ writer .writeAttribute (XMLTags .FILE , scriptInfo . getPath () );
109110 // The controller updates the text and path not the scriptInfo
110- if (this . path .equals (ScriptInfo .EMBEDDED_PYTHON ) ||
111- this . path .equals (ScriptInfo .EMBEDDED_JAVASCRIPT )) {
111+ if (scriptInfo . getPath () .equals (ScriptInfo .EMBEDDED_PYTHON ) ||
112+ scriptInfo . getPath () .equals (ScriptInfo .EMBEDDED_JAVASCRIPT )) {
112113 final String text = this .text ;
113114 if (text != null ) {
114115 writer .writeStartElement (XMLTags .TEXT );
@@ -119,6 +120,13 @@ public void writeToXML(ModelWriter modelWriter, XMLStreamWriter writer) throws E
119120 writer .writeEndElement ();
120121 }
121122
123+ @ Override
124+ public boolean matchesAction (String actionId ) {
125+ return actionId .equalsIgnoreCase (EXECUTE_SCRIPT ) ||
126+ actionId .equalsIgnoreCase (EXECUTE_PYTHONSCRIPT ) ||
127+ actionId .equalsIgnoreCase (EXECUTE_JAVASCRIPT );
128+ }
129+
122130 public ScriptInfo getScriptInfo () {
123131 return scriptInfo ;
124132 }
0 commit comments