Obtain and use Vocabulary values

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Process wizard > Business Rules > Business rules examples >

Obtain and use Vocabulary values

Bizagi allows you to create Vocabularies or Sequences that can be configured for access from one or more processes or applications.

Vocabularies and Sequences can be invoked from within business rules by using a set of functions available in the Miscellaneous category.

 

Miscellaneous

 

Obtain a Vocabulary definition

To obtain the value stored in a specific Vocabulary use the resolveVocabulary function.

 

The syntax of this function is:

CHelper.resolveVocabulary(Me,"VocabularyName")

 

In a Claims and Complaints process a case must be solved in a specified time. This time is established according to a Service Level Agreement or SLA, that is the maximum allowed time to resolve a case. The duration of the Resolve Task must be set based on the SLA, and it is used to collect statistics and analyze the process performance. As the SLA can change according to the Company┬┤s policies it is defined as a Constant Definition in a Vocabulary.

 

In order to set the Duration of the Resolve Task create an expression On Enter of this Task.

 

CHelper34

 

In a expression module, use the Me.Duration function to set the duration of the Task

 

CHelper35

 

To assign a value to the Duration, call the resolveVocabulary function and pass as input parameter the SLA definition. Just select this constant definition from the Process Vocabulary list and the complete function will be automatically inserted.

 

CHelper36

 

The next image shows the complete expression:

 

CHelper37

 

Me.Duration=CHelper.resolveVocabulary(Me,"SLA");

 

Finally click OK to save the changes.