<commit_before><?xml version="1.0" encoding="UTF-8"?>
<section version="5.0"
         xmlns="http://docbook.org/ns/docbook"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:xs="http://www.w3.org/2001/XMLSchema"
         xmlns:xlink="http://www.w3.org/1999/xlink"
         xmlns:xi="http://www.w3.org/2001/XInclude"
         xmlns:ns="http://docbook.org/ns/docbook">
  <title>DSL editor</title>

  <para>The DSL editor allows DSL Sentences to be authored. The reader should
  take time to explore DSL features in the Drools Expert documentation; as the
  syntax in Guvnor's DSL Editor is identical. The normal syntax is extended to
  provide "hints" to control how the DSL variable is rendered and validated
  within the user-interface.</para>

  <para>The following "hints" are supported:-</para>

  <itemizedlist>
    <listitem>
      <para>{&lt;varName&gt;:&lt;regular expression&gt;}</para>

      <para>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.</para>
    </listitem>

    <listitem>
      <para>{&lt;varName&gt;:ENUM:&lt;factType.fieldName&gt;}</para>

      <para>This will render an enumeration in place of the DSL variable when
      the DSL Sentence is used in the guided editor.
      &lt;factType.fieldName&gt; binds the enumeration to the model Fact and
      Field enumeration definition. This could be either a "Guvnor
      enumeration" (i.e. defined as a Knowledge Base "Enumeration") or a Java
      enumeration (i.e. defined in a model POJO JAR file).</para>
    </listitem>

    <listitem>
      <para>{&lt;varName&gt;:DATE:&lt;dateFormat&gt;}</para>

      <para>This will render a Date selector in place of the DSL variable when
      the DSL Sentence is used in the guided editor.</para>
    </listitem>

    <listitem>
      <para>{&lt;varName&gt;:BOOLEAN:&lt;[checked | unchecked]&gt;}</para>

      <para>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.</para>
    </listitem>
  </itemizedlist>

  <figure>
    <title>DSL rule</title>

    <mediaobject>
      <imageobject>
        <imagedata align="center"
                   fileref="images/Chapter-Guvnor/DSLEditor.png" format="PNG"
                   scalefit="1" xml:base="../../"></imagedata>
      </imageobject>
    </mediaobject>
  </figure>
</section><commit_msg>GUVNOR-1732: Custom Forms in DSL 	- Documentation Updated<commit_after><?xml version="1.0" encoding="UTF-8"?>
<section version="5.0"
         xmlns="http://docbook.org/ns/docbook"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:xs="http://www.w3.org/2001/XMLSchema"
         xmlns:xlink="http://www.w3.org/1999/xlink"
         xmlns:xi="http://www.w3.org/2001/XInclude"
         xmlns:ns="http://docbook.org/ns/docbook">
  <title>DSL editor</title>

  <para>The DSL editor allows DSL Sentences to be authored. The reader should
  take time to explore DSL features in the Drools Expert documentation; as the
  syntax in Guvnor's DSL Editor is identical. The normal syntax is extended to
  provide "hints" to control how the DSL variable is rendered and validated
  within the user-interface.</para>

  <para>The following "hints" are supported:-</para>

  <itemizedlist>
    <listitem>
      <para>{&lt;varName&gt;:&lt;regular expression&gt;}</para>

      <para>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.</para>
    </listitem>

    <listitem>
      <para>{&lt;varName&gt;:ENUM:&lt;factType.fieldName&gt;}</para>

      <para>This will render an enumeration in place of the DSL variable when
      the DSL Sentence is used in the guided editor.
      &lt;factType.fieldName&gt; binds the enumeration to the model Fact and
      Field enumeration definition. This could be either a "Guvnor
      enumeration" (i.e. defined as a Knowledge Base "Enumeration") or a Java
      enumeration (i.e. defined in a model POJO JAR file).</para>
    </listitem>

    <listitem>
      <para>{&lt;varName&gt;:DATE:&lt;dateFormat&gt;}</para>

      <para>This will render a Date selector in place of the DSL variable when
      the DSL Sentence is used in the guided editor.</para>
    </listitem>

    <listitem>
      <para>{&lt;varName&gt;:BOOLEAN:&lt;[checked | unchecked]&gt;}</para>

      <para>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.</para>
    </listitem>
    
    <listitem>
      <para>{&lt;varName&gt;:CF:&lt;factType.fieldName&gt;}</para>

      <para>This will render a button that will allow you to set the value of
      this variable using a Custom Form. In order to use this feature, a 
      Working-Set containing a Custom Form Configuration for factType.fieldName
      must be active. If there is no such Working-Set, a simple text box
      is used (just like a regular variable).</para>
      
      <para>For more information, please read more about Working-Sets and
      Custom Form Configurations.</para>
    </listitem>
  </itemizedlist>

  <figure>
    <title>DSL rule</title>

    <mediaobject>
      <imageobject>
        <imagedata align="center"
                   fileref="images/Chapter-Guvnor/DSLEditor.png" format="PNG"
                   scalefit="1" xml:base="../../"></imagedata>
      </imageobject>
    </mediaobject>
  </figure>
</section>
{'fraction_non_alphanumeric': 0.11621810555749738, 'fraction_numerical': 0.009786787836420832, 'mean_word_length': 3.0246132208157523, 'pattern_counts': {'":': 0, '<': 101, '<?xml version=': 2, '>': 101, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, 'xml': 16}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1923069', 'n_tokens_mistral': 1848, 'n_tokens_neox': 1719, 'n_words': 561}