Schema Builder

 

In this topic ...

Quick Tips

Specifying Inputs

Related Topics ...

How to Use the Data Page Builder

How to Use the Variable Builder

How to Use the Simple Schema Generator Builder

The Schema builder adds a property that contains a schema path to the model. The Variable builder uses this property to populate the list of available data types when you add a Variable builder call to your model.

We can use the Schema builder to store XML objects of a particular type as variables in your model. We can use the structures stored in these type-specific variables to pass to service calls or store the results of a service call.

 

Quick Tips

  • Schemas rely on an Internet connection to resolve a SOAP Encoding URL  -- If you are running the Factory disconnected from the Internet and are using schemas in your model (or any builders that add schemas to the model), set the bowstreet.schema.noAddSchemImports to true in Factory's WEB-INF/config/cluster.properties file.

Setting the property to true prompts the AutomationEngine not to resolve the SOAP encoding URL that it adds to all schemas in the model.

  • Use a Variable associated with a schema to store the inputs to a service call -- If there is a schema for the inputs to a service, add a Schema builder to the model that refers to this schema. We can then add a Variable builder call and set its type to be that of the inputs schema and pre-populate the variable value with a structure defined by the schema.

  • Schemas are only imported at design time and during generation -- Schema paths are not evaluated during runtime, so we cannot, for example, dynamically store a path to a schema to be evaluated at run time.

 

Specifying Inputs

The Schema builder takes the inputs described in the table below. For help on inputs common to many or all builders such as those in the Properties and HTML Attributes input groups, see "Using the Builder Call Editor."

Input Name Description
Name Enter a name for this builder call. The Designer displays this name in the Builder Call List.
Schema Source Type Enable the radio button that represents how this schema is to be provided. You have two choices:

  • Existing URL/File - Enter an indirect reference, URL, or file path (relative from the Factory's document root directory) that specifies the path to the schema.

  • Choice 2 - Specify explicitly as builder input - In the text entry area displayed when this radio button is selected, enter the XML  notation representing the schema you want to use.
URL or Schema File Location This input is available when Existing URL/File/Variable is selected above

Use the File Chooser to select one of the following:

  • Schema at a URL-- The URL can be a http://, https: or file:// reference that is followed for schema generation at regen time.For example: http://www.myschemas.org/schemas/schema1.xsd

  • Schema on the current file system --file://c:\myschemas\schema1.xsd

  • Schema in or below the Factory's document root --schemas/book.xsd

  • Schema defined by the XML in a variable -- A ${Variables/} reference is allowed in the URL field and provides an alternative means of getting a schema into the model as  long as the variable has an initial value. (The variable content is not looked at after regen time.)For example: ${Variables/mySchema}

Schemas that define many elements could cause an "Out of memory" in the chooser that lets you determine the type for a variable or method argument.

Overwriting
Rename Existing This input is useful in cases where you want to change the behavior of code that was placed in the WebApp by a high-level builder or by an Imported Model.

For example, you might want to do this if you have a Domino View & Form builder in your model, and you want to use a different class for one of the LJO's that Builder adds to the WebApp. The Domino View and Form Builder does not provide an "LJO Class Name" input. But, we can place a new LJO Builder in the model and give it the same name as that assigned by the Domino View and From Builder, thus replacing the existing LJO and specifying new class.

  • Enable - When checked, this input will cause the Builder to replace an existing WebApp object with a new object. The Builder will locate the existing WebApp object (variable, LJO, etc.), rename it, and then create a replacement object.

This input is available on the following low-level Builders that create WebApp objects: Action List, Imported Page, Linked Java Object, Linked Model, Method, Method Call, Page, Variable and Schema.

 

Supported Schema Types

The Schema Builder provides the ability for variables of that type to be added to the model.  It also allows for type checking. Some of the features are as follows:

  • Support for the following schema types:

  • CR XSD schemas (http://www.w3.org/2000/10/XMLSchema)

  • Final' rec schemas (http://www.w3.org/2001/XMLSchema)

  • XDR

  • SOX

  • DTDs

 

Schema Refresh Rules

As of version 5.7, the Portlet Factory implements a global schema cache. Given the availability of this cache, the Schema builder refreshes a schema according to the following rules:

  • Design Time - Each time a WebApp is regenerated, the schema is always re-fetched and regenerated. The previous schema entry is removed from the cache and replaced with the new one

  • Execution Time - Execution time regeneration does not cause the schema to be refreshed. A global Schema Cache holds parsed schemas against a key which is either the URL to the schema, or the schema source (if source is supplied explicitly). The first WebApp regeneration that references a schema on a particular URL (or with specified source) will cause the schema to be parsed. That parsed schema will be returned to any WebApp regeneration that subsequently asks for the schema for that URL (or source).