<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to include ordinary Javascript in processdefinition.xml in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-include-ordinary-javascript-in-processdefinition-xml/m-p/242620#M195750</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a javascript file called myworkflow.js that contains&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;function myalffun()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.alert("something");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;return;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my processdefinition.xml i included js as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;……&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;transition name="approve" to="l10_content_authoring" &amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript"&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;script&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;import resource="/Company Home/Data Dictionary/Scripts/myworflow.js"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;expression&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myalffun();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/expression&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/action&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/transition&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;…..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The system throws an error as "window" is not defined?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any configuration to be done to use ordinary javascript in processdefintion.xml?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Plz guide me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Advance Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;nobel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Feb 2010 13:58:39 GMT</pubDate>
    <dc:creator>nobel</dc:creator>
    <dc:date>2010-02-08T13:58:39Z</dc:date>
    <item>
      <title>How to include ordinary Javascript in processdefinition.xml</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-include-ordinary-javascript-in-processdefinition-xml/m-p/242620#M195750</link>
      <description>Hi everyone,&amp;nbsp;&amp;nbsp;&amp;nbsp; I have a javascript file called myworkflow.js that containsfunction myalffun(){&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; window.alert("something");return;}In my processdefinition.xml i included js as follows:……&amp;lt;transition name="approve" to="l10_content_authoring" &amp;gt;&amp;lt;action class="org.alfresco.repo.workflow.jbpm.</description>
      <pubDate>Mon, 08 Feb 2010 13:58:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-include-ordinary-javascript-in-processdefinition-xml/m-p/242620#M195750</guid>
      <dc:creator>nobel</dc:creator>
      <dc:date>2010-02-08T13:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to include ordinary Javascript in processdefinition.xml</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-include-ordinary-javascript-in-processdefinition-xml/m-p/242621#M195751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's not an issue of the scripting language.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You are running your script on a server and there is no "window" object to communicate with.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 14:08:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-include-ordinary-javascript-in-processdefinition-xml/m-p/242621#M195751</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2010-02-08T14:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to include ordinary Javascript in processdefinition.xml</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-include-ordinary-javascript-in-processdefinition-xml/m-p/242622#M195752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi mrogers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks for your reply,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Actually i want to create a link through javascript to pop us a jsp page where a user is asked to upload a file while performing workflow process. I am trying this way because i could not include the file browse text box via model.xml&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;plz guide me how to use javascript there? This will suit my needs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in Advance&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;nobel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 15:19:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-include-ordinary-javascript-in-processdefinition-xml/m-p/242622#M195752</guid>
      <dc:creator>nobel</dc:creator>
      <dc:date>2010-02-08T15:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to include ordinary Javascript in processdefinition.xml</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-include-ordinary-javascript-in-processdefinition-xml/m-p/242623#M195753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In general you shouldn't attempt to interact with a user in a workflow transition.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A better solution may be to create a workflow task that has a content property for the user to fill in.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2010 17:58:35 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-include-ordinary-javascript-in-processdefinition-xml/m-p/242623#M195753</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2010-02-08T17:58:35Z</dc:date>
    </item>
  </channel>
</rss>

