Extending : Client State Extension
  
Client State Extension
In banking application project, there are some common usage scenarios to execute client side operation from flow. Especially, for web channel application, UNICOM® Digital Transformation Toolkit (UDTT™) supports this capability to interact with the UI feedback from the thin client (browser) in AJAX style.
For example in UDTT web channel application, sometimes we need:
Window popup for implicit flow requirement to
Close flow
Retry or close flow
Display a warning message and a button to continue
Go to the previous page
Go to the previous page or close flow
Super-user approval
Devices control
Call client side applications such as TP16 or TP32 existing transaction
For these requirements, UDTT has provided a kind of abstract state called client state. Meanwhile, there is a default client state implementation for model popup dialog in UDTT. More detailed introduction about the client state could be found in the product document.
About customers’ specific scenarios, alpha developers could implement their customized client state such as device control, override, etc. To implement a customized client state, follow the steps below.
Extending a Client State
Client state is an abstract state class which defines the general behaviors for client interaction. And in UDTT, there is a default implementation of client state called ‘PopupPageClientState’. Actually, alpha developers always need to customize their client state to fulfill their usage scenarios.
For more information, see Extending a Client State.
Enabling the extended State in Transaction Editor
This section will lead you to explore how to enable the extended client state in Transaction Editor step by step.
For more information, see Enabling the extended State in Transaction Editor.
Extending navigation engine to register command handler
After the client state is activated in the server side, a command will be added into the response data and sent back to the client side. Then the navigation engine will invoke different target command handler to handle the related command in the reply data. In order to correctly response to the command and invoke the associated client operation logics, alpha developers should extend the UDTT navigation engine and register their own command handlers.
For more information, see Extending navigation engine to register command handler.
Adding the reference of new navigation engine to template
Finally, alpha developers should modify the JS template of their UDTT project.
For more information, see Adding the reference of new navigation engine to template.
See also
Launching UDTT flow by URL
Enabling tooltip for a customized Client State
Adding “Name” property in Client State
State Appearance customization