Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleConditionContext
public interface ConditionContext extends StageContext, Transactional, SecureStore, SecureStoreManager {
/**
* Returns the logical start time of the batch job which triggers this instance of an action.
* Logical start time is the time when the triggering Batch job is supposed to start if it is
* started by the scheduler. Otherwise it would be the current time when the action runs.
*
* @return Time in milliseconds since epoch time (00:00:00 January 1, 1970 UTC).
*/
long getLogicalStartTime();
/**
* Return the runtime arguments.
*/
Map<String, String> getArguments();
/**
* @return The application namespace
*/
String getNamespace();
}

 

Example Condition Plugin:

 

Code Block
public class ThresholdCondition extends Condition {
 public static class ThresholdConditionConfig extends PluginConfig {
  @Description("Name of the property that will be looked up in workflow token")
  private String propertyName;
  
  @Description("Threshold condition will evaluate to true if value of property is above this threshold value")
  private Integer thresholdValue;
 }
 
 @Override
 public boolean apply(ConditionContext context) throws Exception {
 ...
 }
}

 

Limitations :

1) If the input records processed from the previous stage hits the threshold, but we are writing to a local dataset, we cannot start the next stage, unless all records from previous stage are processed completely and written to the local dataset. Next stage's input will be sourced from local dataset.

...