Skip to content

Context

A context in a workflow typically represents the current state of knowledge that is available at any point during the execution. It holds all relevant information gathered throughout the workflow.

  • Dynamic Population: The context is initially populated during the acquisition phase, where selected entities, static and dynamic acquisition processes contribute to the information in the context.
  • Entity Inclusion: Only static or dynamic acquired entities are included in the context. No automatic resolving of entities is done. This controlled setup ensures only relevant data is present.
  • Updates with Function Block Results: As the workflow progresses, results generated by different function blocks are also added to the context. This allows the context to evolve with every executed stetp, enriching the information available for future workflow steps.
flowchart TB  
        subgraph select[Selected Entities]
            direction TB
            l1((Location 1))
            l2((Location 2))
        end
        start([Start Workflow]) ===> select
        subgraph staticacquire[Static Aquires]
            direction TB
            subgraph phase1[Phase / Query 1]
                direction TB
                l1r1(Router L1-1)
                l1r2(Router L1-2)
                l2r1(Router L2-1)
            end
            subgraph phase2[Phase / Query 2]
                direction TB
                l1s1(Switch L1-1)
                l1s2(Switch L1-2)
                l2s1(Switch L2-1)
            end
            subgraph phase3[Phase / Query X]
                direction TB
                phase3add(..)
            end
            phase1 --> phase2
            phase2 --> phase3

        end
        select ===> staticacquire
        subgraph dynamicaquire[Dynamic Aquires over FB]
            direction TB
            c1(Configuration Item / Controller eg vManage)
        end
        staticacquire ===> dynamicaquire
        subgraph full[Full Context]
            direction TB
            fl1((Location 1))
            fl2((Location 2))
            fl1 --> fl1r1(Router L1-1)
            fl1 --> fl1r2(Router L1-2)
            fl2 --> fl2r1(Router L2-1)
            fl1 --> fl1s1(Switch L1-1)
            fl1 --> fl1s2(Switch L1-2)
            fl2 --> fl2s1(Switch L2-1)
            fc1(Configuration Item / Controller eg vManage)

        end
        dynamicaquire ===>   full

style select fill:#b3b1c9

style l1 fill:#9de0af
style l2 fill:#9de0af
style fl1 fill:#9de0af
style fl2 fill:#9de0af

style staticacquire fill:#b3b1c9
style phase1 fill:#8d8d94
style phase2 fill:#8d8d94
style phase3 fill:#8d8d94

style dynamicaquire fill:#b3b1c9
style c1 fill:#837dff
style fc1 fill:#837dff

style full fill:#b3b1c9


style l1r1 fill:#f2f5b5
style l1r2 fill:#f2f5b5
style l2r1 fill:#f2f5b5
style l1s1 fill:#f2f5b5
style l1s2 fill:#f2f5b5
style l2s1 fill:#f2f5b5
style fl1r1 fill:#f2f5b5
style fl1r2 fill:#f2f5b5
style fl2r1 fill:#f2f5b5
style fl1s1 fill:#f2f5b5
style fl1s2 fill:#f2f5b5
style fl2s1 fill:#f2f5b5

Workflow Data and Step Results

Each step receives a result from an executed FB per entity. The result is stored in a context object where every FB can use a persistent data store for the duration of the workflow. Additionally there are the well known neops facts are accessable per entity in the datacontext.

export interface WorkflowStepContext {
  global: GlobalContext
  groups: GroupContexts
  devices: DeviceContexts
  interfaces: InterfaceContexts
  clients: ClientContexts
  hadError: boolean
  //current: undefined | GroupContext | DeviceContext | InterfaceContext | ClientContext
}

  exception: any
  message: string
}



export type GroupContext = GroupObject & ContextContent

export interface DeviceObject {