Class SequentialJob

    • Constructor Detail

      • SequentialJob

        public SequentialJob()
        Instantiates a new order preserving composite job.
      • SequentialJob

        public SequentialJob​(String name)
        Instantiates a new order preserving composite job with a specific name.
        Parameters:
        name - The name of the job sequence.
      • SequentialJob

        public SequentialJob​(boolean cleanUpImmediately)
        Instantiates a new sequential job.
        Parameters:
        cleanUpImmediately - Flag if jobs should be cleaned up immediately or not.
      • SequentialJob

        public SequentialJob​(String name,
                             boolean cleanUpImmediately)
        Instantiates a new model workflow job with a specific name and specifying the clean up strategy.
        Parameters:
        name - The name of the job sequence.
        cleanUpImmediately - Flag if jobs should be cleaned up immediately or not.
    • Method Detail

      • cleanup

        public void cleanup​(IProgressMonitor monitor)
                     throws CleanupFailedException
        If the sequential job is configured to not clean up immediately, the parents behavior is triggered. Otherwise, the clean up has already be done. Clean up all temporary side effects of this job. This method will always be called after executing this job to remove automatically created files and to leave the environment in a state in which the whole workflow run can be started again with the same results (i.e. in which executed can be called again). Usually, cleanup is called after the whole workflow is completed to allow other jobs to use intermediate results. In some cases, cleanup can be called earlier. However, in those cases, later jobs might not be able to access the intermediate data anymore.

        This method ensures to clean up all child jobs in the reverse order in which they were added.
        Specified by:
        cleanup in interface IJob
        Overrides:
        cleanup in class AbstractCompositeJob
        Parameters:
        monitor - the monitor
        Throws:
        CleanupFailedException - Thrown if a critical error occurred during clean up so that the whole workflow should abort cleaning up further jobs.