Get properties from modeler form

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Established Member II

Get properties from modeler form

Hi!

I need to retrieve the properties of a form from the modeler, but if I use formData.getFormProperties() does not work. Returns the properties of an internal form, not a form for the modeler.

How can I recover and manage these properties or forms fields from the modeler?

Resume:

<userTask id="sid-568BA090-92A5-46A2-8680-4B2DF7A9D8D6" name="PruebaForm" activiti:assignee="$INITIATOR" activiti:formKey="4004">
<extensionElements>
<activiti:formProperty id="new_property_1" name="pruebaCampo" type="string"/>
<activiti:formProperty id="new_property_2" name="pruebaCampo2" type="string"/>
<activiti:taskListener event="create" class="com.activiti.extension.tasks.service.ComboBoxTask"/>
<modeler:allow-send-email><![CDATA[true]]></modeler:allow-send-email>
<modeler:form-reference-id><![CDATA[4004]]></modeler:form-reference-id>
<modeler:form-reference-name><![CDATA[PruebaCombo]]></modeler:form-reference-name>
<modeler:activiti-idm-initiator><![CDATA[true]]></modeler:activiti-idm-initiator>
<modeler:editor-resource-id><![CDATA[sid-568BA090-92A5-46A2-8680-4B2DF7A9D8D6]]></modeler:editor-resource-id>
</extensionElements>
</userTask>

I access to activiti:formProperty... but not modeler:form-reference...

Regards,

fegor

2 Replies
Highlighted
Active Member II

Re: Get properties from modeler form

What kind of Activiti are using? Activiti engine stand-alone or embedded in Alfresco?

You should consider using Activiti Community or Alfresco Process Services. This is way easier, because you can access all form properties very easy by just selecting them, but if I recall correctly with Alfresco Content Services and corresponding data model in background, you can put form properties into execution variable like this:

execution.setVariable('wf_processVariable',task.getVariable('wf_formProperty));

Highlighted
Established Member II

Re: Get properties from modeler form

Is Activiti stand-alone (Activiti Enterprise v1.5.3.6), my problem is add new options in a dropdown (combobox) from Java UserTask.

I access to a userTask form (via serviceForm.getDataForm()) but not a modeler form.