Anstis, Michael (M.) wrote:
 If the use-case of migrating packages through the environments holds
 true I'd expect the meta-data associated with packages to remain constant.
  
 Perhaps I've made an assumption that you don't have categories called 
 "Production rules", "QA rules" etc.
  
 Thinking wider; is there a requirement to allow export\import to be 
 sliced and diced many different ways:-
    *
       Export\import a category
    *
       Export\import a package
    *
       Export\import working set
    *
       etc
 
The thing is that there are lots of external dependencies associated 
with a package and package assets. To name a new, category, status (Dev, 
QA, STAGE, PROD), permissions, comments etc.The list will grow bigger 
and bigger when new features get implemented as long as the data 
structure required by these features are  not internal to a package. So 
far we've figured one possible way that might solve the problem: when we 
do package export, we export a data bundle that contains the package and 
all essential data associated with this package (eg, category nodes, 
status nodes etc). And when we do the import, we somehow deal with dirty 
data programmatically (recover or discard the dirty data).
This is doable, but is this a practical approach? I would imagine a 
single package data exported may contains over 60% data of that 
repository. Not to mention the complexity of dealing with dirty data 
during package import.
     ------------------------------------------------------------------------
     *From:* rules-dev-bounces(a)lists.jboss.org
     [mailto:rules-dev-bounces@lists.jboss.org] *On Behalf Of *Michael
     Neale
     *Sent:* 06 August 2010 08:00
     *To:* Rules Dev List
     *Subject:* Re: [rules-dev] Package based import/export in Guvnor
     well for category things - it could be that if a category doesn't
     exist in the target "space" then it is created, if not, it is
     used. There are other things though, which are interlinked - but
     the same issue you bring up applies (which is why this wasn't done
     a while back). 
     So a simple JCR partial export won't really do - needs to be a bit
     more programmatic than that. 
     The question is - in the target space - do we want to create the
     missing things, or remove the links from them as part of the
     export etc... 
     So if RuleA depends on categoryX and categoryY, but only categoryX
     (same name) exists in the target place, then do we create
     categoryY there, or strip it? 
     On Fri, Aug 6, 2010 at 4:44 PM, Jervis Liu <jliu(a)redhat.com
     <mailto:jliu@redhat.com>> wrote:
         Hi,
         I am currently evaluating a Guvnor feature request which is to
         implement
         package based import/export. The idea is to use this feature
         to move a
         rule package from the DEV repo to QA to Stage to the Prod
         repo. For
         details please check 
https://jira.jboss.org/browse/GUVNOR-311. My
         initial investigation shows that it is not possible to do a single
         package import/export technically. A single package in Guvnor
         repository
         is never a self-contained unit. For example, every asset under the
         package has a mandatory attribute which is a reference link to
         category
         information. In short, package can not be exported/imported as
         long as
         it contains references to entities outside package.
         There are two things I would like to ask for your opinions.
         Firstly, can
         you think of any way to implement this import/export feature?
         Personally
         I dont see how this can be done. This is similar to relational
         database,
         generally it is impossible to export and import data from/to a
         single
         non-isolated table in database. Or sometimes it is possible
         but with
         extensive care normally involved in manual work to deal with
         dirty data.
         In our case, one example of dirty data is category, but what
         can we do
         with category information, we discard package information when
         we do
         package export?
         Secondly, if such feature can not be implemented, can we
         figure out a
         different way to help users to better manage the life cycle in
         Guvnor?
         The current version of Guvnor is not very strong on this part
         yet. If
         you are a Guvnor user or you have experience of using similar
         products,
         how did you manage and how do you want to manage the lifecycle
         of assets
         in your repository?
         Thanks,
         Jervis
         _______________________________________________
         rules-dev mailing list
         rules-dev(a)lists.jboss.org <mailto:rules-dev@lists.jboss.org>
         
https://lists.jboss.org/mailman/listinfo/rules-dev
     -- 
     Michael D Neale
     home: 
www.michaelneale.net <
http://www.michaelneale.net>
     blog: 
michaelneale.blogspot.com <
http://michaelneale.blogspot.com>
 ------------------------------------------------------------------------
 _______________________________________________
 rules-dev mailing list
 rules-dev(a)lists.jboss.org
 
https://lists.jboss.org/mailman/listinfo/rules-dev