Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SimpleActivityDispatcher

Implements

Index

Constructors

constructor

  • new SimpleActivityDispatcher(dispatchHandler?: function, errorHandler?: function, activityBeginHandler?: function, activityCompleteHandler?: function, workflowCompleteHandler?: function, workflowAbortHandler?: function, webRequestBeginHandler?: function, webRequestCompleteHandler?: function): SimpleActivityDispatcher
  • Initializes a new instance of the {@link geocortex.workflow.SimpleActivityDispatcher} class.

    class

    Represents a simple implementation of the ActivityDispatcher that allows the use of callback functions to handle the dispatching functions. This is useful for unit testing.

    constructs

    Parameters

    • Optional dispatchHandler: function
    • Optional errorHandler: function
    • Optional activityBeginHandler: function
    • Optional activityCompleteHandler: function
    • Optional workflowCompleteHandler: function
        • (outputs: any, workflow: Workflow): void
        • Parameters

          Returns void

    • Optional workflowAbortHandler: function
        • (context: any, workflow: Workflow): void
        • Parameters

          Returns void

    • Optional webRequestBeginHandler: function
        • (url: string, workflow: Workflow): void
        • Parameters

          Returns void

    • Optional webRequestCompleteHandler: function
        • (url: string, workflow: Workflow): void
        • Parameters

          Returns void

    Returns SimpleActivityDispatcher

Properties

isBusy

isBusy: boolean

The value indicating whether the workflow controller is busy.

type

Boolean

Methods

abortMapBasedActivity

  • abortMapBasedActivity(): boolean
  • Aborts any workflow activity that requires map interaction. e.g. CaptureGeometry.

    Returns boolean

    A boolean value indicating if any active draw activity has been successfully cancelled or not

activityAbort

  • Called when the client portion of an external activity is aborted for some reason. This will invoke the workflowborHandler since the workflow can no longer continue once a component activity is aborted.

    Parameters

    Returns void

activityBegin

  • Called when the client portion of an external activity is about to be dispatched. This will invoke the activityBeginHandler.

    Parameters

    • context: ActivityContext

      The context of the activity that is about to begin.

    Returns void

activityComplete

  • Called when the client portion of an external activity is complete. This will invoke the activityCompleteHandler.

    Parameters

    • context: ActivityContext

      The context of the activity that has just completed.

    Returns void

dispatch

  • Performs the dispatching of an external activity. This will invoke the dispatchHandler.

    Parameters

    Returns void

handleError

  • Handles error related to workflows. This will invoke the errorHandler.

    Parameters

    • error: Error

      The error to handle.

    • activityContext: ActivityContext

      The ActivityContext that generated the error.

    Returns void

handleOpenReportUrl

setDrawObjectContext

  • setDrawObjectContext(ctx: object): void
  • Sets the value of the DrawObjectContext

    Parameters

    • ctx: object

    Returns void

webRequestBegin

  • webRequestBegin(url: string, workflow: Workflow): void
  • Called when a web request is started as part of a workflow.

    Parameters

    • url: string

      The web request URL.

    • workflow: Workflow

      The current workflow.

    Returns void

webRequestComplete

  • webRequestComplete(url: string, workflow: Workflow): void
  • Called when a web request is completed as part of a workflow.

    Parameters

    • url: string

      The web request URL.

    • workflow: Workflow

      The current workflow.

    Returns void

workflowAbort

  • Called if the workflow is aborted.

    Parameters

    • context: ActivityContext

      The context of the activity that has caused the workflow to abort

    • workflow: Workflow

      The workflow that has just been aborted

    Returns void

workflowComplete

  • workflowComplete(outputs: any, workflow: Workflow): void
  • Called when the workflow is complete.

    Parameters

    • outputs: any

      The outputs of the workflow that has just completed. This will invoke the workflowCompleteHandler.

    • workflow: Workflow

      The workflow that has just completed.

    Returns void