Hi all,
I have an association in my custom workflow model.
------------------------------------------------------------
<aspect name="ddwf:customData">
<properties>
<property name="ddwf:customText">
<type>d:text</type>
<mandatory>false</mandatory>
</property>
</properties>
<associations>
<association name="ddwf:customAssoc">
<source>
<mandatory>false</mandatory>
<many>false</many>
</source>
<target>
<class>ddwf:customType</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
</aspect>
<type name="ddwf:customType">
<properties>
<property name="ddwf:customTypeName">
<type>d:text</type>
</property>
<property name="ddwf:customTypeMessage">
<type>d:text</type>
</property>
</properties>
</type>
------------------------------------------------------------
I know how to set Properties inside a ScriptTaskListener:
execution.setVariable('ddwf:customText', "Here is the custom Text");I know how to generate the type:
var newCT = companyHome.createNode("Test","ddwf:customType");
newCT.properties["ddwf:customTypeName"] = "Custom Name";
newCT.properties["ddwf:customTypeMessage"] = "Custom Message";
newCT.save();But I cannot associate the new Node, because execution.getVariable('ddwf:customAssoc') is always undefined.
How can I add newCT to my customModel ?
execution.setVariable('ddwf:customAssoc', newCT) does not work.
Is it possible ? I haven't found an example
Thank you