Why by enumtype dynamic="false"
is set to false? And when should I set it to "true"
?
<enumtype code="MyEnumType" generate="true" autocreate="true" dynamic="false">
<value code="NONE" />
<value code="ONE" />
</enumtype>
In simple words, I can say static enum(dynamic="false"
, default value) is generated as the Java enum. In which list of values can only be changed during compilation time by changing the items.xml. In case of the dynamic enum(dynamic="true"
) we can change(add/remove) its values at runtime using hmc or Impex.
<enumtype code="FixedValueType" autocreate="true" generate="true">
<value code="value1"/>
<value code="value2"/>
</enumtype>
<enumtype code="OrderStatus" autocreate="true" generate="true" dynamic="true">
<value code="CREATED"/>
<value code="ON_VALIDATION"/>
<value code="COMPLETED"/>
<value code="CANCELLED"/>
</enumtype>