Search in sources :

Example 6 with ConditionSpecification

use of co.cask.cdap.api.workflow.ConditionSpecification in project cdap by caskdata.

the class DefaultWorkflowConditionConfigurer method addWorkflowConditionNode.

@Override
public void addWorkflowConditionNode(Condition condition, List<WorkflowNode> ifBranch, List<WorkflowNode> elseBranch) {
    Preconditions.checkArgument(condition != null, "Condition is null.");
    ConditionSpecification spec = DefaultConditionConfigurer.configureCondition(condition, deployNamespace, artifactId, artifactRepository, pluginInstantiator);
    currentBranch.add(new WorkflowConditionNode(spec.getName(), spec, ifBranch, elseBranch));
}
Also used : ConditionSpecification(co.cask.cdap.api.workflow.ConditionSpecification) DefaultConditionSpecification(co.cask.cdap.internal.workflow.condition.DefaultConditionSpecification) WorkflowConditionNode(co.cask.cdap.api.workflow.WorkflowConditionNode)

Example 7 with ConditionSpecification

use of co.cask.cdap.api.workflow.ConditionSpecification in project cdap by caskdata.

the class DefaultWorkflowForkConfigurer method addWorkflowConditionNode.

@Override
public void addWorkflowConditionNode(Condition condition, List<WorkflowNode> ifBranch, List<WorkflowNode> elseBranch) {
    Preconditions.checkArgument(condition != null, "Condition is null.");
    ConditionSpecification spec = DefaultConditionConfigurer.configureCondition(condition, deployNamespace, artifactId, artifactRepository, pluginInstantiator);
    currentBranch.add(new WorkflowConditionNode(spec.getName(), spec, ifBranch, elseBranch));
}
Also used : ConditionSpecification(co.cask.cdap.api.workflow.ConditionSpecification) DefaultConditionSpecification(co.cask.cdap.internal.workflow.condition.DefaultConditionSpecification) WorkflowConditionNode(co.cask.cdap.api.workflow.WorkflowConditionNode)

Aggregations

ConditionSpecification (co.cask.cdap.api.workflow.ConditionSpecification)7 WorkflowConditionNode (co.cask.cdap.api.workflow.WorkflowConditionNode)7 DefaultConditionSpecification (co.cask.cdap.internal.workflow.condition.DefaultConditionSpecification)7 WorkflowNode (co.cask.cdap.api.workflow.WorkflowNode)1