Skip to main content

DeltaGeneration - Get the generated or deleted Files

Comments

18 comments

  • Zendesk API User
    Author: linde - 5/10/2013 16:46

    Very interesting feature. I tried it in a standard Mithras energy project. After changing a page in the pagestore the 2 pagrefs were generated (de and en), very good. The list of generated Files always contains all generated HTML pages. This seems to be wrong. I tried is in a script task before the genration task and after the generation task with the same result. I expected to get a list with 4 files (2 pagerefs 2 languages). Waht's worng there?

    0
  • Zendesk API User
    Author: feddersen - 5/10/2013 19:35

    Have you enabled the "Clear generation directory beforehand" checkbox as mentioned in post?

    0
  • Zendesk API User
    Author: linde - 5/18/2013 10:12

    That was the reason, the checkbox was disabled. The function seems to return a file list of the generation directory. I tried some release scenarios with pages, pagerefs an and pagereffolder. After releasing a pagereffolder the generation task was executed but nothing was generated, so changes in the navigation structure were not deployed. How can I consider this scenario in a delta deployment?

    0
  • Zendesk API User
    Author: feddersen - 5/18/2013 10:17

    Have you set appropriate leveRules, as described in the first blog post? See DeltaGeneration - What is that and why I might need it?

    0
  • Zendesk API User
    Author: linde - 5/18/2013 15:37

    I haven't seen the description of the level rules. I will try this. Thanks.

    0
  • Zendesk API User
    Author: vasanth - 6/28/2013 16:00

    I have follwoed the steps in the DeltaGeneration - What is that and why I might need it? as well as the above steps. For the first its works fine but for the second time i didn't change any file started the deployment but still displays the old generated file information.

    Is there any thing i am missing ???

    Thanks

    0
  • Zendesk API User
    Author: feddersen - 6/28/2013 16:04

    Have you enabled the "Clear generation directory beforehand" checkbox?

    0
  • Zendesk API User
    Author: rrichter - 7/1/2013 15:12

    Hi,

    I tried the following DeploymentSchedule with three Actions

    • Prepare Delta
    • Generate Delta
    • Postprocess Delta

    "Prepare Delta" consists of the following lines

    import de.espirit.firstspirit.access.schedule.*;

    deltaGeneration = DeploymentUtil.createDeltaGeneration(context);
    changeSet = deltaGeneration.calculateChangeSet();
    changeSet.configureGenerateTask();

    context.logInfo("***** isFullGenerate: " + changeSet.isFullGenerate());

    "Generate Delta" is a generation task with the options described above (including the option "Default URLs (SEO)"). Works well with the nodes set by the "Prepare Delta"-Action

    In "Postprocess Delta" I calculate the generated files (works well).

    But I am not able to calculate the deletedPageInfos in this step, because I would have to execute another calculateChangeSet() that destroys the info from the "Prepare Delta"-Task.

    Is there something wrong, or do I have to calculate the deletedPageInfos in the "Prepare Delta"-Task?

    What I want to do is to add a file "to-delete.props" to the generation directory that contains the filenames of the files that have to be deleted.

    Is this possible in the "Postprocess Delta"-Task?

    Regards,

    (a coding colleague of) Raphael.

    0
  • Zendesk API User
    Author: feddersen - 7/1/2013 15:57

    If you need the getDeletedPageInfos after the generation, retrieve it in the "prepare delta" task and write the result into the schedule context, so that you can read it again in your "postprocess delta" task.

    0
  • Zendesk API User
    Author: rrichter - 7/2/2013 9:41

    ... my colleague is for ever and ever indebted to you.

    The "Prepare Delta" now contains the following lines:

    import de.espirit.firstspirit.access.schedule.*;

    deltaGeneration = DeploymentUtil.createDeltaGeneration(context);
    changeSet = deltaGeneration.calculateChangeSet();
    changeSet.configureGenerateTask();
    context.setProperty("deletedPageInfos",changeSet.getDeletedPageInfos());

    The "Postprocess Delta" contains the following lines:

    import de.espirit.firstspirit.access.schedule.*;
    generatedFiles = DeploymentUtil.getGeneratedFiles(context);
    it = generatedFiles.iterator();

    if(it.hasNext()) {
    context.logInfo("Found some generatedFiles.");
    }
    else {
      context.logInfo("No generatedFiles found.");
    }

    while(it.hasNext()) {
    generatedFile = it.next();
      // do some dirty things with the info about the generated file
    }

    deletedPageInfos = context.getProperty("deletedPageInfos");

    it = deletedPageInfos.iterator();
    if(it.hasNext()) {
      context.logInfo("Some deletedPages found.");
    }
    else {
      context.logInfo("No deletedPages found.");
    }
    while(it.hasNext()) {
      deletedPageInfo = it.next();
      // do some nasty things with the info about the deleted file
    }

    It works. Thanks.

    0
  • Zendesk API User
    Author: vasanth - 7/2/2013 13:26

    Thank you Christoph Feddersen. Its working fine

    0
  • Zendesk API User
    Author: lewandowskil - 7/30/2013 14:23

    Hi,

    When I try to delete one site, which was generated in, e.g., 2 languages and afterwards try to delete this site I iterate over deletedPageInfos, but it delivers only the path to my master language, e.g., /de/site/test.html. I expected to receive also /en/site/test.html.

    May I missed anything?

    Regards

    Lukas

    0
  • Zendesk API User
    Author: lewandowskil - 7/30/2013 15:22

    Sorry, my generate configuration was incorrect. Works now as expected.

    0
  • Zendesk API User
    Author: markus_reinsch - 8/28/2013 10:25

    Because of a known bug the query for the deletedPageInfos returns no result at the moment. This posting will be updated after a fix of the bug.

    Due to the comments the bug seems to be fixed.

    Can you please provide the exact FS version for this fix?

    0
  • Zendesk API User
    Author: feddersen - 9/2/2013 11:05

    The bug has been fixed with 5.0.317, so you should be fine with the current release (5.0.318).

    0
  • Zendesk API User
    Author: bIT_sosswald - 2/7/2014 11:15

    Hi,

    is there a possibility to retrieve not only the path to the generated files but also the UID of the pageRef or something? The method getGeneratedFiles only returns a list of strings with the path to the generated files.

    For deleted files it is at least possible to retrieve the Sitestore node id for each deleted page. (See here)

    After a delta generation was performed my module has to do some processing of data which it has to extract out of the pageRefs of the generated pages.

    Greetings

    Sandro

    0
  • Zendesk API User
    Author: bIT_sosswald - 3/11/2014 9:44

    See here and here.

    0
  • Zendesk API User
    Author: Geetha - 12/18/2014 12:55

    Hello,

    Good day

    Iam trying to do partial deployment using delta generation.Please help me .

    Question 1:

    I have modified the EN languages and excecuted the script for

    • Generate Delta
    • Postprocess Delta

    But it contains both EN and DE generatedFiles.How can i set only for EN ~language ???

    Question 2:

    UseCase:


    Added one reference page in site store and exceuted the script .Works fine.

    Again aded the same reference page and excecuted the script.It throws Error as below

    URI conflict detected for SSNodeEntry-2525948-1909967-EN-, unified URI:

    Question 3:

    Is there any method or api for partailDeployment like

    context.logInfo("***** isFullGenerate: " + changeSet.isFullGenerate());

    Thanks in Advance!

    0

Please sign in to leave a comment.