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(FlowInstanceSelector 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
|
FlowInstance |
startFlow(FlowDefinition flowDefinition)
start an instance with the start node definition
there must only be one definied
|
FlowInstance |
startFlow(FlowDefinition flowDefinition,
FlowInstanceProperties properties)
start an instance with the start node definition
there must only be one definied
|
FlowInstance |
startFlow(FlowDefinition flowDefinition,
FlowNodeDefinition startNode,
FlowInstanceProperties properties)
start an instance of the given flow definition
|
FlowInstance |
startFlow(Identifier definitionId)
start the flow at the given startNodeId
|
FlowInstance |
startFlow(Identifier definitionId,
FlowInstanceProperties properties)
start the flow at the given startNodeId
|
FlowInstance |
startFlow(Identifier definitionId,
Identifier startNodeId)
start the flow at the given startNodeId
|
FlowInstance |
startFlow(Identifier definitionId,
Identifier startNodeId,
FlowInstanceProperties 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 definedFlowInstance startFlow(FlowDefinition flowDefinition)
flowDefinition - the definition to be startedIllegalStateException - if more the one start node definition existsFlowInstance startFlow(FlowDefinition flowDefinition, FlowInstanceProperties properties)
flowDefinition - the definition to be startedproperties - the properties to be available during executionIllegalStateException - if more the one start node definition existsFlowInstance startFlow(FlowDefinition flowDefinition, FlowNodeDefinition startNode, FlowInstanceProperties properties)
flowDefinition - the definition to be startedstartNode - the node in the definition to start atproperties - the properties to be available during executionFlowInstance startFlow(Identifier definitionId)
definitionId - the definition to be startedFlowInstance startFlow(Identifier definitionId, Identifier startNodeId)
definitionId - the definition to be startedstartNodeId - the node in the definition to start atFlowInstance startFlow(Identifier definitionId, FlowInstanceProperties properties)
definitionId - the definition to be startedproperties - the properties to be available during executionFlowInstance startFlow(Identifier definitionId, Identifier startNodeId, FlowInstanceProperties 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(FlowInstanceSelector 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.