Throws an error if the TaskContentService didn't have the Task object set yet.
the Task object held by TaskContentService.
the Task object held by TaskContentService or undefined
if the Service currently holds no Task.
Completes all the action streams and sends the notification, with the provided result
Checks data size
boolean whether the task contains data or not
true
if a Task instance is set, false
otherwise
Checks whether the current state of the TaskContentService and optionally if the SelectedCaseService, is still relevant to the task that was requested.
This method is useful if you use UnlimitedTaskContentService, or a similar implementation. It is possible for the currently "selected" task to change in-between a backend request was sent and the response was received. In that case the response is no longer relevant and should be discarded, otherwise an illegal task state could be achieved on frontend.
the stringId
of the requested task
true
if the requested task is still relevant to the state of the frontend. Returns false
otherwise.
Performs a finish
request on the task currently stored in the taskContent
service
the action that should be performed after the request is processed
indicates to the event queue that the next event can be processed
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.
if finish request completes successfully true
will be emitted into this Subject,
otherwise false
will be emitted
Publishes a finish notification to the TaskEventService
whether the finish operation was successful or not
TaskEventOutcome
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.
if finish request completes successfully true
will be emitted into this Subject,
otherwise false
will be emitted
Generated using TypeDoc
Service that handles the logic of finishing a task.