02-24-2021 03:18 AM
I develop workflow and i need to set default authorities in people picker (start-workflow form).
Example:
I think i should to set "default" value to association in model.xml file
<association name="scwf:assignees"> <title>Assignees</title> <source> <mandatory>false</mandatory> <many>true</many> </source> <target> <class>cm:person</class> <mandatory>false</mandatory> <many>true</many> </target> </association>But i don't know, how to set array of authorities
02-24-2021 03:37 AM
There is no support for default values in an association. There technically cannot be one because in order to define a default, you would have to know the reference value (node reference), which can differ from system to system (i.e. between dev and prod), or specific elements may not even exist. In addition, any default values in the model will not be reflected in the form - rather they would be set in the backend when a form has been provided without a value.
The only thing that could be done - with some non-trivial customisation - is to develop a custom form control which takes a "control-param" from the form configuration that denotes default values (e.g. names of groups), and dynamically resolves those names via search functionality, automatically adding any of the groups that could successfully be resolved to the list of selected values.
02-24-2021 03:37 AM
There is no support for default values in an association. There technically cannot be one because in order to define a default, you would have to know the reference value (node reference), which can differ from system to system (i.e. between dev and prod), or specific elements may not even exist. In addition, any default values in the model will not be reflected in the form - rather they would be set in the backend when a form has been provided without a value.
The only thing that could be done - with some non-trivial customisation - is to develop a custom form control which takes a "control-param" from the form configuration that denotes default values (e.g. names of groups), and dynamically resolves those names via search functionality, automatically adding any of the groups that could successfully be resolved to the list of selected values.
Explore our Alfresco products with the links below. Use labels to filter content by product module.