Class: Process

Process

Process holds the nodes and trees memory, and serializes/deserializes them to the database abstraction layer

new Process()

Start a process and its children in memory

Methods


breakpoint(nodeId)

returns the breakpoints set on this node
Parameters:
Name Type Description
nodeId string

clearBreakpoint(nodeId)

clear breakpoint
Parameters:
Name Type Description
nodeId string

currentContextEntities(crntCtxEtts)

sets the current contextManager and tick
Parameters:
Name Type Description
crntCtxEtts FoundContext

data( [key] [, value])

sets process data. pass no arguments to get all data pass explicit null key to replace all data with value
Parameters:
Name Type Argument Description
key string <optional>
value * <optional>

deserializeContext(curCtxIds)

from Context tree and node ids,construct a Context object
Parameters:
Name Type Description
curCtxIds *
Returns:
Type
FoundContext

getPrompt(stateMemberObj, key)

get the prompt for a state
Parameters:
Name Type Description
stateMemberObj
key
Returns:
Type
*

loadContextEntities()

Get context entities ids and load context entity instances into volatile memory

properties(props)

bring in the properties as a whole
Parameters:
Name Type Description
props *

resetVolatile(volMem)

set / empty nodes volatile
Parameters:
Name Type Description
volMem Object

save()

save this process
Returns:
a promise

serializeContext(contextObj)

return an object with ids and numbers, not with object
Parameters:
Name Type Description
contextObj *
Returns:
Type
FoundContext

setBreakpoint(breakpointReached)

setBreakpoint
Parameters:
Name Type Description
breakpointReached BreakpointData

volatile()

setter/getter