Defining Data Instance Behavior Properties

When editing order and task data in an editor, you can right-click data node behaviors and select Open Properties View to access the behavior properties.You use the Properties view tabs to model Data Instance behaviors.

Note:

The level at which you create a behavior (at the data element level, task level, or order level) determines where you access and configure the behavior's properties. See "Creating New Behaviors" for more information.

To define data instance behavior properties:

  1. From the Design perspective, right-click the behavior and select Open Properties View.

    The Behaviors Properties view is displayed.

  2. Click the Data tab.

  3. In the Language field, select a predefined language in which to display the message to the web client user.

    See "Defining OSM Preferences" for more information.

  4. Specify whether to use a data provider to retrieve the data from an external system, or to statically define the data inline.

    • To use a data provider to retrieve the information, proceed to step 5.

    • To statically define the data inline, select Inline enter the XML information into the XML field, then skip to step 11.

  5. In the Data Provider field, click Select.

    The Select Data Provider dialog box is displayed.

    Alternately, you can click New to create a new data provider. See "Creating New Data Providers" for more information about creating new data providers for Data Instance behaviors.

  6. Select a data provider from the list.

  7. Click OK.

    The input parameters defined for the data provider are displayed in the Parameters field.

  8. In the Parameters field, select an input parameter.

  9. In the Expression field, define the value for the input parameter that the data provider requires when retrieving the data from the external system.

    The value is evaluated at run-time and is based on the XPath or XQuery expression you define in the Expression field.

  10. (Optional) Select Use Default Expression to use the default expression data defined for the parameters.

    For example, if you were creating a Data Instance behavior to obtain a list of available ports from inventory, you might define an end point parameter to provide the server connection information required to connect to the inventory system. You can define (in the Data Provider editor) the default information defined for the end point parameter, and use that information for the corresponding Data Instance behavior.

  11. Click the Details tab.

    The Behaviors Properties view Details tab is displayed. The Name, Type, and Path field values are read-only, and cannot be modified on this tab. See "Defining Behavior Detail Properties" for more information about the options that you can define on this page.

  12. Click the Conditions tab.

    Use the Conditions tab to add conditional logic to the Data Instance behavior. See "Defining Behavior Condition Properties" for more information about defining conditions for behaviors.

  13. Click the Notes tab.

    Use the Notes tab to describe the functionality or include internal documentation about the Data Instance behavior.

Related Topics

Data Instance Behavior Properties View Data Tab

About Data Instance Behaviors

Working with Behaviors

Working with Data Providers

About Data Instance Behaviors

The Data Instance behavior differs significantly from all other behavior types in that it does not define any behavior. All other behavior types define some sort of action to be performed; for example, a calculation or a lookup. You can use a Data Instance behavior to obtain data that is not included in the order data and make that data available to other behaviors. There are two methods for obtaining the data for the Data Instance behavior:

  • You can use a data provider, which is an adapter that can retrieve data in an XML format from external systems. Design Studio delivers several built-in data provider types intended to retrieve external XML instances from specific sources, such as an Objectel server extension or a SOAP web service. Additionally, you can create your own custom data provider. See "Working with Data Providers" for more information.

  • You can statically define data inline in XML format (or create an XQuery statement to retrieve an XML document) on the Data Instance Behavior Properties Data tab. For example, consider that you are creating a data instance behavior that will eventually retrieve a list of available ports from your inventory system. Early in the development cycle, the API required to connect to the inventory system may not be implemented correctly or completely. You can use the inline feature to statically define a dummy payload that represents the data that you anticipate will be returned from the inventory system to test the behavior functionality.

Note:

See OSM Concepts for more information about behavior default values, inheritance, and declarative syntax.

Related Topics

Data Instance Behavior Properties View Data Tab

Defining Data Instance Behavior Properties

Working with Behaviors

Working with Data Providers

About Web Client Behavior Support

Data Instance Behavior Properties View Data Tab

Use the Properties view Data tab to define the data provider configuration that will interface with the external system.

Field Use
Language You can declare Data Instance behaviors specific to a given language by using the optional Language attribute. If this attribute is set, OSM automatically selects the appropriate instance using the user's language preferences set in the web browser.

Note: If you declare multiple language-based instances, consider the following:

  • To appear in the Language drop-down list, languages other than the default must be selected from the Oracle Design Studio languages group. See "Defining Language Preferences".

  • One Data Instance behavior is created per language selected.

  • In order to differentiate among language-based behaviors, the system appends (internally) a language code to the data instance name using the following pattern: "name of the data instance"_"language code". For example:

    DataInstanceX_en-ca

    The language codes used are from the Oracle Design Studio languages group.

  • If you need to refer to this instance from any other behavior (for example, Lookup), you must specify the full value in the behavior's XPath expression. For example:

    instance('DataInstanceX_en-ca')/lookupEntry

Data Provider You can reuse an existing data provider configuration for this Data Instance behavior by clicking the Select button. To create a new data provider configuration, click New. After you have selected or created a data provider, click Open to access the Data Provider editor, where you can define input parameters, result documents, and cache settings. Click Clear (red X) to clear the selected value from the field.
Parameters, Expression, Use Default Expression Select a parameter to define the value for the input parameter that the data provider requires when retrieving the data from the external system. The value is evaluated at runtime and is based on the XPath or XQuery expression you define in the Expression field. Select the Use Default Expression option if you want to use the default values for the input parameters that you defined using the Data Provider editor Interface tab.

You can select a data node from the Order Template tab (when working in the Order editor) or from the Task Data tab (when working in a Task editor) and drag the selected data node into the Parameters field to define the XPath expression.

Note: To drag a data node into the Properties view Data tab, press and hold the Alt key before you select and drag the data node to the XPath Expressions field.

XPath uses path expressions to select data nodes in XML documents. A path expression with a single dot (.) represents the current node. Two dots (..) represents the parent of the current node. A slash (/) represents the root node.

XPath and XQuery fields are limited to 4000 characters.

Inline Select if you want to make static information available to the task. This option assumes that the information is not located on an external system. When you select this option, you can declare an XML document statically within the XML field.

Note: You can use the Inline option early in development cycles when you know you want to employ a data provider to an external system, but you haven't yet built it. Using the Inline option, you can create an dummy information structure for testing purposes. You can remove the inline XML static information and clear the inline option later in the cycle after you build the data provider configuration. When using the Inline option, consider that there exists no XML validation in the static document field.


Related Topics

Defining Data Instance Behavior Properties

About Data Instance Behaviors

Working with Behaviors