Types
Types provide convenient runtime resource switching mechanism for the global resources used with the script.
A Global Resource created is labeled a type which is an equivalent to an identifier that represents a resource configuration which is referenced from a script should at its runtime.
Types become useful when a script need to use different connection settings for its data source access accordingly to its deployment cycle such as development, staging, and production.
Default Type
When a Global Resource is newly created it is labeled 'Default'. A data source can only be this 'Default' type when it is first created.
When working with Designer, only the 'Default' type Global Resources can be selected; other types can only be used when script is executed.
If type is not specified explicitly for the script, 'Default' type is used by default.
Type cannot be set for the data source created initially.
Available types to Select from includes 'Default', 'Test', and 'Production'.
User can specify a custom types as well, but they do not appear in the pull down menu component, therefore the type identifier need to be directly entered into the field of the control which should be editable.
Usage
- Creating Global Resources
A Global Resource can be created using Global Resource Settings found in the Control Panel. Global Resource Created this way is always a 'Default' type.
For creating a Global Resource whose type is not 'Default', focus the 'Default' type Global Resource and select [Create global resource with the same name] item from the context menu that appears by right click.
Global Resources referenced in Designer is always of 'Default' type.
- Runtime Type Settings
Global Resource Type become selectable when determining with what global resource type scripts should be executed.
Type may be selected in any of the following environments.
For more details, please refer to each of the following page.
Usage of Types
- Create a Global Resource using 'Global Resource Settings' in the Control Panel
- Create a duplicate of the Global Resource just created with an identical name.
Type of Global Resources predefined are the followings.
- Default
Used in developing phase.Configure its connection settings to a data source available during development.
- Test
Used in testing phase.Configure its connection settings to a data source available in a staging environment.
- Production
Used in the production.Configure its connection settings to a data source in the production environment.
- Development Phase - Script Development
The Global Resource Type selected in the adapter property is 'Default'.There is no need to Select which Global Resource Type to use during the development phase.
- Development Phase - Script Execution
Use 'Option Settings' in Designer to select the Global Resource Type used at runtime
- Test Phase - Trigger Execution
To use data source available for testing purposes, select 'Test' for the Type in the 'Option Settings'
- Production Phase - Trigger Execution
In the production, select 'Production' for the Type in the 'Execution Options'
Notes
- In the version prior to 2.2.1.1, Global Resources Type are all set to'Default' when upgraded
- Global Resource Type is always set to 'Default' when it is created in Designer.The same Global Resource of a different 'Type' can be created in the "Global Resource Settings" found within the Control Panel.
- 'Type' cannot be modified after its creation.
- Deleting the 'Default' global resource will also delete any duplicates to which different Types are specified.
- The Global Resource Types arbitrary specified by user do not appear in the pull down menu.User defined types can be applied by editing the field value directly.