Hi there,Thanks to JPotts guide to advanced workflows i got a decent understandigs of how to exploit them and how to interact with them via webscripts.Now I'm facing a problem that does not report any error log so i don't know how to fix it.Basically i can give to the task the correct title via the messages/workflow.properties file, but from the very same file alfresco does not get the "description".I have to use this and not share because i need to read them via webscript [ service/api/task-instances ].In the end what i get is:
"name": "wpa:anagraficaTask",
"title": "Task's Title",
"description": "ThisIsTheNameFieldInActivityDesigner"
Instead of :
"name": "wpa:anagraficaTask",
"title": "Task's Title",
"description": "This should be the description"
So it reads workflow's name and description correctly, the task's name correctly but not the task description( note that "ThisIsTheNameFieldInActivityDesigner" is the Name form in the task properties in Activity Designer ).Here are the configuration files (i have cut off redundant/optional parts to enhance readability […]): context/service-context.xml:
[…]
<bean id="wpa.sciaWorkflowBootstrap" parent="workflowDeployer">
<property name="workflowDefinitions">
<list>
<props>
<prop key="engineId">activiti</prop>
<prop key="location">alfresco/extension/workflows/scia.bpmn</prop>
<prop key="mimetype">text/xml</prop>
<prop key="redeploy">true</prop>
</props>
</list>
</property>
<property name="labels">
<list>
<value>alfresco.module.${project.artifactId}.messages.scia</value>
</list>
</property>
<property name="models">
<list>
<value>alfresco/module/${project.artifactId}/model/wpaModel.xml</value>
</list>
</property>
</bean>
messages/workflow.properties :
[..]
wpa_workflowmodel.type.wpa_anagraficaTask.title=Task Title
wpa_workflowmodel.property.wpa_anagraficaTask.description=This should be the description
model/wpamodel.xml :
[..]
<model name="wpa:workflowmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
[..]
<!– Import Alfresco Dictionary Definitions –>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
<!– Import Alfresco Content Domain Model Definitions –>
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
<import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm" />
</imports>
<!– Introduction of new namespaces defined by this model –>
<namespaces>
<namespace uri="iconn.test.wrapperpa" prefix="wpa" />
</namespaces>
<types>
[..]
<type name="wpa:anagraficaTask">
<parent>bpm:workflowTask</parent>
</type>
[..]
</types>
</model>
user task section in the bpmn:
<userTask id="usertask6" name="ThisIsTheNameFieldInActivityDesigner" activiti:assignee="${initiator.properties.userName}" activiti:formKey="wpa:anagraficaTask">
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[logger.log("|=====1====| executing js di create anagrafica");
var node = bpm_package.children[0];
node.properties['wpa:idTask']=task.getId();
node.save();]]></activiti:string>
</activiti:field>
</activiti:taskListener>
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[logger.log("|=====1====| executing js di complete anagrafica");
var node = bpm_package.children[0];
var link = "wrapperpa/showdaticatastali";
node.properties['wpa:link']=link;
node.save();]]></activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
Any idea?Am i doing something wrong or is this some sort of a bug that i should report?Thank you.