Aller au contenu principal

How to find out if a generate task is a delta generation?

Commentaires

1 commentaire

  • Zendesk API User
    Author: jrauschenbusch - 7/17/2014 8:40

    Ok,

    i've found the answer. Here is the reference on how to use the delta generation feature: DeltaGeneration - What is that and why I might need it?

    Here the code snippet of my Delta-Generation-Configuration-Script:

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


    DeltaGeneration deltaGeneration = DeploymentUtil.createDeltaGeneration(context);

    DeltaGeneration.ChangeSet changeSet = deltaGeneration.calculateChangeSet();

    changeSet.configureGenerateTask();

    context.setProperty("isDeltaGeneration", true);

    context.setProperty("isFullGeneration", changeSet.isFullGenerate());

    Here a code snippet of myExecutable:

    public class ShowCaseExecutable implements Executable {

       void init(ScriptContext context) {
         Boolean isDeltaGeneration = (Boolean) context.getProperty("isDeltaGeneration");

         Boolean isFullGeneration = (Boolean) context.getProperty("isFullGeneration");

       }

    }


    If isDeltaGeneration == null (in the init method of the Exectuable) the Delta-Generation-Configuration-Script wasn't called before the generate task was performed and hence it could not be a delta generation. If isDeltaGeneration == true and isFullGeneration == false the generate task was performed as a real delta.

    0

Vous devez vous connecter pour laisser un commentaire.