Options
All
  • Public
  • Public/Protected
  • All
Menu

Process service is responsible for loading and caching processes needed for any functionality of an app.

Hierarchy

Implements

  • OnDestroy

Index

Constructors

Properties

LATEST: "latest" = 'latest'
_netUpdate: Subject<Net>
_nets: NetCache
_netsSubject: Subject<NetCache>
_referenceRequestCache: Map<string, ReplaySubject<PetriNetReferenceWithPermissions>>
_requestCache: Map<string, ReplaySubject<Net>>

Accessors

  • get netUpdate$(): Observable<Net>

Methods

  • areNetsLoaded(identifiers: string[]): boolean
  • getNet(identifier: string, forceLoad?: boolean): Observable<Net>
  • Get process net by identifier.

    Parameters

    • identifier: string

      Identifier of the requested process. See {@link Net}

    • forceLoad: boolean = false

      when set to true cached processes will be ignored and a backend request will always be made (unless another is already pending)

    Returns Observable<Net>

    Observable of [the process]{@link Net}. Process is loaded from a server or picked from the cache.

  • Get process net referencess according to provided identifiers.

    PetriNetReferences are not cached. Each call will result in a new backend request unless a request for the same net is already pending.

    Parameters

    • identifiers: string[]

      Array of identifiers of requested processes. See {@link Net}

    Returns Observable<PetriNetReferenceWithPermissions[]>

    Observable of array of loaded processes. Array is emitted only when every process finished loading. If any of the processes failed to load it is skipped from the result.

  • getNets(identifiers: string[], forceLoad?: boolean): Observable<Net[]>
  • Get process nets according to provided identifiers. If any of the requested processes is not cached it will be loaded from the server and saved for later.

    Parameters

    • identifiers: string[]

      Array of identifiers of requested processes. See {@link Net}

    • forceLoad: boolean = false

      when set to true cached processes will be ignored and a backend request will always be made (unless another is already pending)

    Returns Observable<Net[]>

    Observable of array of loaded processes. Array is emitted only when every process finished loading. If any of the processes failed to load it is skipped from the result.

  • isNetLoaded(identifier: string): boolean
  • loadNet(id: string): Observable<Net>
  • loadRoles(id: string): Observable<default>
  • loadTransactions(id: string): Observable<default[]>
  • loadTransitions(id: string): Observable<default[]>
  • ngOnDestroy(): void
  • publishUpdate(net?: Net): void
  • removeNet(identifier: string): void
  • updateNet(net: Net): void

Generated using TypeDoc