Runtime Profile Selection Builder

 

In this topic ...

Quick Tips

Specifying Inputs

Related Topics ...

Profiling Overview

Use the Runtime Profile Selection builder to allow a model to control the set of profiles used for its regeneration. You might want to use this technique in situations where the standard profile selection and model regeneration behavior of the Factory needs to be more dynamic.

For example, if you have a model whose structure, behavior, or content is profiled, and the profiles need to change based upon runtime data or user selections, use this builder to allow your model to select and apply the appropriate profiles based upon the runtime data or user selections.

This builder is not supported for use with the Imported Model builder and will ignore the profiling used in an imported model.

 

Quick Tips

  • Position of Builder - This builder needs to be last in the builder call list so that it can run after all of the other builders have completed their regeneration. Failure to place this builder last may result in unpredictable regeneration behavior for the model.

  • One Builder per Model - An instance of this builder needs to be placed in each model that requires profile selection at runtime. For example, if you have one model that links to another and both require runtime control of profile selection, then an instance of this builder must be added to each model.

  • Use Fully Qualified Names - The inputs for "Profile Name" and "Default Profile Name" must return fully qualified profile names. For example, if you want to apply a profile named "English" from the "News" profile set to your model, then the "Profile Name" input must return the string "News!English".  Invalid profile names are ignored by the builder.

 

Specifying Inputs

The Runtime Profile Selection 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.
Main Action Optional.  Enter the name of the "main" action in the model.  This action is the one that provides the main entry point into the model for servicing requests.

By default, this input is set to the model action  "main" if you do not supply a value.

Example: "main", "page1", or "myActionList"

Profile Name Enter an indirect reference that will provide the name of the profile(s) to be selected and applied to the model at runtime.  This Value can be a constant or any other valid indirect reference such as a method call.  The builder requires that the indirect reference return a string that is a fully qualified valid profile name such as in the examples below.

Example: "News!English" or "Security!Admin"

Default Profile Name Optional. Enter the name of one or more default profile to be applied if the "Profile Name" input does not reference a valid set of profiles.

You might want to supply a value for this input when the indirect reference you specified for the "Profile Name" input may not be able to return a valid profile name in all cases. Use a constant profile name for this input to ensure that at least a known set of profiles will be applied to the model when specific profile are not available or cannot be determined at runtime.