6.6. The Domain Specific Language Editor

Sentence constructed from domain specific languages (or DSL sentences) can be edited in the DSL editor. See the Red Hat JBoss BRMS Development Guide for more information about domain specific languages. The DSL syntax is extended to provides hints to control how the DSL variables are rendered. The following hints are supported:

  • {<varName>:<regular expression>}

    This will render a text field in place of the DSL variable when the DSL sentence is used in the guided editor. The content of the text field will be validated against the regular expression.

  • {<varName>:ENUM:<factType.fieldName>}

    This will render an enumeration in place of the DSL variable when the DSL sentence is used in the guided editor. <factType.fieldName> binds the enumeration to the model fact and field enumeration definition. This could be either a Knowledge Base enumeration or a Java enumeration, i.e., defined in a model POJO JAR file.

  • {<varName>:DATE:<dateFormat>}

    This will render a date selector in place of the DSL variable when the DSL sentence is used in the guided editor.

  • {<varName>:BOOLEAN:<[checked | unchecked]>}

    This will render a dropdown selector in place of the DSL variable, providing boolean choices, when the DSL sentence is used in the guided editor.

Figure 6.34. DSL Editor

A screenshot of the DSL editor