How to Define Custom Service Settings in a Designer Service
In xUML services, developers can define so-called settings. Settings are data items, that are accessible on the deployed service from the Configuration of an xUML service in the PAS Administration. These settings have a Name (Key), a Current Value, and a Default Value:

On this page, we will explain how to define name and default value of a custom service setting in the Designer.
Applying the Extension Setting to a Class Property
As a best practice, we recommend to define the settings on a class in the context where they are used.
This can be
one settings class (maybe also called Settings) that contains all service settings as properties.

or one settings class per context, e.g. FTPConnection (a class that contains all FTP connection settings).
To define a class property as a custom service setting, go to the attributes panel and add the extension Setting to the property. You can also set the default value here:

All settings can be received in one go simply by creating an instance of the settings class:

This will give you an object with all properties.
Accessing the Settings in the Service Configuration
Once the service has been deployed, you can view and adapt the service settings via the service details in the PAS Administration. You find the service settings in section Configuration.
The name of the custom setting in the administration will be <class name>::<setting name>
. This way you can group settings together:

In the administration, you can filter for all settings by entering settings to the filter field, or by entering the class name, in case you have multiple setting classes and want to only see specific ones.
For values that are mandatory for the service to work and that must be configured in the administration, and where no plausible default value is available (e.g. FTP Host), configure a default value like “Set your FTP host here”. This will run the service into an error, and the default value will appear in the service logs. This way, it becomes obvious that a configuration is missing.
SettingExtension_Example
Click here to download a simple example model that shows how you can define custom service settings in Scheer PAS Designer.
Bad Practice
Another way to define custom service settings is to create them in your ActionScript operations. As this has a negative impact on the maintainability of the service and may result in the custom settings being scattered throughout the service, we strongly advise against choosing this way.
Related Content
Related Documentation: