Unique id per task, randomly generated in the uuid v4 format
Untouched unchanged title of the task
A channel for messages.
This requires a separate channel for messages like error, skip or runtime messages to further utilize in the renderers.
Run time of the task, if it has been successfully resolved.
Error message of the task, if it has been failed.
Retry messages
Rollback message of the task, if the rollback finishes
Skip message of the task, if it has been skipped.
Output data from the task.
This will be triggered each time a new render should happen.
Per task options for the current renderer of the task.
Current retry number of the task if retrying
Skip current task.
The current state of the task.
Extend current task with multiple subtasks.
The task object itself, to further utilize it.
Title of the task
Creates a "subject" by basically gluing an observer to an observable.
Run time of the task, if it has been successfully resolved.
Error message of the task, if it has been failed.
Retry messages
Rollback message of the task, if the rollback finishes
Skip message of the task, if it has been skipped.
Creates a new Observable with this Subject as the source. You can do this to create custom Observer-side logic of the Subject and conceal it from code that uses the Observable.
Observable that the Subject casts to
A function to check whether this task should run at all via enable.
Used as a NON-CANCELLABLE means of subscribing to an observable, for use with
APIs that expect promises, like async/await
. You cannot unsubscribe from this.
WARNING: Only use this with observables you know will complete. If the source observable does not complete, you will end up with a promise that is hung up, and potentially all of the state of an async function hanging out in memory. To avoid this situation, look into adding something like timeout, {@link take}, {@link takeWhile}, or {@link takeUntil} amongst others.
import { interval, take } from 'rxjs';
const source$ = interval(1000).pipe(take(4));
async function getTotal() {
let total = 0;
await source$.forEach(value => {
total += value;
console.log('observable -> ' + value);
});
return total;
}
getTotal().then(
total => console.log('Total: ' + total)
);
// Expected:
// 'observable -> 0'
// 'observable -> 1'
// 'observable -> 2'
// 'observable -> 3'
// 'Total: 6'
a handler for each value emitted by the observable
a promise that either resolves on observable completion or rejects with the handled error
a handler for each value emitted by the observable
a constructor function used to instantiate the Promise
a promise that either resolves on observable completion or rejects with the handled error
Returns whether this task has been failed.
Returns whether the rollback action was successful.
Returns whether this task has subtasks.
Returns whether this task actually has a title.
Returns whether this task has been completed.
Returns whether enabled function resolves to true.
Returns whether this task is in progress.
Returns whether this task has a prompt inside.
Returns whether this task has an actively retrying task going on.
Returns whether this task has an active rollback task going on.
Returns whether this task is skipped.
Run the current task.
Create a task from the given set of variables and make it runnable.