4 Replies Latest reply on May 12, 2014 2:28 PM by ablyth RSS
    ablyth Apprentice

    How do Archetypes deal with duplication?

    I have a question about how Archetypes deal with changes, i'll try to build a good example to explain:


    My Archetype has 4 Expression Rules, i wish to change these so i have edited them in IntelliJ and re-reployed to my Platform with the following changes:


    Rule 1: This rule has stayed exactly the same.

    Rule 2: I have updated the Name of this rule as it previously contained a typo.

    Rule 3: The logic of this rule has been updated, but the name remains the same.

    Rule 4: Because of the changes in Rule 3, i have removed this entry as it is no longer required.


    Ok so what happens when i re-deploy this? I suspect the Platform will intelligently 'undo' the previous Archetype deployment and then apply the new package, can someone clarify that this is the case?




      • Re: How do Archetypes deal with duplication?
        mikew Explorer

        Hi Alan,


        I will let some more experience person correct me if I am wrong, but at present I think if we are talking about just a standard artisan project the method I have witnessed is that artisan checks if a rule named the same as one you are uploading exists.  If yes, it deletes it and then installs the new version.


        So in your case I think this is what would happen:


        Rule 1:  Looks exactly the same after

        Rule 2:  New rule with corrected name is created.  Old rule with typo in name is likely still there.

        Rule 3:  Old rule is replaced with same-named new rule

        Rule 4:  This rule is no longer in your project, but is probably on the platform.


        Stephen Harmon or Clint Dovholuk might be able to confirm or correct this reponse.

          • Re: How do Archetypes deal with duplication?
            sharmon Creator

            Mike's answer is what I'd expect, too. Let's clarify some terminology. An archetype is a definition for a project. Once you instantiate it by choosing it, and bringing it down, it becomes an Artisan project. Think of it like this --> archetype is the class definition; the Artisan project is an instance of the archetype.

          • Re: How do Archetypes deal with duplication?
            ablyth Apprentice

            Thanks Stephen Harmon and Mike Wunderlich, this has really helped me understand how the process works.