gpt4 book ai didi

workflow - 编辑任务工作流 FORM 更改

转载 作者:行者123 更新时间:2023-12-04 05:59:31 28 4
gpt4 key购买 nike

我创建了自己的自定义工作流程(目前这只是临时工作流程自定义),并且我设法自定义了启动工作流程表单,但是无法自定义第二个表单,这是编辑任务表单(当用户启动流程并分配给“某人”,“某人”在收件箱中获取任务,他会看到编辑任务表单)。第二种形式与我的第一种形式相同,外加一些额外的字段。这是因为我需要“某人”可以查看和编辑在启动工作流表单上输入的数据。所以我基本上将第一个表单配置复制到第二个表单,但这不起作用,只呈现集合和文本区域。现在有人如何自定义这个?

工作流定义

<process id="appppV1" name="Proces otvaranja projekta">

<startEvent id="start" name="Start" activiti:formKey="mcwm:submitStart"></startEvent>

<userTask id="preparationOfProjectCharter" name="Priprema projektne povelje" activiti:assignee="${bpm_assignee.properties.userName}" activiti:formKey="mcwm:preparationOfProjectCharter">
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>if (typeof bpm_workflowDueDate != 'undefined') task.setVariableLocal('bpm_dueDate', bpm_workflowDueDate);</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>

工作流模型:
<types>
<type name="mcwm:submitStart">
<parent>bpm:startTask</parent>
<properties>
<property name="mcwm:projectName">
<title>Naziv projekta</title>
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="mcwm:shortProjectName">
<title>Skraćeni naziv projekta</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="mcwm:projectOrderer">
<title>Naručitelj projekta</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="mcwm:shortProjectOrderer">
<title>Skraćeni naziv naručitelja projekta</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="mcwm:isoProcess">
<title>ISO 9000 proces</title>
<type>d:text</type>
<mandatory>true</mandatory>
<default> </default>
<constraints>
<constraint name="mcwm:isoProcessChoices" type="LIST">
<parameter name="allowedValues">
<list>
<value> </value>
<value>održavanje - aplikativno</value>
<value>održavanje - sistemsko</value>
<value>konsalting</value>
<value>razvoj - sa odobrenjem arhitekture</value>
<value>razvoj - bez odobrenjem arhitekture</value>
<value>mali razvoj</value>
<value>implementacija</value>
</list>
</parameter>
</constraint>
</constraints>
</property>
<property name="mcwm:reporting">
<title>Učestalost izveštavanja</title>
<type>d:text</type>
<mandatory>true</mandatory>
<default>mesečno</default>
<constraints>
<constraint name="mcwm:reportingChoices" type="LIST">
<parameter name="allowedValues">
<list>
<value>mesečno</value>
<value>kvartalno</value>
<value>po okončanju</value>
</list>
</parameter>
</constraint>
</constraints>
</property>
<property name="mcwm:projectGoals">
<title>Ciljevi projekta</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>

<property name="mcwm:beginDate">
<title>Datum početka projekta</title>
<type>d:date</type>
<mandatory>true</mandatory>
</property>

<property name="mcwm:endDate">
<title>Datum okončanja projekta</title>
<type>d:date</type>
<mandatory>false</mandatory>
</property>

<property name="mcwm:team">
<title>Projektni tim (*promena tipa kontorle)</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>

<property name="mcwm:teamResource">
<title>Predviđeni utrošak ljudskih resursa (*promena tipa kontorle)</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>

<property name="mcwm:teamComent">
<title>Komentar na predviđeni utrošak ljudskih resursa</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>

<property name="mcwm:changeComent">
<title>Komentar izmene</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
</properties>
<!-- To select a user -->
<mandatory-aspects>
<aspect>bpm:assignee</aspect>
</mandatory-aspects>
</type>

<type name="mcwm:preparationOfProjectCharter">
<parent>bpm:workflowTask</parent>
<properties>
<property name="mcwm:editTask">
<title>Edit task</title>
<type>d:text</type>
<mandatory>true</mandatory>
</property>
</properties>
</type>

共享配置-custom.xml
<config evaluator="string-compare" condition="activiti$appppV1">
<forms>
<form>
<field-visibility>
<hide id="bpm:workflowDescription" />
<hide id="bpm:workflowDueDate" />
<hide id="bpm:workflowPriority" />
<show id="bpm:assignee" />

<show id="mcwm:projectName" />
<show id="mcwm:shortProjectName" />
<show id="mcwm:projectOrderer" />
<show id="mcwm:shortProjectOrderer" />
<show id="mcwm:isoProcess" />
<show id="mcwm:reporting"/>
<show id="mcwm:projectGoals"/>
<show id="mcwm:beginDate"/>
<show id="mcwm:endDate"/>

<show id="mcwm:team"/>
<show id="mcwm:teamResource"/>
<show id="mcwm:teamComent"/>
<show id="mcwm:changeComent"/>


<hide id="packageItems" />
<hide id="bpm:sendEMailNotifications" />
</field-visibility>
<appearance>
<set id="" appearance="title" label-id="apppv1.set.projekat" />
<set id="general" appearance="fieldset" label-id="appppV1.set.general" />
<set id="date" template="/org/alfresco/components/form/2-column-set.ftl" appearance="fieldset" label-id="appppV1.set.date" />
<set id="team" appearance="fieldset" label-id="appppV1.set.team" />
<set id="change" appearance="fieldset" label-id="appppV1.set.change" />


<field id="mcwm:projectName" set="general" />
<field id="mcwm:shortProjectName" set="general" />
<field id="mcwm:projectOrderer" set="general" />
<field id="mcwm:shortProjectOrderer" set="general" />
<field id="mcwm:isoProcess" set="general" />
<field id="mcwm:reporting" set="general" />

<field id="mcwm:projectGoals" set="general">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">width: 65%</control-param>
<control-param name="rows">5</control-param>
</control>
</field>

<field id="mcwm:beginDate" set="date"/>
<field id="mcwm:endDate" set="date"/>
<field id="bpm:assignee" set="team" label="Voditelj projekta"/>
<field id="mcwm:team" set="team">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">width: 65%</control-param>
<control-param name="rows">5</control-param>
</control>
</field>
<field id="mcwm:teamResource" set="team"/>
<field id="mcwm:teamComent" set="team">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">width: 65%</control-param>
<control-param name="rows">5</control-param>
</control>
</field>

<field id="mcwm:changeComent" set="change">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">width: 65%</control-param>
<control-param name="rows">5</control-param>
</control>
</field>
</appearance>
</form>
</forms>

share-config-custom.xml - 第二种形式
<config evaluator="task-type" condition="mcwm:preparationOfProjectCharter">
<forms>
<form>
<field-visibility>
<show id="mcwm:projectName"/>
<show id="mcwm:editTask"/>
<hide id="bpm:workflowDescription" />
<hide id="bpm:workflowDueDate" />
<hide id="bpm:workflowPriority" />
<show id="bpm:assignee" />

<show id="mcwm:projectName" />
<show id="mcwm:shortProjectName" />
<show id="mcwm:projectOrderer" />
<show id="mcwm:shortProjectOrderer" />
<show id="mcwm:isoProcess" />
<show id="mcwm:reporting"/>
<show id="mcwm:projectGoals"/>
<show id="mcwm:beginDate"/>
<show id="mcwm:endDate"/>

<show id="mcwm:team"/>
<show id="mcwm:teamResource"/>
<show id="mcwm:teamComent"/>
<show id="mcwm:changeComent"/>
</field-visibility>
<appearance>
<set id="" appearance="title" label-id="apppv1.set.projekat" />
<set id="general" appearance="fieldset" label-id="appppV1.set.general" />
<set id="date" template="/org/alfresco/components/form/2-column-set.ftl" appearance="fieldset" label-id="appppV1.set.date" />
<set id="team" appearance="fieldset" label-id="appppV1.set.team" />
<set id="change" appearance="fieldset" label-id="appppV1.set.change" />


<field id="mcwm:projectName" set="general" />
<field id="mcwm:shortProjectName" set="general" />
<field id="mcwm:projectOrderer" set="general" />
<field id="mcwm:shortProjectOrderer" set="general" />
<field id="mcwm:isoProcess" set="general" />
<field id="mcwm:reporting" set="general" />

<field id="mcwm:projectGoals" set="general">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">width: 65%</control-param>
<control-param name="rows">5</control-param>
</control>
</field>

<field id="mcwm:beginDate" set="date"/>
<field id="mcwm:endDate" set="date"/>
<field id="bpm:assignee" set="team" label="Voditelj projekta"/>
<field id="mcwm:team" set="team">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">width: 65%</control-param>
<control-param name="rows">5</control-param>
</control>
</field>
<field id="mcwm:teamResource" set="team"/>
<field id="mcwm:teamComent" set="team">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">width: 65%</control-param>
<control-param name="rows">5</control-param>
</control>
</field>

<field id="mcwm:changeComent" set="change">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">width: 65%</control-param>
<control-param name="rows">5</control-param>
</control>
</field>
<field id="mcwm:editTask" set="general" read-only="true"/>
</appearance>
</form>
</forms>

我尝试在带有 force="true"属性的显示标签中使用,这显示了我提交的但数据没有从我的开始传输?!

预先感谢您的帮助。

问候,
亚历山大

最佳答案

我认为您没有看到任何字段,因为 mcwm:preparationOfProjectCharter 任务没有您要显示的属性。

如果您希望第二个任务具有与第一个任务相同的属性,则必须在任务模型中定义它们。

如果属性完全相同并且重复很多,您可以将它们指定为一个方面,并将它们作为强制方面添加到任务模型中。

关于workflow - 编辑任务工作流 FORM 更改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9094614/

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