parameters transition within tasks
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2014 05:40 AM
Hi,
i'm developing a custom workflow(with activiti). I have a problem:
ChildrenByTags API return an array of ScriptNode and i want to store the name of every node in aziende(array).After this, i want to hand this array to following user-task for printing it.
How can i do? Can i hand an array? Or can i only hand a single variable?
i'm developing a custom workflow(with activiti). I have a problem:
<serviceTask id="alfrescoScripttask1" name="fornisce elenco aziende" activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate"> <extensionElements> <activiti:field name="script"> <activiti:string> var tag = "sigima"; var taggedNodes = companyhome.childrenByTags(tag); var aziende= new Array(); for(var i=0; taggedNodes.length; i++){ aziende=taggedNodes.name; } </activiti:string> </activiti:field> </extensionElements> </serviceTask>
ChildrenByTags API return an array of ScriptNode and i want to store the name of every node in aziende(array).After this, i want to hand this array to following user-task for printing it.
How can i do? Can i hand an array? Or can i only hand a single variable?
Labels:
- Labels:
-
Archive
7 REPLIES 7
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2014 06:46 AM
Hi,
You can the array of script nodes into a workflow variable, then you can use it in the following user task.
Hope this helps you.
You can the array of script nodes into a workflow variable, then you can use it in the following user task.
Hope this helps you.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2014 06:27 AM
Thanks for your response,
i have another questions: can i report array elements in my model content custom? I want to visualize name property of every node.
Can i write this? And how can i do whether i don't know the array's length?
i have another questions: can i report array elements in my model content custom? I want to visualize name property of every node.
<aspect name="wf:aziendeScelte"> <properties> <property name="wf:taggedNodes[0].name"> <type>d:text</type> </property> <property name="wf:taggedNodes[1].name"> <type>d:text</type> </property> </properties> </aspect>
Can i write this? And how can i do whether i don't know the array's length?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2014 06:33 AM
Thanks for your response,
i have another questions: can i report array elements in my model content custom? I want to visualize name property of every node.
<code>
<aspect name="wf:aziendeScelte">
<properties>
<property name="wf:taggedNodes[0].name">
<type>d:text</type>
</property>
<property name="wf:taggedNodes[1].name">
<type>d:text</type>
</property>
</properties>
</aspect>
</node>
Can i write this?
i have another questions: can i report array elements in my model content custom? I want to visualize name property of every node.
<code>
<aspect name="wf:aziendeScelte">
<properties>
<property name="wf:taggedNodes[0].name">
<type>d:text</type>
</property>
<property name="wf:taggedNodes[1].name">
<type>d:text</type>
</property>
</properties>
</aspect>
</node>
Can i write this?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2014 08:13 AM
Hi,
You dont know the size of tags, so to implement this have a single property with multiple values enabled. as below
You dont know the size of tags, so to implement this have a single property with multiple values enabled. as below
<aspect name="wf:aziendeScelte"> <properties> <property name="wf:taggedNodesNames"> <type>d:text</type> <multiple>true</multiple> </property> </properties> </aspect>
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2014 02:41 PM
What's "wf:taggedNodesNames" ? In this way could i see property name every node of array?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2014 01:33 AM
yes
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2014 06:21 AM
Don't work: i don't visualize names of ScriptNode array in the following task.
<serviceTask id="alfrescoScripttask1" name="fornisce elenco aziende" activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate"> <extensionElements> <activiti:field name="script"> <activiti:string> var tag = "collaborazione"; var wf_taggedNodes = companyhome.childrenByTags(tag); execution.setVariable('wf_taggedNodes','wf_taggedNodes'); </activiti:string> </activiti:field> </extensionElements>
<type name="wf:sceltaAzienda"> <parent>bpm:workflowTask</parent> <mandatory-aspects> <aspect>wf:aziendeScelte</aspect> <aspect>wf:ordineInfoCollaborazione</aspect> </mandatory-aspects> </type> <aspect name="wf:aziendeScelte"> <properties> <property name="wf:taggedNodesNames"> <type>d:text</type> <multiple>true</multiple> </property> </properties> </aspect>
<config evaluator="task-type" condition="wf:sceltaAzienda"> <forms> <form> <field-visibility> <show id="wf:aziendeScelte" /> <show id="bpm:assignee" /> <show id="wf:tipoOrdineColl" /> <show id="wf:tempoPagamentoColl" /> <show id="packageItems" /> <show id="transitions" /> </field-visibility> <appearance> <set id="aziende" appearance="title" label-id="Aziende selezionate" /> <set id="assignee" appearance="title" label-id="workflow.set.assignee" /> <set id="other" appearance="title" label-id="Dettagli ordine" /> <set id="items" appearance="title" label-id="workflow.set.items" /> <set id="response" appearance="title" label-id="workflow.set.response" /> <field id="wf:aziendeScelte" label="azienda" set="aziende" > <control template="/org/alfresco/components/form/controls/info.ftl" /> </field> <field id="bpm:assignee" label="workflow.field.assign_to" set="assignee" /> <field id="wf:tipoOrdineColl" label="Tipo ordine" set="other" /> <field id="wf:tempoPagamentoColl" label="Tempo pagamento" set="other" /> <field id="packageItems" label="Specifica del prodotto" set="items" /> <field id="transitions" set="response" /> </appearance> </form> </forms> </config>
