Title: Grrovy import isallowed

The import statement seems to be disallowed in swap for groovy  actions.
The workflow bellow will not import with an error of:
Workflow GroovyBugImport 1     
 http://xxxx/webswamp/resources/ui/skins/common/images/critical_16.png  Scriptaction: importAction contains errors: Found illegal import statement in script.  


Is there a way to get the import statement to work?

I am trying to have a complex action that is highly reusable.  I don't want to use customtask's since that will put define the names of the data bits in the Java code.


<?xml version="1.0" standalone="no"?>
<!DOCTYPE workflow SYSTEM "c:\swamp\dtds\workflow.dtd">
<workflow version="1" name="GroovyBugImport" leastSWAMPVersion="1.5">
        <metadata>
                <templatedescription>
        Demonstrate that the implementation of Groovy in SWAMP 1.5.3
        is not working w.r.t. the import statement.
        </templatedescription>
                <description>
        Demonstrate that the implementation of Groovy in SWAMP 1.5.3
        is not working w.r.t. the import statement.
        </description>
                <roles>
                        <!-- definition of roles needed in that workflow -->
                        <role name="owner" restricted="false">
                                <roledatabit>getib.owner</roledatabit>
                        </role>
                        <role name="admin" restricted="true">
                                <description>Admins</description>
                                <rolevalue>swamp_user, swamp_admin</rolevalue>
                        </role>
                        <role name="starter" restricted="false">
                                <rolevalue>swamp_user, swamp_admin</rolevalue>
                        </role>
                        <role name="user" restricted="false">
                                <rolevalue>swamp_user, swamp_admin</rolevalue>
                        </role>
                </roles>
        </metadata>
        <!-- Graph definition -->
        <node name="start" type="start">
                <description>Execute some goovy actions</description>
                <scriptaction name="startAction" language="groovy">
                        <description>start</description>
                        <script>
    wf.getDatabit("getib.started").setValue("true");
        </script>
                </scriptaction>
                <edge to="import" event="none"/>
        </node>
        <node name="import">
                <description>Use the import statement</description>
                <scriptaction name="importAction" language="groovy">
                        <description>use the import statement</description>
                        <script>
    import org.xml.sax.XMLFilter ;                     
    wf.getDatabit("getib.imported").setValue("true");
        </script>
                </scriptaction>
                <edge to="end" event="none"/>
        </node>
        <node name="end" type="end">
                <description>Execute some goovy actions</description>
                <scriptaction name="endAction" language="groovy">
                        <description>end</description>
                        <script>
    wf.getDatabit("getib.ended").setValue("true");
        </script>
                </scriptaction>
        </node>
        <dataset description="Data for retrieving an IB number. See symbols.xml for meanings." state="read-write" name="getib">

                <databit name="owner" type="person" state="read-write" description="process owner"/>
                <databit name="started" type="string" state="read-write">
                        <defaultvalue>false</defaultvalue>
                </databit>
                <databit name="imported" type="string" state="read-write">
                        <defaultvalue>false</defaultvalue>
                </databit>
                <databit name="ended" type="string" state="read-write">
                        <defaultvalue>false</defaultvalue>
                </databit>
        </dataset>
</workflow>

 
     This message may contain privileged and/or confidential information.  If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so.  Thank you.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
swamp-devel mailing list
swamp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swamp-devel
http://swamp.sf.net 

Reply via email to