0 Replies Latest reply on Sep 20, 2007 10:54 AM by marc blachon

    test of var.mappings list into environment to persist variab

    marc blachon Newbie

      I submitted a simple test (with 2 test cases).
      both tests are defining a var.mappings list within the environment by parsing a string definition of the mapping. Aim was to set 2 types of bonita variables : string and enumeration as instance of pvm Variable class (and put into variableMap). Persistence can be then performed by the pvm.

      - First test case uses the class : VariableDefinition (implementing Mapping). The matcher is based on comparison between the variable name and the name set for the variableDefinition object.
      - Second test case uses the class : MatcherMapping. Mapping definition is done setting the 3 arguments of the constructor: a matcher object (ClassNameMatcher is provided by pvm to compare class of the variable value to the class given in the matcher object def.), a converter (null in our case), the variableClass (extending Variable).
      Note: a patch has been commited by Guillaume in ClassNameMatcher file. An other pb. was met and posted by Guillaume.

      - First test allows to set persistable pvm Variable only if the name of the variable is the same as the name set for the variableDefinition object (matcher). This appears to be a too strong limitation ? But I probably don't understang something ???
      - We would want to have multiple separate files to define bonita environment (repositories, var mappings, db persistence, ..). May be it should be interesting to include this feature within the environment parser ?