AnsweredAssumed Answered

Convert Alfresco ScripNode to ActivitiScriptNode

Question asked by erny18031 on Jul 13, 2014
Latest reply on Jul 16, 2014 by erny18031
Hi.

In a Alfresco 4.2.c workflow, I have a task model like this:
<blockcode>

<type "my:tasktype">

           <property name="my:folder">
                <title>Folder</title>
                <type>d:noderef</type>
            </property>

</blockcode>

and I use a ScriptExecutionListener like this:
<javascript>

var folder = companyhome.createFolder(name);
execution.setVariable("my_folder") = folder.nodeRef;

</javascript>

but I receive an exception with message:
<blockcode>

org.activiti.engine.ActivitiException: Passed value is not an instance of ActivitiScriptNode, cannot set variable value.

</blockcode>

Is it possible to convert Alfresco ScriptNode type to ActivitiScriptNode from within JavaScript? How?

I've googled a lot and read Alfresco source code, but still haven't found a way to do it.

Thanks
Regards.
Erny

Outcomes