Interface Series

All Superinterfaces:
Iterable<Map<String,String>>

public interface Series extends Iterable<Map<String,String>>
With a series, the jobs and result actions can be executed multiple times, each with a defined set of properties.

The Series implementation is responsible for returning a set of properties. For each set of properties, all jobs are executed and all actions are run in the same way as they would be in a task without a series. Each map returned by the series' iterator represents one task execution. The properties from the series can affect the jobs and actions: their properties can contain placeholders that are replaced with values from the series during execution.
Format: {PlaceHolderName}
Example: execute one report for different users. The series produces an email property containing the address of the user to whom the email should be sent. In the EmailResultAction, specify the email receiver as: admin@company.com;{email}
For each series entry, an email is created (probably with the results of configured jobs that also use placeholders) for the administrator and the user from the series.

If you implement custom jobs or result actions, keep in mind that placeholders are replaced only for properties that have a corresponding Field. See AbstractFactory.getInformation(com.inet.id.GUID).

There can only be one series per task, or none. Note that if the iterator() of this class does not return any elements then no job or action is executed.

Since:
taskplanner 3.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cleanUp(boolean previewOnly)
    Perform some cleanup.
    default void
    setTriggerProperties(@Nonnull Map<String,String> triggerProperties)
    injects the trigger placeholder properties in case the series needs to replace placeholder values

    Methods inherited from interface Iterable

    forEach, iterator, spliterator
  • Method Details

    • cleanUp

      void cleanUp(boolean previewOnly) throws Exception
      Perform some cleanup.

      This is guaranteed to be called if Iterable.iterator() was called.

      Parameters:
      previewOnly - true if this series was used temporarily as a preview only, false if it was for a full run of a task.
      Throws:
      Exception - if some problems occurred
      Since:
      taskplanner 3.0
    • setTriggerProperties

      default void setTriggerProperties(@Nonnull Map<String,String> triggerProperties)
      injects the trigger placeholder properties in case the series needs to replace placeholder values
      Parameters:
      triggerProperties - placeholder map of the trigger responsible for this task (and this series) running
      Since:
      25.10