public interface BrainslugContext
| Modifier and Type | Method and Description |
|---|---|
BrainslugContext |
addFlowDefinition(FlowDefinition flowDefinition)
add a flow definition to the definition store to make it
executable
|
BrainslugContext |
destroy()
initialize context
this will stop the schedulers (if enabled)
|
Collection<? extends FlowInstance> |
findInstances(InstanceSelector instanceSelector)
find the flow instance matching the given instance selector
|
FlowDefinition |
getDefinitionById(Identifier flowId) |
Collection<FlowDefinition> |
getDefinitions() |
<T> T |
getService(Class<T> clazz) |
BrainslugContext |
init()
initialize context
this will start the schedulers (if enabled)
|
<T> BrainslugContext |
registerService(Class<T> serviceClass,
T serviceInstance) |
void |
signalEvent(Identifier eventId,
Identifier instanceId,
Identifier definitionId)
send a signaling trigger to the specified event
|
Identifier |
startFlow(FlowDefinition flowDefinition)
start an instance with the start node definition
there must only be one definied
|
Identifier |
startFlow(FlowDefinition flowDefinition,
FlowNodeDefinition startNode,
FlowProperties properties)
start an instance of the given flow definition
|
Identifier |
startFlow(FlowDefinition flowDefinition,
FlowProperties properties)
start an instance with the start node definition
there must only be one definied
|
Identifier |
startFlow(Identifier definitionId)
start the flow at the given startNodeId
|
Identifier |
startFlow(Identifier definitionId,
FlowProperties properties)
start the flow at the given startNodeId
|
Identifier |
startFlow(Identifier definitionId,
Identifier startNodeId)
start the flow at the given startNodeId
|
Identifier |
startFlow(Identifier definitionId,
Identifier startNodeId,
FlowProperties properties)
start the flow at the given startNodeId
|
void |
trigger(TriggerContext context)
trigger a node in a given instance and definition
for further exeution
|
BrainslugContext addFlowDefinition(FlowDefinition flowDefinition)
flowDefinition - the flow definition to addCollection<FlowDefinition> getDefinitions()
FlowDefinition getDefinitionById(Identifier flowId)
void trigger(TriggerContext context)
context - the definition of the trigger environmentvoid signalEvent(Identifier eventId, Identifier instanceId, Identifier definitionId)
eventId - id of the event nodeinstanceId - id of the instance containing this event nodedefinitionId - id of the flow definition where the event is definedIdentifier startFlow(FlowDefinition flowDefinition)
flowDefinition - the definition to be startedIllegalStateException - if more the one start node definition existsIdentifier startFlow(FlowDefinition flowDefinition, FlowProperties properties)
flowDefinition - the definition to be startedproperties - the properties to be available during executionIllegalStateException - if more the one start node definition existsIdentifier startFlow(FlowDefinition flowDefinition, FlowNodeDefinition startNode, FlowProperties properties)
flowDefinition - the definition to be startedstartNode - the node in the definition to start atproperties - the properties to be available during executionIdentifier startFlow(Identifier definitionId)
definitionId - the definition to be startedIdentifier startFlow(Identifier definitionId, Identifier startNodeId)
definitionId - the definition to be startedstartNodeId - the node in the definition to start atIdentifier startFlow(Identifier definitionId, FlowProperties properties)
definitionId - the definition to be startedproperties - the properties to be available during executionIdentifier startFlow(Identifier definitionId, Identifier startNodeId, FlowProperties properties)
definitionId - the definition to be startedstartNodeId - the node in the definition to start atproperties - the properties to be available during executionCollection<? extends FlowInstance> findInstances(InstanceSelector instanceSelector)
instanceSelector - BrainslugContext init()
BrainslugContext destroy()
<T> BrainslugContext registerService(Class<T> serviceClass, T serviceInstance)
<T> T getService(Class<T> clazz)
Copyright © 2015. All rights reserved.