Once created, the DriveWorks Live Client exposes methods to register and react to success/error events manually.
-
responseSuccessDelegate- The Client has received a successful response from the server. -
responseErrorDelegate- The Client has received an error response from the server.- Tip: Default error response handling can be skipped entirely using
return true;
- Tip: Default error response handling can be skipped entirely using
See sample code for example use cases.
React to Specification events
Register delegates
Once rendered, a Specification exposes methods to register and react to events as required.
-
registerSpecificationClosedDelegate- The Specification has been closed e.g. following an Action.
-
registerSpecificationCancelledDelegate- The Specification has been cancelled e.g. via a Macro or timeout.
-
registerConstantValueChangedDelegate- The value of a Constant in the Specification has changed.
-
registerVariableValueChangedDelegate- The value of a Variable in the Specification has changed.
See sample code for example use cases.
Listen for custom events
You can listen for custom Specification events and access the data returned.
-
ActionsUpdated- Fired when Actions have been updated.
- Can be listened for before render (on
Specification) or after render (onSpecification.specificationFormElement) - Returns details of Actions (Transitions/Operations) - as
ActionsUpdatedData
-
ControlUpdated- Fired when a Control has updated.
- Can be listened for after render (on
Specification.specificationFormElement) - Returns details of the updated Control - as
ControlUpdatedData
-
FormUpdated- Fired when the content of the Form has updated.
- Can be listened for before render (on
Specification) or after render (onSpecification.specificationFormElement) - Returns details of the rendered Form following updates - as
FormUpdatedData
-
TasksUpdated- Fired when available Tasks have been updated.
- Can be listened for before render (on
Specification) or after render (onSpecification.specificationFormElement) - Returns details of available Tasks - as
TaskList
-
PreviewLoaded- Fired when a 3D Preview Box Control has loaded.
- Can be listened for after render (on
Specification.specificationFormElement) - Returns details of the Preview control that loaded - as
PreviewLoadedData
See sample code for example use cases.