AnsweredAssumed Answered

How to include ordinary Javascript in processdefinition.xml

Question asked by nobel on Feb 8, 2010
Latest reply on Feb 8, 2010 by mrogers
Hi everyone,

   
I have a javascript file called myworkflow.js that contains

function myalffun()
{
     window.alert("something");
return;
}

In my processdefinition.xml i included js as follows:

……
<transition name="approve" to="l10_content_authoring" >
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<import resource="/Company Home/Data Dictionary/Scripts/myworflow.js"/>
<expression>
        myalffun();
</expression>
</script>
</action>
</transition>
…..

The system throws an error as "window" is not defined?

Is there any configuration to be done to use ordinary javascript in processdefintion.xml?

Plz guide me.

Advance Thanks,
nobel

Outcomes