Software AG Products 10.7 | Service Development Help | Working with Variables | About Variable Constraints | Customizing a String Content Type
 
Customizing a String Content Type
Instead of applying an existing content type or simple type to a String, String list, or String table variable, you can customize an existing type and apply the new, modified type to a variable. You customize a content type or simple type by changing the constraining facets applied to the type.
When you customize a type, you actually create a new content type. Designer saves the changes as a new content type named contentType_customized. For example, if you customize the string content type, Designer saves the new content type as string_customized.
When customizing a content type, keep the following points in mind:
*When you edit the constraining facets, you can only make the constraining facet values more restrictive. The constraining facets cannot become less restrictive.
*The constraining facets you can specify depend on the content type. Note that content types and constraining facets correspond to datatypes and constraining facets defined in XML Schema. For more information about constraining facets for a datatype, see the specification XML Schema Part 2: Datatypes ( http://www.w3.org/TR/xmlschema-2/).
*The customized content type applies only to the selected variable. To make changes that affect all variables to which the content type is applied, edit the content type in the IS schema. (String content types are simple types from IS schemas.) For more information about editing simple type definitions, see About Editing Simple Type Definitions.
*To customize a content type
1. Select the variable to which you want to apply a customized content type.
2. In the Constraints category on the Properties view, click the Content type browse button () and then do one of the following to select the content type you want to customize:
*In the Content type list, select the content type you want to customize.
*If you want to customize a simple type from an IS schema, click Browse. In the Browse dialog box, select the IS schema containing the simple type. Then, select the simple type you want to customize and apply to the variable. Click OK.
3. Click Customize. Designer makes the constraining facet fields below the Content type list available for data entry (that is, changes the background of the constraining facet fields from grey to white). Designer changes the name of the content type to contentType_customized.
4. In the fields below the Content type list, specify the constraining facet values you want to apply to the content type.
5. Click OK. Designer saves the changes as a new content type named contentType_customized.
Note:
The constraining facets displayed below the Content type list depend on the primitive type from which the simple type is derived. Primitive types are the basic data types from which all other data types are derived. For example, if the primitive type is string, Designer displays the constraining facets enumeration, length, minLength, maxLength, and pattern. For more information about primitive types, refer to XML Schema Part 2: Datatypes at http://www.w3.org/TR/xmlschema-2/.