Each lifecycle configuration contains one or more state elements. More information on lifecycle configuration and the various elements in it, can be found in Configuring Lifecycles.The You can use client-side scripting support is available for the lifecycle state transition event . This can be done by adding something similar to the following under the datamodel element.
Code Block |
---|
<data name="transitionScripts"> <!--name - defines that this element contains the set of transition scripts. It is required to be set to 'transitionScripts'--> <js forEvent=""> <!--forEvent - defines the event that this script block will execute--> <console function=""> <!--function - defines the name of the function--> <script type="text/javascript"> <!--contains the script--> </script> </console> <server function=""> <script type="text/javascript"></script> </server> </js> </data> |
Here Following is an example on of how to make an a redirection after a "Promote" is done in the default ServiceLifeCycle
.
...
2. After saving this configuration (See see Adding Lifecycles), add the ServiceLifeCycle
to a Service (or any other resource/collection). See Managing Lifecycle.
3. Tick Select all the check-boxes, and click on the "Promote" button. See Managing Lifecycle.
4. You will be redirected to the Service list list. You can add any valid executable JavaScript that is capable of performing some task that to perform the task you require.
Excerpt | ||
---|---|---|
| ||
Instructions on how to handle client-side scripting for lifecycles in the Governance Registry. |