The shared
config.js
file for these examples is incomplete. Enter your own settings for the examples to function.
Note: this feature requires DriveWorks 18.1 and above.
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.
- Returns details of Actions (Transitions/Operations) - as
ActionsUpdatedData
-
ControlUpdated
- Fired when a Control has updated.
- Returns details of the updated Control - as
ControlUpdatedData
-
FormUpdated
- Fired when the content of the Form has updated.
- Returns details of the rendered Form following updates - as
FormUpdatedData
-
TasksUpdated
- Fired when available Tasks have been updated.
- Returns details of available Tasks - as
TaskList
-
PreviewLoaded
- Fired when a 3D Preview Box Control has loaded.
- Returns details of the Preview control that loaded - as
PreviewLoadedData
See sample code for example use cases.