1 Reply Latest reply on Nov 5, 2007 9:04 AM by tom.baeyens

    process and nodes bidirectionnal relation

    porcherg

      If I understand well the pvm model, a Node cannot live outside a process definition (resp. outside a Node for a nested node).

      But if I create a ProcessDefinitionImpl, a NodeImpl (with the default empty constructor) and I set this node as the initial node of the process definition (method setInitial), the Node has no reference to the process.

      If the Node can't live outside a ProcessDefinition, maybe we need to mark the default constructor as restricted to the package ?

      regards,
      Guillaume

        • 1. Re: process and nodes bidirectionnal relation
          tom.baeyens

           

          "porcherg" wrote:
          maybe we need to mark the default constructor as restricted to the package ?


          if that is not a problem for hibernate, that is a good idea.

          but be carefull. it could be that it works, but that it is much less inefficient. in some cases, hibernate has to generate subclasses to bypass limited visibility. make sure you check those kind of things before you make it less visible then public.

          in any case, we should make sure that the docs give good guidance. the javadocs should explain that the process.createNode should be used as a factory at all times (also for the initial node)