[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

2189.0. "Modeling Entity Tree Operations" by COOKIE::KITTELL (Richard - Architected Info Mgmt) Fri Jan 24 1992 13:39

We're looking at adding some capabilities to a model that will allow the
creation of multiple entity instances at once. We already have defined a
Generate verb for when multiple instances of a single class are to be
created. Suppose we have

                Root

              A1
            
        B1  B2  B3  B4

We want a command that will allow an A2 sub-tree to be created with instances
whose identifers and attributes are the same as the children of A1, resulting in

                Root

           A1                A2
            
     B1  B2  B3  B4    B1  B2  B3  B4


For the sake of consistency across the models, we're looking to see if
any existing models already support such a sub-tree copy operation, and if
so what verb is used. We're considering COPY or CLONE, or COPY_SUBTREE.



T.RTitleUserPersonal
Name
DateLines
2189.1why not create?TOOK::CALLANDERMCC = My Constant CompanionFri Jan 24 1992 15:036
    why wouldn't you use the create command, maybe with a module
    specific argument like "from=A1".
    
    create class root subclass a2 from = a1
    
    
2189.2Copy seems betterBLUMON::SYLORArchitect = Buzzword GeneratorWed Jan 29 1992 00:207
    Re .1: Shudder, no, that's ****not**** how to do it.
    
    With EMA V1 (today's Common Agent and MCC base) I'd define an action,
    call it Copy, and have a "Destination" argument of type LocalEntityName
    and a "Copy Decendents" argument of type BOOLEAN.
    
    Mark
2189.3We'll go with CopyCOOKIE::KITTELLRichard - Architected Info MgmtWed Jan 29 1992 17:2528
RE: .1

>    why wouldn't you use the create command, maybe with a module
>    specific argument like "from=A1".

Jill,

We thought about using Create, and rejected it for a couple of reasons. First,
we try to limit what a directive does, preferring to add a new directive
once the functionality really gets extended. We try to look at each argument
to a directive and ask whether it modifies *how* the directive does what
it does, or whether the argument fundamentally changes *what* the directive 
does. If it is the latter, we go looking for a different directive.

Second, our model already has an alternative way of creating instances, called
Generate. Generate creates n instances of one specific class, and is only
used where it is practical for the agent to select the instance ids.

I try to give first preference to verbs that are already defined in
MCC_VEA_DEF.H, and I noticed COPY was there.

On your specific suggestion of using a directive argument of From, I try
to steer us away from arguments that are prepositions, as they only invite
confusion with qualifiers, where-the-comma-goes, etc.

Thanks for the responses, all.

Richard
2189.4I like copyTOOK::CALLANDERMCC = My Constant CompanionFri Jan 31 1992 14:124
    Good reasoning Rich, I do like Marks copy command though. It
    seems clean, and domain FM already sets a preceidence for
    using that.
    
2189.5Copy it isCOOKIE::KITTELLRichard - Architected Info MgmtFri Jan 31 1992 15:182
We're going to use Copy.