2 Replies Latest reply on May 18, 2007 6:05 AM by aguizar

    PVM variables and wiring context

    csouillard

      I have seen in the code that VariableMap class is using "var.mappings" key to find an object (a List exactly) in the context. The expected return is a list of Mapping objects.
      There is no example showing how to use this mechanism in the project.
      I want to create the necessary infrastructure to ensure the variables I create are StringInstance variables...

      How can I do that ?

      Thanks
      Charles

        • 1. Re: PVM variables and wiring context
          tom.baeyens

          you could start with just putting everything in an UnpersistableVariable

          then you don't need that mapping stuff and all objects will just be stored in memory as in a hashmap.

          the mappings are a more dynamic and configurable way of determining how the variable values get converted and stored.

          in case you want to get started with the mappings (which would be good) you could start by having a look at the jBPM 3 code.

          you could also detect strings there automatically and use StringInstance variables for those instead of the unpersistable instance

          • 2. Re: PVM variables and wiring context
            aguizar

            Charles, if the intent is to store dom elements as strings, it is probably better to introduce a new ElementInstance class to allow elements to be stored directly. Another option is to introduce an ElementToStringConverter that handles the conversion to string transparently.