In this example, the ChoiceAttributeText business rule
is used to set up a workflow for requirements.
The workflow must meet these conditions:
- When the status is New, the workflow instructions are as follows: 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.
- When the status is changed to Accepted, the workflow instructions
are as follows: The requirements with the highest priority
must be planned to a release and estimate their costs. Change the
status for these requirements to Planned.
Set up the workflow for the requirements:
- In the business rule container attribute for an element, enter =ChoiceAttributeText('Status',"write_defaults").
The business rule container attribute must be a Text attribute. Name
the attribute; for example, Workflow.
- Display the default XML template in the Description attribute
in the top folder by clicking OK. The template
XML code is placed in the Description attribute.
- Click .
- Open the configuration page for Workflow, the business rule container
attribute.
- Enter the following new default value: =ChoiceAttributeText('Status').
Update all the elements by clicking Copy Default Value
to All Elements.
- Click and select the top folder.
- The Description attribute for the top folder contains the XML
template code. Click the Edit button for the
Description attribute and write your workflow instructions in the
text parameter. For example,
<?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>
The item IDs in the XML code are the
database IDs for the choice items. In this example, 47 corresponds
to the New status and 48 corresponds to the Accepted status.
- Save the workflow instructions by clicking OK.

Note: For the workflow instructions to be displayed in the
business rule container attribute, the status must be updated.