Service that handles the logic of finishing a task.

Hierarchy (view full)

Constructors

Properties

_callChain: CallChainService
_changedFieldsService: ChangedFieldsService
_eventQueue: EventQueueService
_eventService: EventService
_frontActionService: FrontActionService
_selectedCaseService: SelectedCaseService = null

an optional service, that holds the currently selected case. It should be injected with the @Optional() annotation, since it might not be always provided.

_snackBar: SnackBarService
_taskContentService: TaskContentService

the service that holds the currently selected task, that is handled by the implementation of this class

_taskDataService: TaskDataService
_taskEvent: TaskEventService
_taskOperations: TaskOperations
_taskResourceService: TaskResourceService
_translate: TranslateService

Accessors

Methods

  • Sends the finish request to backend and notifies the user about the outcome of the operation via a snack bar message.

    Doesn't send any requests if the loading indicator is in it's active state. Otherwise sets the indicator to the active state and disables it once the request response is received.

    The argument can be used to chain operations together, or to execute code conditionally based on the success state of the finish request.

    If the task held within the TaskContentService changes before a response is received, the response will be ignored and the afterAction will not be executed.

    Parameters

    • afterAction: AfterAction

      if finish request completes successfully true will be emitted into this Subject, otherwise false will be emitted

    Returns void

  • Updates the task data to their current state from backend, checks the validity of the data and sends a finish request to backend.

    Finish request is not sent if the task contains invalid data.

    If an update to the data is already in progress waits for it's successful completion and sends the finish request after.

    Parameters

    • afterAction: AfterAction = ...

      if finish request completes successfully true will be emitted into this Subject, otherwise false will be emitted

    Returns void