03-24-2017 10:39 AM
I need to hide workflow task custom properties from the workflow-details and task-details page and show only on task-edit page.
Used this below configuration but custom property is still visible on page on task-details though not visible on workflow-details.
abcmodel.xml
<type name="abc:review">
<parent>bpm:activitiOutcomeTask</parent>
<mandatory-aspects>
<aspect>abc:Info</aspect>
</mandatory-aspects>
</type> <aspects>
<aspect name="abc:Info">
<properties>
<property name="abc:Det">
<type>d:mltext</type>
</property>
</properties>
</aspect>
</aspects>
shareconfigcustom.xml
<config evaluator="task-type" condition="abc:review">
<forms>
<form>
<field-visibility>
<show id="abc:Det"/>
<show id="bpm:comment" />
</field-visibility>
<appearance>
<field id="abc:Det" label="customproperty" read-only="true">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">color: black</control-param>
<control-param name="rows">6</control-param>
<control-param name="columns">6</control-param>
</control>
</field>
<field id="bpm:comment" label="Comments">
<control template="/org/alfresco/components/form/controls/textarea.ftl" />
</field>
</appearance>
</form>
<!-- Form configuration for workflow-details page -->
<form id="workflow-details">
<field-visibility>
<hide id="abc:Det"/>
<show id="bpm:comment" />
</field-visibility>
<appearance>
...
</appearance>
</form><form id="task-details">
</forms>
<field-visibility>
<hide id="abc:Det"/>
</field-visibility>
<appearance>
.....
</appearance>
</form></config>
Still able to see custom aspect/property on task details page with this configuration
04-27-2017 02:41 PM
For the task-details, there is no specific form-id is used in data-form
section. Refer C:\<Alfresco_Home>\tomcat\webapps\share\WEB-INF\classes\alfresco\site-data\pages\task-details.xml
<!-- Data Form --> <component>
<region-id>data-form</region-id>
<url>/components/form</url>
<properties>
<itemKind>task</itemKind>
<itemId>{taskId}</itemId>
<mode>view</mode>
<formUI>true</formUI>
</properties>
</component>
To customise this task-details form, I added <formId>task-details</formId>
as mentioned below.
<!-- Data Form --> <component>
<region-id>data-form</region-id>
<url>/components/form</url>
<properties>
<itemKind>task</itemKind>
<itemId>{taskId}</itemId>
<mode>view</mode>
<formUI>true</formUI>
<formId>task-details</formId>
</properties>
</component>Finally in the share-config-custom.xml file add the configuration like,
<form id="task-details">
<field-visibility>
<hide id="abc:Det"/>
<show id="bpm:comment" />
</field-visibility>
<appearance>
</appearance> </form>
04-22-2017 01:14 PM
Hi, defining two forms in one configuration file doesn't solve your problem
You can read about this clearly in Custom Share Workflow UI
Pay attention to following part:
All tasks, including start tasks should have form configuration defined in this way, they will be shown in both view (task details page) and edit (edit task page) modes so that should be considered when defining forms. As shown above the new info.ftl form control can be used to display metadata on an edit form but in an 'informational' way i.e. not in a disabled form control!
The easiest way to solve your problem:
after that use your control in config file to describe the fields that you going to hide:
<control template="/org/alfresco/components/form/controls/your_custom_ftl_name.ftl"/>
Good luck!
04-27-2017 02:45 PM
04-27-2017 02:41 PM
For the task-details, there is no specific form-id is used in data-form
section. Refer C:\<Alfresco_Home>\tomcat\webapps\share\WEB-INF\classes\alfresco\site-data\pages\task-details.xml
<!-- Data Form --> <component>
<region-id>data-form</region-id>
<url>/components/form</url>
<properties>
<itemKind>task</itemKind>
<itemId>{taskId}</itemId>
<mode>view</mode>
<formUI>true</formUI>
</properties>
</component>
To customise this task-details form, I added <formId>task-details</formId>
as mentioned below.
<!-- Data Form --> <component>
<region-id>data-form</region-id>
<url>/components/form</url>
<properties>
<itemKind>task</itemKind>
<itemId>{taskId}</itemId>
<mode>view</mode>
<formUI>true</formUI>
<formId>task-details</formId>
</properties>
</component>Finally in the share-config-custom.xml file add the configuration like,
<form id="task-details">
<field-visibility>
<hide id="abc:Det"/>
<show id="bpm:comment" />
</field-visibility>
<appearance>
</appearance> </form>
Explore our Alfresco products with the links below. Use labels to filter content by product module.