gpt4 book ai didi

workflow - Alfresco:在另一个任务中显示任务字段(查看它们)

转载 作者:行者123 更新时间:2023-12-02 05:05:55 25 4
gpt4 key购买 nike

我正在将新的工作流程部署到 alfresco 4.0.e。我有一个任务 formkey="cwf:submitLeaveTask"这是代码:

    <type name="cwf:submitLeaveTask">
<parent>bpm:startTask</parent>
<properties>
<property name="cwf:leaveDescription">
<type>d:text</type>
</property>
<property name="cwf:duration">
<type>d:int</type>
<mandatory>true</mandatory>
</property>
<property name="cwf:startDate">
<type>d:date</type>
<mandatory>true</mandatory>
</property>
<property name="cwf:leaveType">
<type>d:text</type>
<mandatory>true</mandatory>
<constraints>
<constraint name="cwf:leaveType" type="LIST">
<parameter name="allowedValues">
<list>
<value>paid leave</value>
<value>sick leave</value>
</list>
</parameter>
</constraint>
</constraints>
</property>
</properties>
</type>

此任务通过 formkey:"cwf:submitSubstitutinUSer"连接到另一个任务

    <type name="cwf:submitSubstitutingUser">
<parent>bpm:activitiOutcomeTask</parent>
<properties>
<property name="cwf:substitutingDecisionForLeaveOutcome">
<type>d:text</type>
<default>Reject</default>
<constraints>
<constraint name="cwf:substitutingDecisionForLeaveOutcomeOptions"
type="LIST">
<parameter name="allowedValues">
<list>
<value>Approve</value>
<value>Reject</value>
</list>
</parameter>
</constraint>
</constraints>
</property>
</properties>
<overrides>
<property name="bpm:packageItemActionGroup">
<default>edit_package_item_actions</default>
</property>
<property name="bpm:outcomePropertyName">
<default>{custom.workflow.model}submitSubstitutingUserDecisionForLeaveOutcome
</default>
</property>
</overrides>
</type>

我需要在第二个任务中显示 cwf:startDate 和 cwf:duration。我在 share-workflow-form-config.xml 中有这段代码

<config evaluator="task-type" condition="cwf:submitSubstitutingUser">
<forms>
<form>
<field-visibility>
<show id="taskOwner" />
<show id="cwf:startDate" />
<show id="cwf:duration" />
<show id="cwf:substitutingDecisionForLeaveOutcome" />
</field-visibility>
<appearance>
<set id="" appearance="title" label-id="workflow.set.task.info" />
<set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl" />
<set id="response" appearance="title" />

<field id="taskOwner" set="info"></field>
<field id="cwf:startDate" set="info"></field>
<field id="cwf:duration" set="info"></field>
<field id="cwf:substitutingDecisionForLeaveOutcome" label-id="workflow.field.outcome"
set="response">
<control
template="/org/alfresco/components/form/controls/workflow/activiti-transitions.ftl" />
</field>

</appearance>
</form>
</forms>

</config>

但我在表单中看不到 cwf:startDate 和 cwf:duration。哪里出了问题,我应该怎么做?

最佳答案

您看不到这些属性,因为您将它们放在工作流模型的属性 xml 字段中,附加到另一个任务类型 (cwf:submitLeaveTask)。您应该使用方面而不是属性。 Alfresco 中的方面就像您可以在该特定模型的每种类型中重用的对象,而不是一次只能绑定(bind)到一种类型的属性:

 <aspects>
<aspect name="cwf:myAspect">
<title>My Aspect</title>
<properties>
<property name="cwf:startDate">
<type>d:date</type>
</property>
<property name="cwf:duration">
<type>d:int</type>
</property>
</properties>
</aspect>

然后,你应该像这样绑定(bind)它:

<type name="cwf:submitLeaveTask">
<parent>bpm:startTask</parent>
<properties>
<property name="cwf:leaveDescription">
<type>d:text</type>
</property>
<property name="cwf:leaveType">
<type>d:text</type>
<mandatory>true</mandatory>
<constraints>
<constraint name="cwf:leaveType" type="LIST">
<parameter name="allowedValues">
<list>
<value>paid leave</value>
<value>sick leave</value>
</list>
</parameter>
</constraint>
</constraints>
</property>
</properties>
<mandatory-aspects>
<aspect>cwf:myAspect</aspect>
</mandatory-aspects>
</type>

关于workflow - Alfresco:在另一个任务中显示任务字段(查看它们),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16300942/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com