nemoguardrails.colang.v2_x.runtime.statemachine
nemoguardrails.colang.v2_x.runtime.statemachine
Module Contents
Functions
Data
API
Abort a flow instance and all its active child flows and decrement number of references of activated flow.
Advance all provided heads to the next blocking elements (actionable, matching, head merge) and returns all heads on actionable elements.
Perform a clean up of the state to avoid growing memory footprint.
Check if the given element matches the given event.
Factors that determine the final score:
- match event parameter specificity
- flow priority [0.0-1.0]
- definition order of flow
Returns: float
1.0: Exact match (all parameters match)
Check if the element matches with given event.
Finish a flow instance and all its active child flows and decrement number of references of activated flow.
Callback function that is registered to head position/status changes and will update acceleration data structures.
Helper to create an outgoing event from the flow head element.
Find all heads that are on a potential match with the event. Returns those heads in a flow hierarchical order.
Process internal events that have no default matchers in flows yet. Return a set of all the event loop ids that handled the event.
Resolve all conflicting action conflicts from actionable heads.
Add a new flow instance to the current state.
Create a new flow instance that can be added.
Returns an internal event for the provided event data
Returns an outgoing UMIM event for the provided action data
Return a list of all active heads that point to an event ‘match’ element.
Returns the element at the flow head position
Converts the element into the corresponding event if possible.
Cases:
- Event as member of an action or flow reference: send/match $ref.Finished(args) (This is action/flow specific)
- Event as member of an action or flow constructor: send/match UtteranceBotAction(args).Finished(args)
- Bare event: send/match UtteranceBotActionFinished(args)
Converts the element into the corresponding event name if possible. See also function get_event_from_element which is very similar but returns the full event including parameters.
Return the flow config of the flow of the head
Return the flow state of the flow head
Initialize a flow before it can be used and instantiated.
Initialize the state to make it ready for the story start.
Check if the given element is actionable.
True if flow has started.
True if flow is not started.
True if flow is started or waiting to be started.
Check if the given element is a match statement.
Compute the next state of the flow-driven system.
Try to slide a flow with the provided head.