Package com.gengoai.hermes.workflow
Interface Workflow
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
SequentialWorkflow
public interface Workflow extends Serializable
A workflow represents a set of _actions_ to perform on an document collection. Actions fall into one or more of the following three categories:
- Modify - The action modifies the documents in the collection, e.g. adds new annotations or attributes.
- Compute - The action generates information that is added to the
Context
for use by downstream actions. - Output - The action generates an output for consumption by external processes and/or downstream actions.
Actions share a common key-value memory store, called a
Context
, in which information they require or they generate can be added.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Context
getStartingContext()
Gets starting context.String
getType()
Gets type.DocumentCollection
process(@NonNull DocumentCollection input, @NonNull Context context)
Process corpus.void
setStartingContext(Context context)
Sets starting context.
-
-
-
Method Detail
-
getStartingContext
Context getStartingContext()
Gets starting context.- Returns:
- the starting context
-
getType
String getType()
Gets type.- Returns:
- the type
-
process
DocumentCollection process(@NonNull @NonNull DocumentCollection input, @NonNull @NonNull Context context) throws Exception
Process corpus.- Parameters:
input
- the inputcontext
- the context- Returns:
- the corpus
- Throws:
Exception
- the exception
-
setStartingContext
void setStartingContext(Context context)
Sets starting context.- Parameters:
context
- the context
-
-