Esempio ChoiceAttributeText

In questo esempio, viene utilizzata la business rule ChoiceAttributeText per configurare un workflow per requisiti.
Il workflow deve soddisfare queste condizioni:
  • Quando lo stato è Nuovo, le istruzioni del workflow sono le seguenti: 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.
  • Quando lo stato viene modificato in Accettato, le istruzioni del workflow sono le seguenti: The requirements with the highest priority must be planned to a release and estimate their costs. Change the status for these requirements to Planned.
Configurare il workflow per i requisiti:
  1. Nell'attributo contenitore business rule per un elemento, immettere =ChoiceAttributeText('Status',"write_defaults"). L'attributo contenitore business rule deve essere un attributo Testo. Assegnare un nome all'attributo, ad esempio, Workflow.
  2. Visualizzare il template XML predefinito nell'attributo Descrizione della cartella principale facendo clic su OK. Il codice XML del template viene inserito nell'attributo Descrizione.
  3. Fare clic su Configura > Attributi > Requisiti.
  4. Aprire la pagina di configurazione per Workflow, l'attributo contenitore business rule.
  5. Immettere il seguente valore predefinito nuovo: =ChoiceAttributeText('Status'). Aggiornare tutti gli elementi facendo clic su Copia valore predefinito in tutti gli elementi.
  6. Fare clic su Moduli > Requisiti e selezionare la cartella principale.
  7. L'attributo Descrizione per la cartella principale contiene il codice template XML. Fare clic sul pulsante Modifica per l'attributo Descrizione e scrivere le istruzioni del workflow nel parametro text. Ad esempio,
     <?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>

    Gli ID elemento nel codice XML sono gli ID database per gli elementi di scelta. In questo esempio, 47 corrisponde allo stato New (Nuovo) e 48 allo stato Accepted (Accettato).

  8. Salvare le istruzioni del workflow facendo clic su OK.
Un esempio delle istruzioni del workflow per un nuovo requisito.
Nota: per visualizzare le istruzioni del workflow nell'attributo contenitore business rule, è necessario aggiornare lo stato.

Feedback