Protected_callProtected_changedProtected_eventProtected_eventProtected_frontProtected_logProtected_selectedan optional service, that holds the currently selected case.
It should be injected with the @Optional() annotation, since it might not be always provided.
Protected_snackProtected_taskthe service that holds the currently selected task, that is handled by the implementation of this class
Protected_taskProtected_taskProtected_taskProtected_taskProtected_taskProtected_translateProtected_safeThrows an error if the TaskContentService didn't have the Task object set yet.
the Task object held by TaskContentService.
Protected_taskthe Task object held by TaskContentService or undefined if the Service currently holds no Task.
ProtectedcompleteCompletes all the action streams and sends the notification, with the provided result
Optionaloutcome: TaskEventOutcomeProtectedistrue if a Task instance is set, false otherwise
ProtectedisChecks 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.
ProtectedperformPerforms 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
ProtectedqueueSends 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
ProtectedsendPublishes a finish notification to the TaskEventService
whether the finish operation was successful or not
Optionaloutcome: TaskEventOutcomeTaskEventOutcome
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
Service that handles the logic of finishing a task.