Workflow 露天:显示其他任务中的任务字段(查看)
我正在将新工作流部署到alfresco 4.0.e。 我有一个formkey=“cwf:submitLeaveTask”的任务 代码如下:Workflow 露天:显示其他任务中的任务字段(查看),workflow,alfresco,activiti,alfresco-share,Workflow,Alfresco,Activiti,Alfresco Share,我正在将新工作流部署到alfresco 4.0.e。 我有一个formkey=“cwf:submitLeaveTask”的任务 代码如下: <type name="cwf:submitLeaveTask"> <parent>bpm:startTask</parent> <properties> <property name="cwf:leaveDescription">
<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>
bpm:startTask
d:文本
d:int
真的
d:日期
真的
d:文本
真的
带薪休假
病假
此任务已使用formkey连接到另一个任务:“cwf:SubmitSubstitutionUser”
bpm:ActivityOutComeTask
d:文本
拒绝
批准
拒绝
编辑\u程序包\u项目\u操作
{custom.workflow.model}submitsubstitutionUserDecisionForLeaveOutput
我需要在第二个任务中显示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。
有什么问题,我应该怎么做?您无法看到这些属性,因为您将它们放在工作流模型的property xml字段中,并附加到另一个任务类型(cwf:submitLeaveTask)中。 您应该使用方面而不是属性。Alfresco中的方面类似于可以在特定模型中的每种类型中重用的对象,而不是一次只能绑定到一种类型的属性:
<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>
我的方面
d:日期
d:int
那么,您应该将其绑定为:
<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>
bpm:startTask
d:文本
d:文本
真的
带薪休假
病假
cwf:myAspect
在第二个任务中,您必须执行以下操作:
<parent>bpm:cwf:submitLeaveTask</parent>
bpm:cwf:submitLeaveTask
这将继承第一个表单/任务的字段。好的,我也将此方面附加到了第二个任务中,之后我可以看到字段,但是它们是可编辑的,我使用信息模板查看它们,现在它正在工作。非常感谢你。
<parent>bpm:cwf:submitLeaveTask</parent>