The life cycle data type Transition UI is used to define an user interface to be displayed as a result of a life cycle action. On the other hand it can be described as a method to get user input at runtime, as a part of life cycle transition. For an instance if the user wants to give a version to a resource while it is being promoted to a different environment that specific needed UI component can be added to the life cycle configuration using Transition UI.
...
3. As shown in the above configuration parameters can be passed to transition UI JSP page. Since these parameters are defined in the lifecycle configuration they are considered as static parameters. Hence they can not be changed at runtime.
4. The input values that are given through the transition UI are passed to back end and they can be read using an executor.
5. WSO2 Governance Registry includes a default transition UI which is the pre_invoke_ajaxprocessor.jsp
(as displayed in above configurations samples). This transition UI is used by the default service lifecycle for its service version functionality.
6. The main functionality of pre_invoke_ajaxprocessor.jsp
is to take user input for the versions of services and their dependent resources, so that they can be passed to the service version executor. The UI defined by this jsp would only be displayed for services. It will ignore all other media types. It will list down all the dependencies of a service resource. These dependencies are gathered recursively. Hence all the dependencies of that service and its dependent resources, will be displayed in the UI.
7. The pre_invoke_ajaxprocessor.jsp
accepts five different parameters which are optional. And the parameters are as given below.
a. preserveOriginal
- Setting this parameter will allow users to instruct the server to keep the old resource or whether to delete it. If this parameter is set to false, then the underlying implementation will delete the resource after a state transition. This parameter is set to true by default.
b. viewVersion
- This parameter is to instruct the jsp page to avoid displaying the content of the page. If the viewVersions is set to false then the corresponding UI would not be displayed. This parameter would pass the value of the "preserveOriginal" parameter to the server without displaying any additional UI to the user when it is set to false. This is set to true by default.
...