public class Workflow extends WorkflowTemplate
A workflow represents a possible manner to process nuts
in a Context
.
For each NutType
, the workflow knows a set of engines
chain of responsibility. It's also
linked to a heap
which should be processed by the chain which has the same NutType
. The workflow
has one chain for each possible type to allow the NodeEngine
to invoke another with if one Nut
references a Nut
with another NutType
. Optionally, a HeadEngine
could be
set to delegate the chain invocation.
Finally, the workflow could have zero to many NutDao
where resulting nut should be saved. Consequently,
NutDao
must supports NutDao.save(com.github.wuic.nut.Nut)
. This is something which is checked by the
ContextBuilder
.
Constructor and Description |
---|
Workflow(HeadEngine head,
Map<NutType,? extends NodeEngine> c,
NutsHeap h,
NutDao... store)
Creates a new instance.
|
public Workflow(HeadEngine head, Map<NutType,? extends NodeEngine> c, NutsHeap h, NutDao... store)
Creates a new instance.
c
- the chainsh
- the heapstore
- the DAO storeshead
- the head (could be null
)public NutsHeap getHeap()
Gets the heap.
Copyright © 2012-2015. All Rights Reserved.