Check if this manager and all of it's parents is set applicable.
Check if this manager or any of it's parents is set busy.
Shorthand for isBusy || !isApplicable.
This can be used by controls to control their disabled state.
Check if this manager is set busy.
The parent activity manager or undefined if this is the root.
Create a new activity that influences the state of this manager and all child managers.
Handle an error using this activity manager.
Error handlers are called in the following order until one succeeds:
If none of the above error handlers succeed, the error is rethrown.
Set this manager busy until the given async operation completes.
A promise or function that is called immediately.
Use the specified error handler if an error occurs in the context of this activity manager.
StaticregisterStaticuseRegister the specified error handler as a global fallback for all activity managers.
A manager for the interaction between async operations and disabled controls.
The state of controls is defined through two following properties:
isBusy- Indicates if an async operation is running.isApplicable- Indicates if the current UI is applicable.isDisabled- Indicates if controls should be disabled. This is a shorthand forisBusy || !isApplicable.Example use cases:
When a "finish" button in a dialog is clicked and a web request is made to complete an action, the activity manager for that dialog is set busy to disable all controls and to indicate that an async operation is running.
When a part of the UI is disabled because a checkbox is unchecked, the activity manager for that part of the UI is set unapplicable to render all contained controls disabled.
(Note that an activity manager is a container wide singleton and multiple activity managers may share the same state)