CUWO callback API
The CUWO callback API is a JavaScript API that the CUWO container injects into the global JavaScript namespace of each workflow instance. That API is to be used by the workflow instance to receive extended parameters that do not fit into the start URL and to terminate itself.
The API is represented by CUWOCallback
object in the global JavaScript namespace. To inject that object into the global JavaScript namespace, we will either use WebView.addJavaScriptInterface() or provide a JavaScript file that contains an implementation of the callback using the Channel Messaging API. This is an implementation detail and transparent to the custom workflow logic.
The CUWOCallback object defines methods for the following use cases:
- Getting input parameters and context information for the workflow
- Terminating the workflow with the three cases of success, failure, and cancelation