06-19-2019 06:49 AM
Is it possible to retrieve: workflow process definition start form model / task form model entries, in same order as defined in content model properties, via Public Rest API?
e.g. of custom content type:
<type name="sc:test">
<title>Test Model</title>
<parent>bpm:startTask</parent>
<properties>
<property name="sc:firstName">
<title>First Name</title>
<type>d:text</type>
</property>
<property name="sc:lastName">
<title>Last Name</title>
<type>d:text</type>
</property>
<property name="sc:birthDate">
<title>Birth Date</title>
<type>d:date</type>
</property>
...........................
...........................
...........................
</properties>
<mandatory-aspects>
<aspect>bpm:assignee</aspect>
</mandatory-aspects>
</type>
After calling: GET /process-definitions/{processDefinitionId}/start-form-model, ordering of the result entries are not same as they are defined in above described model (1. firstName, 2.lastName, 3.birthDate ...).
06-19-2019 10:09 PM
Hi,
You can set field visibility and field ordering in 'Share-config-custom.xml' as follows :
<config evaluator="string-compare" condition="activiti$nameofProcess">
<forms>
<form>
<field-visibility>
<show id="sc:firstName" /><show id="sc:lastName" />
<show id="sc:birthDate" />
</field-visibility>
<appearance>
<field id="sc:firstName" /><field id="sc:lastName" />
<field id="sc:birthDate" />
</appearance>
</form>
</forms>
</config>
The above config is for workflow start task, condition contains the process id with prefix 'activiti$'.
Thanks,
Vidhi
06-20-2019 12:22 AM
Hello,
Thanks for your reply. I do not use share, I want to know if same thing was achievable from public Rest API, it would be nice if forms GET methods have some sorting functionality.
Explore our Alfresco products with the links below. Use labels to filter content by product module.