ChoiceAttributeText 示例

在此示例中,ChoiceAttributeText 业务规则用于设置需求的工作流程。
该工作流程必须满足以下条件:
  • 状态为“新”时,该工作流程的指示信息如下所示:If the requirement is proven to be a valid request, change the status to Accepted. If the requirement is not valid, change the status to either Rejected or Clarify.
  • 状态更改为“已接受”时,该工作流程的指示信息如下所示:The requirements with the highest priority must be planned to a release and estimate their costs. Change the status for these requirements to Planned.
设置需求的工作流程:
  1. 在元素的业务规则容器属性中,输入 =ChoiceAttributeText('Status',"write_defaults")。 业务规则容器属性必须为文本属性。为该属性命名;例如,Workflow。
  2. 单击确定,以显示顶级文件夹的“描述”属性中的缺省 XML 模板。模板的 XML 代码包含在“描述”属性中。
  3. 单击配置 > 属性 > 需求
  4. 打开业务规则容器属性 Workflow 的配置页面。
  5. 输入以下新缺省值:=ChoiceAttributeText('Status')。 通过单击将缺省值复制到所有元素来更新所有元素。
  6. 单击模块 > 需求,然后选择顶级文件夹。
  7. 顶级文件夹的“描述”属性包含 XML 模板代码。单击“描述”属性的编辑按钮,然后在文本参数中写入工作流程指示信息。例如,
     <?xml version="1.0" encoding="UTF-8"?> 
    <texts> 
    <item id="47" text="If the requirement has proven to be a valid request, status should be changed to Accepted. If the requirement is not valid, change status to either Rejected or Clarify."/> 
    <item id="48" text="The requirements with the highest priority should be planned to a release and be estimated with regards to cost. Change status for these requirements to Planned and select a user as responsible for the requirement."/> 
    <item id="49" text="This requirement is ready for implementation. When implementation is started, change status to Started."/> 
    <item id="50" text="This requirement is being implemented. When done, change status to Completed."/>
    <item id="51" text="This requirement is completed and is ready for test. If the requirements passes the test, change status to Verified."/> 
    <item id="52" text ="This requirement is ready for delivery."/> 
    <item id="53" text="This requirement is rejected. Enter a reason for the rejection in the Comments attribute."/>
    <item id="54" text="This requirement needs to be clarified."/>
     </texts>

    XML 代码中的项标识是选项的数据库标识。在此示例中,47 对应于“新”状态,48 对应于“已接受”状态。

  8. 单击确定以保存工作流程指示信息。
某一“新”需求的工作流程指示信息示例。
注: 要在业务规则容器属性中显示工作流程指示信息,必须更新状态。

反馈