Skip to content

Commit

Permalink
Added taskOption to WorkflowTraverser
Browse files Browse the repository at this point in the history
  • Loading branch information
robertisele committed Feb 24, 2016
1 parent 07f6771 commit 33f5855
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package org.silkframework.workspace.activity.workflow

import org.silkframework.util.Identifier
import org.silkframework.workspace.{Project, Task}

import scala.reflect.ClassTag

/**
* Allows to traverse through the workflow.
*
Expand All @@ -12,6 +15,10 @@ class WorkflowTraverser(operator: WorkflowNode)(implicit workflow: Task[Workflow

def task: Task[_] = workflow.project.anyTask(operator.task)

def taskOption[T : ClassTag](taskName: Identifier): Option[Task[T]] = {
workflow.project.taskOption[T](taskName)
}

def inputs: Seq[WorkflowTraverser] = {
operator.inputs.map(input => new WorkflowTraverser(workflow.data.node(input)))
}
Expand Down

0 comments on commit 33f5855

Please sign in to comment.