This chapter describes how to use the Oracle SOA Composer application (Oracle SOA Composer) to work with a deployed dictionary and tasks that are part of a SOA composite application at runtime.
The chapter includes the following sections:
Section 12.2, "Using Oracle SOA Composer User Authentication"
Section 12.3, "Enabling Accessibility Features in SOA Composer"
Section 12.4, "Opening and Viewing an Oracle Business Rules Dictionary at Runtime"
Section 12.5, "Getting Started with Editing and Saving a Dictionary at Runtime"
Section 12.6, "Editing Rules in an Oracle Business Rules Dictionary at Runtime"
Section 12.7, "Using the Oracle SOA Composer Browser Windows"
Section 12.8, "Editing Decision Tables in an Oracle Business Rules Dictionary at Runtime"
Section 12.9, "Localizing Names of Resources in Oracle Business Rules"
Section 12.10, "Committing Changes for an Oracle Business Rules Dictionary at Runtime"
Section 12.11, "Synchronizing Rules Dictionary in Oracle JDeveloper With Runtime Dictionary Updates"
Section 12.12, "Validating an Oracle Business Rules Dictionary at Runtime"
Section 12.13, "Obtaining Composite and Dictionary Information at Runtime"
Oracle SOA Composer is a Web-based application that allows you to work with Oracle Business Rules dictionaries and tasks for deployed applications. Figure 12-1 shows how Oracle SOA Composer accesses a dictionary or a task in an MDS repository.
Figure 12-1 Oracle SOA Composer Architecture
You can build accessibility into the applications while building them. For information on building applications for SOA composer see, Chapter 9, "Creating a Rule-enabled Non-SOA Java EE Application".
For information on how to develop accessible ADF Faces pages, see, "Developing Accessible ADF Faces Pages" in Oracle Fusion Middleware Web User Interface Developer's Guide for Oracle Application Development Framework.
Figure 12-2 shows the Oracle SOA Composer login page. This page allows Oracle SOA Composer to authenticate the specified user.
Figure 12-2 Oracle Oracle SOA Composer Login Page
To login to Oracle SOA Composer:
Access Oracle SOA Composer using the following URL in your browser address bar:
http://
SERVER_NAME_OR_IP_ADDRESS
/soa/composer
In the Oracle SOA Composer login page, in the Username field, enter a user name.
In the Password field, enter a password.
Click Login.
For information on creating and managing users and groups, see Oracle WebLogic Server Administration Console Online Help.
Oracle SOA Composer supports user and password access control and only authenticated users can use Oracle SOA Composer. However, Oracle SOA Composer does not provide finer grained access control. For example, Oracle SOA Composer does not support access control for individual rulesets or rules within a dictionary.
Oracle SOA Composer does support access control to metadata. Using Oracle SOA Composer, only users with the SOADesigner application role can access the metadata from Oracle SOA Composer. By default all the users with the WLS Administrator privileges have this role.
If a user without the SOADesigner role logs into Oracle SOA Composer, a message is shown indicating the user is not authorized to modify the SOA metadata, as shown in Figure 12-3.
Figure 12-3 SOA Composer Unauthorized Metadata Access Message
For more information on assigning the SOADesigner role to a nonadmin user who requires access to Oracle SOA Composer, see "Managing Application Roles in Oracle Enterprise Manager Fusion Middleware Control Console" in Oracle Fusion Middleware Administrator's Guide for Oracle SOA Suite and Oracle Business Process Management Suite.
SOA Composer provides the screen reader option. This option enables your screen reader to access and read all components of the application.
To enable screen reader:
Click the Enable screen reader mode link on the top right corner.
A confirmation message, This will enable screen reader mode for the current session. Do you want to continue?, appears as shown in Figure 12-4.
Click Yes to confirm.
After you login to Oracle SOA Composer you can select a document to open. Oracle SOA Composer supports viewing and editing different types of metadata, including a DVM document or an Oracle Business Rules dictionary. In Oracle SOA Composer, you can open either an Oracle Business Rules dictionary or a DVM file with the Open menu as shown in Figure 12-5.
Figure 12-5 Oracle Oracle SOA Composer Open Menu Options
To open an Oracle Business Rules dictionary using the Open menu:
In Oracle SOA Composer, from the Open menu, select Open Rules.
When you select Open Rules, Oracle SOA Composer connects to MDS and displays the Select a dictionary to open dialog box. This dialog box presents the available composite applications that contain dictionaries, as shown in Figure 12-6. In addition, it lists the shared dictionaries, and these shared dictionaries can also be viewed and edited.
Figure 12-6 Oracle SOA Composer with Oracle Business Rules Dictionaries
To open a dictionary select an entry in the table and click Open or double-click an item. This opens the dictionary in view mode, as shown in Figure 12-7.
Figure 12-7 Oracle Business Rules Dictionary Open in Oracle SOA Composer View Mode
As shown in Figure 12-7, Oracle SOA Composer shows a dictionary that displays a left-side panel with a list of tabs and links. Dictionary details for the selected item are shown on the right-hand side. Oracle SOA Composer includes the following tabs:
Globals
Bucketsets
Links
Decision Functions
Rulesets
Note:
Functions are not supported in Oracle SOA Composer.By default, a dictionary is opened in the view mode. If a dictionary is previously opened in the edit mode and the changes made, if any, are not reverted, the next time when you open it, Oracle SOA Composer opens the dictionary in the edit mode. For more information on Edit mode, see Section 12.5, "Getting Started with Editing and Saving a Dictionary at Runtime".
To open an Oracle Business Rules dictionary directly using a known URL:
Obtain the URL for a document that stores an Oracle Business Rules dictionary by using Bookmarkable Link in Oracle SOA Composer:
In an open dictionary, click Bookmarkable Link to obtain the URL information for the dictionary, as shown in Figure 12-8.
Figure 12-8 Using Link Dialog to Obtain the URL for an Open Dictionary
Copy the URL information and save it for future use.
In a browser, use the saved URL to directly access the dictionary.
For example,
http://SERVER_NAME_OR_IP_ADDRESS/soa/composer?docPath=/deployed-composites/ default/BusinessRulesTest_rev1.0/oracle/rules/businessrulestest/OrderBooking.rules
According to the preceding example, composites are stored as per the following structure: deployed-composites/composite name_revcomposite revision
/oracle/rules/dictionary package path
/dictionary name
.rules
To open and edit a recently edited dictionary using the My Edits option:
If you recently edited a dictionary, then you can use the Open menu My Edits option to open and edit a dictionary.
In Oracle SOA Composer, from the Open menu select My Edits and select a dictionary from the list, as shown in Figure 12-9.
Figure 12-9 Using Open My Edits Option to Open a Dictionary
Oracle SOA Composer opens the specified dictionary in edit mode.
The Select a Dictionary to Open dialog includes a Rules File field. When you hold the mouse over the values in the Rules File field, Oracle SOA Composer shows a "Complete Path" popup that includes the dictionary path, as shown in Figure 12-10.
Figure 12-10 Showing the Dictionary Rules File Complete Path from the Open Dialog
When you open a dictionary Oracle SOA Composer displays the Globals tab. The Globals tab only shows final global variables (global variables with Final option selected). Final global variables from linked dictionaries are also displayed in the Globals tab. However, these linked global variables are not editable even in the edit mode.
You cannot create or delete global variables. From the Globals tab, in edit mode, you can edit the Name, Description, and Value fields. For the Value field, you can use the expression builder to set the value. To check for validity, you can click Validate button on the Oracle SOA Composer menu bar. In view mode, the edit operations are not available. For information on using the Oracle SOA Composer edit mode, see Section 12.5, "Getting Started with Editing and Saving a Dictionary at Runtime".
To view globals in Oracle SOA Composer:
In Oracle SOA Composer, from the Open menu, select Open Rules.
After you open a dictionary, select the Globals tab from the left-side pane. This displays the Globals table, as shown in Figure 12-11.
Figure 12-11 Using the Oracle SOA Composer Rules Dictionary Globals Tab
When you open a dictionary and select the Bucketsets tab, if the dictionary contains bucketsets, the table shows all the bucketsets. Bucketsets from linked dictionaries are also displayed in the Bucketsets table. You can select a linked bucketset and click the Edit button to view the buckets. However, a linked bucketset is not editable even in the edit mode.
For information on the Oracle SOA Composer edit mode, see Section 12.5, "Getting Started with Editing and Saving a Dictionary at Runtime".
To view bucketsets in Oracle SOA Composer:
In Oracle SOA Composer, from the Open menu select Open Rules.
After you open a dictionary, select the Bucketsets tab from the left-side pane. This displays the Bucketsets table, as shown in Figure 12-12.
Figure 12-12 Using the Oracle SOA Composer Rules Dictionary Bucketsets Tab
In Oracle SOA Composer, you can view the names of the dictionaries to which the current dictionary is linked by using the Links tab on the left-side panel as shown in Figure 12-13. Currently, even in the edit mode, you can only view the linked dictionary names, but you cannot link to a dictionary or delete an existing link to any dictionary.
To view linked dictionary names in Oracle SOA Composer:
In Oracle SOA Composer, from the Open menu, select Open Rules.
After you open a dictionary, select the Links tab from the left-side pane. This displays the Links table, as shown in Figure 12-13.
Figure 12-13 Viewing the Linked Dictionary Name
The Links table displays the name of the linked dictionaries, which in this case is CreditRatingRules.
In Oracle SOA Composer, you can view the decision functions that are available to the current dictionary by using the Decision Functions tab on the left-side panel as shown in Figure 12-14. Currently, even in the edit mode, you can only modify the following fields and options:
Description
Rule Firing Limit
Check rule flow
Make stateless
Available Rulesets to fire
You cannot create any decision function, rename an existing decision function, or add or delete any input or output.
To view decision function names in Oracle SOA Composer:
In Oracle SOA Composer, from the Open menu, select Open Rules.
After you open a dictionary, select the Decision Functions tab from the left-side pane. This displays the Decision Functions table, as shown in Figure 12-14.
Figure 12-14 Viewing Decision Function Names
The Decision Functions table displays the names of all the available decision functions, both parent and linked, which in this case are DecisionFunction_0, and CreditRatingRules.DecisionFunction_0.
Oracle SOA Composer displays the rulesets in the dictionary on the left-side panel, as shown in Figure 12-15. You can select a ruleset to display a detailed view of the ruleset. In view mode, all the rules in the ruleset are displayed but they are not editable. For information on the Oracle SOA Composer Edit mode, see Section 12.5, "Getting Started with Editing and Saving a Dictionary at Runtime".
Note:
Using Oracle SOA Composer in edit mode, you cannot create or delete rulesets. You can view and modify rulesets.Figure 12-15 Using the Oracle SOA Composer Rules Dictionary Rulesets Tab to View Rules
To select the next ruleset or previous ruleset:
In Oracle SOA Composer, open a dictionary and select a ruleset.
When you are viewing a ruleset, you can click Select Next Ruleset or Select Previous Ruleset to view the next or the previous ruleset, as shown in Figure 12-16.
Figure 12-16 Using the Oracle SOA Composer Rules Dictionary Rulesets Tab to Select Next Ruleset
To add new Rulesets click on the Add Ruleset icon next to Rulesets in the left navigation menu. For more information on Rulesets, see Chapter 4, "Working with Rulesets and Rules".
When you select and open a dictionary Oracle SOA Composer shows the dictionary in read only mode. From each tab in view mode, you enter edit mode for the dictionary item by selecting the Edit menu. In edit mode, after you make changes, click Save to save your changes. Saving changes saves the dictionary to a work area. To apply the changes to the runtime version of the dictionary, click Commit.
If you decide you do not want to apply the changes, you can revert the changes by selecting either of the following:
Click Revert on the Oracle SOA Composer menu and then select Clear all unsaved changes.
This clears only the unsaved changes.
Click Revert on the SOA Composer menu and then select Clear all session edits and saved changes.
This aborts all the changes done as part of the existing edit session.
When you edit a composite and redeploy it by overwriting the existing composite, the edit session is saved. When you reopen the dictionary, a dialog box opens in SOA Composer that asks you whether you want to revert to the previous edit session. Use the dialog box if you wish you revert to the previous edit session.
In Oracle SOA Composer, number formatting changes based on the browser locale. For example, you are using Oracle SOA Composer with U.S. English as the browser language. You enter a floating-point data, such as 34533223.2345, as a value. If you wish to view the data in any other language, such as French, you need to:
Modify the browser locale for the instance to French.
Click the Refresh button of the browser to view the number formatting changes
In French, the value should display as 34533223,2345.
Note:
The grouping and decimal separators specified in Oracle SOA Composer overrides the locale-specific ones.You can cut/copy a bucketset/rule from one dictionary and open another dictionary in composer and paste it. However, cut/copy/paste works between different dictionaries within the same session.
Cutting/copying and pasting feature enables you to quickly create a new rule element based on an existing one, without having to create the new element from scratch.
The icons in the Figure 12-17help you with cut, copy and paste options.
Oracle SOA Composer enables you to cut/copy and paste the following elements of a rule:
Rules
Patterns
Conditions
Actions
Bucketsets
Cut/copy/paste is not supported for the following:
Globals
Links
Buckets
Decision Functions
In Oracle SOA Composer, selecting the Globals tab shows you a table listing the globals in the dictionary. To edit a global, select the appropriate row, and the entire row becomes editable. Make necessary changes as required.
To add a global, click the Add Global icon on the top. A new empty row is added. Make necessary changes to Name, Description, Value, Bucketset, Type, Final, Consent. For more information on adding globals, see Section 2.3, "Working with Oracle Business Rules Globals".
To delete a global, select a row and click the Delete icon.
In Oracle SOA Composer, selecting the Bucketsets tab shows you a table listing the bucketsets in the dictionary. To edit a bucketset, select the appropriate row, and click the Edit Bucketset icon to display the Bucketset Editor. Depending on the type of the bucketset, Range, Enum, or LOV, this displays a corresponding Edit bucketset page.
You can create a Range Bucketset by clicking the Add Bucketset icon and selecting a type. This adds a new row in the Bucketsets table. For example, for Date types, such as Date, DateTime, or Time, a calendar is displayed for selecting the date, time, and timezone. Adding a bucket automatically adds an end point for a range bucket and a value for an LOV bucket based on the datatype. You can modify the newly added bucket end point or value. Note that the alias is modified when an end point or value is changed.
For more information on adding Bucketsets, see Section 3.6, "Working with Bucketsets" and Section 3.7, "Associating a Bucketset with Business Terms".
To cut or copy a bucket set, select a row and click Cut or Copy. To paste a copied bucket set, click Paste.
To delete a bucketset, select a row and click Delete.
To edit a Range bucketset, in Oracle SOA Composer select the Bucketsets tab. This displays a table listing the bucketsets in the dictionary.
To edit a Range bucketset, select the appropriate Range bucketset row and click the Edit Bucketset icon. This displays the Bucketset Editor page, as shown in Figure 12-19.
Figure 12-19 Using Bucketset Editor to Edit a Range Bucketset
Use the Bucketset Editor to edit the appropriate fields in the bucketset. You can click Add Bucket to add a bucket, and also select a row and click Delete Bucket to delete a bucket.
Click OK to confirm the changes.
To edit an LOV bucketset, in Oracle SOA Composer select the Bucketsets tab. This displays a table listing the bucketsets in the dictionary.
To edit an LOV bucketset, select the appropriate LOV bucketset row and click the Edit Bucketset icon. This displays the Bucketset Editor page, as shown in Figure 12-20.
Figure 12-20 Bucketset Editor Dialog to Edit an LOV Bucketset
Use the Bucketset Editor to edit the appropriate fields in the bucketset. You can click Add Bucket to add a bucket, and also select a row and click Delete Bucket to delete a bucket.
To change the order of buckets in the bucketset, select a bucket and then use the up or down arrow to move the selected bucket (Figure 12-21).
You can change the relative position of buckets in an LOV bucketset only; you cannot reorder buckets in a Range bucketset.
Figure 12-21 Moving Buckets in a Bucketset to Change the Order of Values
Click OK to confirm the changes.
Only when a bucket has the Allowed in Actions field selected does the bucketset display in the condition cell drop-down in a Decision Table.
Click Validate in the menu bar to validate the dictionary while making changes to a bucketset.
An Oracle Business Rules dictionary can be linked to other dictionaries. The complete data model defined by a dictionary and its linked dictionaries is called a combined dictionary. You can create multiple links to the same dictionary. However, in this case, all but the first link is ignored.
You cannot use Oracle SOA Composer to link dictionaries. However, if a deployed composite already has linked dictionaries, using Oracle SOA Composer, you can view the linked dictionary names and make use of the Globals, Bucketsets, and Rulesets of the linked dictionaries across applications. For example you have an application called App1
that contains a dictionary called Dict1
. Dict1
is linked to another dictionary called Dict2
. Because Dict1
is linked to Dict2
, the objects of Dict2
will be available for use in App1
.
For more information on viewing linked dictionary names, see Section 12.4.5, "How to View Linked Dictionary Names at Runtime."
In Oracle SOA Composer, in the edit mode, you can use the Prefix Linked Names checkbox in the Links table to either display or hide the linked dictionary name that is prefixed to the all the items in the dictionary such as Globals, Bucketsets, and Rulesets. Selecting the checkbox prefixes facts from the linked dictionary with its dictionary name, and deselecting hides the linked dictionary facts prefix. By default, the Prefix Linked Names checkbox is in selected state as shown in Figure 12-22.
Figure 12-23 displays three bucketsets: Rating from the current dictionary and Bucketset_1 and Bucketset_2 from the base dictionary CreditRatingRules, which is prefixed to both Bucketset_1 and Bucketset_2.
Figure 12-23 Prefixed Linked Dictionary Name Displayed
Figure 12-24 displays the Rating bucketset name after you have deselected the Prefix Linked Names checkbox in the Links tab. In this case, the linked dictionary name is not prefixed to the bucketset name.
For more information about linked dictionaries, see Section 2.2.7, "What You Need to Know About Dictionary Linking."
In Oracle SOA Composer, in the edit mode, selecting the Decision Functions tab shows you a table listing the decision functions that are available to the dictionary, both parent and linked.
Currently, even in the edit mode, you can only modify the following fields and options:
Description
Rule Firing Limit
Check rule flow
Make stateless
Initial Actions
Rulesets and Decision Functions
To edit a decision function, in Oracle SOA Composer, select the Decision Functions tab. This displays a table listing the decision functions in the dictionary.
Select the appropriate decision function row and click the Edit Decision Function icon above the table. This displays the Decision Function Editor dialog box as shown in Figure 12-25.
In the Description field, optionally enter a description.
Enter the required number value from the Rule Firing Limit list. By default, the selected value is unlimited
. However, you can enter an integer value for the rule firing limit and press the Tab key. The newly specified value gets added to the Rule Firing Limit list.
Select the appropriate decision function options:
Check rule flow: When selected, this option specifies that the rule flow is checked
Make stateless: When selected specifies the decision function is stateless.
You cannot edit the following:
Name field
Inputs tab
Outputs tab
In the Initial Actions tab, you can add actions that could be used to change input facts before they are asserted, change the ruleset stack, set the effective date, or even assert output facts. These actions could be used instead of rules, or to "set up" the environment for running rules. Initial Actions always run just before the inputs are asserted and the rules are run. The RL for the actions will be executed just before the inputs are asserted.
Consider a situation where a decision function (DF1) calls another decision function (DF2) using the Initial Actions tab. DF1 is configured to push Ruleset1 to the ruleset stack. DF2 is configured to push Ruleset2. In DF1, before the initial actions are executed, Ruleset1 is pushed to the ruleset stack. Then, when DF2 is called, Ruleset2 is also pushed. So when rules start running, rules from both rulesets fire because of the ruleset stack. If you want to push Ruleset2 (because in the initial actions, you are calling DF2), you can use initial actions in DF1 to clear the ruleset stack before calling DF2, and push Ruleset1 on the stack after calling DF2.
You can add any required action ranging from assert
, call
, modify
to even conditional actions such as if
, else
, elseif
, while
, for
, if
(advanced)
, and while
(advanced)
as shown in Figure 12-26.
The if
(advanced)
and while
(advanced)
structs accepts only boolean
values. For each of the action conditions, you can add different test form types.
Note:
If decision function DF1 contains DF2 in the Rulesets & Decision Functions tab, then DF2 may not have any initial actions.In the Rulesets & Decision Functions tab, use the left and right arrow buttons to move items from the Available box to the Selected box.
Select an item in the Selected box, and click up or down arrow buttons as appropriate to order the rulesets and the decision functions.
For more information on decision functions, see Chapter 6, "Working with Decision Functions."
You can use the Oracle Business Rules Dictionary Editor composite declarative component to leverage the functionality of editing Rules Dictionaries in any ADF-based Web application. It enables you to edit business rules metadata artifacts, such as Globals, Bucketsets, and Rulesets, by using the Rules SDK2 API.
For more information on Oracle Business Rules Dictionary Editor, see "Using the Oracle Business Rules Dictionary Editor Declarative Component" in Developing SOA Applications with Oracle SOA Suite.
Rules Dictionary Editor Task Flow, which is a wrapper around the Rules Dictionary Editor declarative component is used in ADF-based Web applications that require a task flow instead of a declarative component.
For more information on Oracle Business Rules Dictionary Editor, see "Using the Oracle Business Rules Dictionary Task Flow" in Developing SOA Applications with Oracle SOA Suite.
In Oracle SOA Composer with edit mode you can edit, add, and delete rules in a ruleset. For more information on how to use edit mode, see Section 12.5, "Getting Started with Editing and Saving a Dictionary at Runtime".
Oracle SOA Composer allows you to edit the rules in a dictionary.
To edit a rule with Oracle SOA Composer:
In Oracle SOA Composer, with an Oracle Business Rules dictionary open, select a ruleset.
Click the Edit menu item.
Oracle SOA Composer shows a confirm dialog if another user is currently editing the same dictionary. In the confirm dialog, click No or Yes, depending on whether you want to edit the document (if you click Yes, your changes could conflict with another user's changes). For more information, see Section 12.10.1, "What You Need to Know About Editing With Multiple Users at Runtime".
Oracle SOA Composer creates an area to save any modifications you make to the dictionary, and the Edit menu changes to a Save menu.
Note:
The Edit view provides an interface to the dictionary that allows you to edit most dictionary components (you can only create and edit some dictionary components at design-time using the Rules Designer extension to Oracle JDeveloper).To edit an item in the dictionary, in the navigation tab, select the item of interest. For example, see Figure 12-27 with the ruleset SetupRules selected.
Figure 12-27 Using Oracle SOA Composer to Edit a Ruleset in a Dictionary
Click the Save menu item to save your changes in the work area.
In Oracle SOA Composer you can add rules to a ruleset.
In edit mode, select a ruleset of interest.
In the rule area, click Add Rule as shown in Figure 12-28. The rule is added immediately after the current one unlike Rules Designer, where a new rule is added at the end.
If the ruleset where you are adding a new rule does not contain any existing rule, then you can either:
Click the down arrow adjacent to the Add icon and select Add Rule in the ruleset area
Click the Add Rule icon in the rules area
Figure 12-29 displays the Add and the Add Rule icon.
In Oracle SOA Composer you can delete rules in a ruleset.
To delete a rule in a ruleset:
In edit mode, select a ruleset of interest.
In the rule area locate the rule you want to delete and click Delete Rule, as shown in Figure 12-30.
Figure 12-30 Deleting a Rule in a Ruleset
In Oracle SOA Composer you can edit advanced settings for rules in a ruleset. For more information on advanced settings, see Section 4.5, "Using Advanced Settings with Rules and Decision Tables".
To show and edit advanced settings in a rule:
In edit mode, select a ruleset of interest.
In the rule area locate the rule you want to show or change advanced settings. Expand the rule first, if necessary.
Click the Show Advanced Settings icon next to the rule name. This displays the advanced settings, as shown in Figure 12-31.
Figure 12-31 Showing and Editing Rule Advanced Settings
In Oracle SOA Composer you can add conditions to a rule in a ruleset. For more information on working with rule conditions, see Section 4.3, "Working with Rules".
In edit mode, select a ruleset of interest.
In the rule area, locate the rule where you want to add a condition.
Next to the existing rule condition, click the down arrow to display a list of options available for adding a condition as shown in Figure 12-32.
Figure 12-32 Adding a New Rule Condition in a Ruleset
If the rule where you want to add a condition does not contain any existing condition, then you need to click the Add Test down arrow to display a list of available options for adding a condition as shown in Figure 12-33.
Figure 12-33 Adding a Condition to a Blank Rule
The following are the available options for adding a condition:
simple test: Adds a simple test condition
variable: Adds a variable definition. The variable and its value can be represented as an inline business term definition.
(...): Adds a new simple test within a nested parenthesis
not(...): Adds a new simple test within a NOT nested parenthesis
Each nesting level provides a list with the preceding options to operate on a nested block.
In Oracle SOA Composer you can delete conditions for a rule in a ruleset. For more information on working with rule conditions, see Section 4.3, "Working with Rules".
In edit mode, select a ruleset of interest.
In the rule area, locate the rule where you want to delete a condition.
Next to the rule condition that you want to delete, click the down arrow, and then click Delete Test from the list as shown in Figure 12-34.
Figure 12-34 Deleting a Rule Condition in a Ruleset
Separate list is available for each nesting level. So the delete operation can be performed on a single condition or a nested block.
Using Oracle SOA Composer, you can edit conditions in a rule. You can select a rule condition for nesting or modify expression values within the condition. For more information on working with rule conditions, see Section 4.3, "Working with Rules".
To modify a condition in a rule:
In edit mode, select a ruleset of interest.
In the rule area locate the rule where you want to modify conditions.
In the IF area, use the controls, icons, and selection boxes, including the Left Value expression icon, list for an operator, and Right Value expression icon to modify the condition.
Filtering is supported for expressions. For example, when you type Employee
, values are filtered and the values with Employee
are displayed in the drop-down. Use mouse or arrow keys to select a value.
You can use the Expression Builder, Condition Browser, Date Browser, and Right Operand Browser to edit the left and right-side expressions.
In addition to modifying the values, you can also change the form type of a condition. For example, a simple test can be changed to variable definition and so on. To change the form type of a condition, you need to select the condition by using the adjacent check box and select the required form type from the Selected Tests list as shown in Figure 12-35.
In Oracle SOA Composer you can add actions to a rule. For more information on working with rule actions, see Section 4.3, "Working with Rules".
In edit mode, select a ruleset of interest.
In the rule area locate the rule where you want to add an action.
In the THEN area for the rule, next to the rule action click Add Action, as shown in Figure 12-36.
Figure 12-36 Adding a Rule Action in a Ruleset
If the rule to which you want to add an action does not contain any existing action, then you need to click the Add Action icon in the THEN area as shown in Figure 12-37.
In Oracle SOA Composer you can delete actions in a rule. For more information on working with rule actions, see Section 4.3, "Working with Rules".
In edit mode, select a ruleset of interest.
In the rule area, locate the rule where you want to delete an action.
In the THEN area for the rule, select the action.
Click Delete Action, as shown in Figure 12-38.
Figure 12-38 Deleting a Rule Action in a Ruleset
In Oracle SOA Composer you can modify actions in a rule. For more information on working with rule actions, see Section 4.3, "Working with Rules".
In edit mode, select a ruleset of interest.
In the rule area, locate the rule where you want to modify an action.
In the THEN area for the rule as shown in Figure 12-39 you can do the following:
Add and delete actions using Add and Delete icons on the top.
Select the action and move it up and down using the respective arrow icons.
Cut, copy and paste using the Cut, Copy and Paste icons on the top.
Click the More
link in the drop-down area to launch Select a Target popup and select a value.
Click the Edit Properties icon next to the rule action and modify properties.
The Properties dialog box is displayed where you can modify the property details as shown in Figure 12-40.
For more information on number formatting in rules, see Section 12.5.1, "What You May Need to Know About Localized Number Formatting Support in Oracle SOA Composer."
In Oracle SOA Composer, you can work with advanced mode rules in a ruleset. For more information on working with advanced mode rules, see Section 4.7, "Working with Advanced Mode Rules".
To show and modify advanced mode rules:
In edit mode, select a ruleset of interest.
In the rule area, locate the rule where you want to show or modify advanced mode rules.
Click Show Advanced Settings icon to show advanced settings. For more information on showing advanced settings, see Section 12.6.4, "How to Show and Edit Advanced Settings for Rules at Runtime".
If the Advanced Mode icon is not selected, then select the Advanced Mode icon. This shows the advanced mode rule options, as shown in Figure 12-41.
Figure 12-41 Showing Advanced Mode Rule Options
The Advanced Mode rules options enables you to create, modify, and delete patterns, as well as add, modify, and delete conditions and actions within a pattern.
Using the Advanced Mode rule options, you can:
Specify a pattern variable and select a fact type for the variable: You can directly enter the name of the pattern variable in the variable field. You can specify the fact type for the variable by using the fact type list as shown in Figure 12-42.
Figure 12-42 Specifying Pattern Variable and Fact Type
In the graphic example, CustomerOrder
is a pattern variable of CustomerOrder
fact type.
Add a pattern: Click the Add Pattern icon to create a pattern to the existing rule. Figure 12-43 displays an added pattern. The newly created pattern is blank.
Delete a pattern: Click the Delete Pattern icon to delete a pattern from a rule. Figure 12-44 displays how to delete a pattern.
Specify connectives: Two or more patterns are joined by a connective, and
or or
. You can use the connective link to toggle between the connectives.
Work with nested patterns: A nested pattern has patterns inside it. These are enclosed within curly braces ({}). The pattern operator list is followed by the open curly brace. You can create a nested pattern by clicking Surround pattern with parentheses icon and you can remove the pattern nesting by clicking the Remove parentheses from pattern icon as shown in Figure 12-45.
Figure 12-45 Adding and Removing Pattern Nesting
Inside the open curly brace, you can specify a pattern and then click the Add Test down arrow to add conditions to the nested pattern as shown in Figure 12-46, as well as add another pattern to the same pattern block.
Figure 12-46 Inserting Pattern Conditions
A nested pattern block ends with a closing curly brace. You can have multiple levels of nested patterns, which means that inside a nested pattern, you can have another nested pattern. You can click the Delete Nested Pattern Block icon to remove the entire nested pattern block as shown in Figure 12-47.
Figure 12-47 Deleting a Nested Pattern Block
When you nest a pattern, an operator list is displayed with (for each case where) selected as the default operator in the operator list. The other items are there is a case where, there is no case where, and aggregate as shown in Figure 12-48.
Figure 12-48 Selecting the Pattern Operator
The user interface remains the same as (for each case where) when you select there is a case where or there is no case where as the operator. However, when you select aggregate, the user interface changes. For an aggregate operator, you must enter a variable in the available field and select a function from the function list. The function list displays the following:
count
average
maximum
minimum
sum
collection
Except for the count
function, all the other functions require an expression. You can specify an expression in the available field or launch the Condition Browser window.
Figure 12-49 displays a nested pattern, where numPricey
is the variable name and count
is function name.
Figure 12-49 The Count Aggregate Operator
In the Advanced Mode of rules, in the THEN part, you can add any required action ranging from assert
, call
, modify
to even conditional actions such as if
, else
, elseif
, while
, for
, if
(advanced)
, and while
(advanced)
as shown in Figure 12-50.
In Oracle SOA Composer you can work with tree mode rules in a ruleset. For more information on working with tree mode rules, see Section 4.8, "Working with Tree Mode Rules".
To show and modify tree mode rules:
In edit mode, select a ruleset of interest.
In the rule area locate the rule where you want to show or modify tree mode rules.
Select Advanced Settings icon to show advanced settings. For more information on showing advanced settings, see Section 12.6.4, "How to Show and Edit Advanced Settings for Rules at Runtime".
If the Tree Mode icon is not selected, then select the Tree Mode icon. This shows the tree mode rule options, as shown in Figure 12-51.
Figure 12-51 Showing the Tree Mode Rule Area in a Rule
In a ruleset with many rules, for the ease of navigation, the Oracle SOA Composer UI displays the rules in multiple pages, with each page containing a set of six rules. This paging capability ensures better performance when a ruleset with a large number of rules are loaded.
Oracle SOA Composer provides a list from where you can directly access the page where the rule of your choice exists. Alternatively, you can click the Previous and Next buttons on the either side of the list to move to the preceding or the following set of rules.
Figure 12-52 displays the rules paging capability of Oracle SOA Composer.
You can use the Oracle Business Rules Editor composite declarative component to leverage the functionality of editing business rules in any ADF-based Web application. It enables you to edit business rules available in rulesets by using the Rules SDK2 API.
For more information on Oracle Business Rules Editor, see "Using the Oracle Business Rules Editor Declarative Component" in Developing SOA Applications with Oracle SOA Suite.
The Oracle Business Rules Dictionary Editor is a composite declarative component that can be embedded in any ADF-based web application. It enables you to edit business rules metadata artifacts, such as globals, bucketsets, and rulesets, by using the Rules SDK2 API.
For more information on Oracle Business Rules Dictionary Editor, see Using the Oracle Business Rules Dictionary Editor Declarative Component in Developing SOA Applications with Oracle SOA Suite.
The Oracle Rules Dictionary Editor Task Flow is basically a wrapper around the Rules Dictionary Editor declarative component. The task flow is used in ADF-based web applications that require a task flow instead of a declarative component.
For more information on Oracle Business Rules Dictionary Editor Task Flow, see Using the Oracle Business Rules Dictionary Editor Task Flow in Developing SOA Applications with Oracle SOA Suite.
Oracle SOA Composer provides browser windows that helps you to work with different types of expressions such as rule expressions, XPATH expressions, date expressions, and so on.
The different types of browsers provided by Oracle SOA Composer are:
Expression Builder is used to build different types of expressions such as XPATH expressions, rule expressions, and so on.
Expression Builder has a field where you can enter the expression directly. It has four tabs: Variables, Functions, Operators, and Constants. Each of these tabs display data in a tree structure. The Variables tab displays all the variables in the rules meta-data. The Functions tab displays all the functions in the rules meta-data. The Operators tab displays operators such as +, -, *, and so on. The Constants tab displays all the constants that exist in the rules meta-data.You can switch between the tabs, select an item in the tree, and click the Insert Into Expression button to insert the selected item at the cursor position in the expression field. When an item is selected in the tree, the Content Preview and the Description areas display more information about the selected item. Once you create the expression and click OK, the newly created expression appears in the field that is available to the left of the expression builder icon.
Figure 12-53 displays the Expression Builder browser.
Figure 12-53 The Expression Builder Browser
The Condition Browser has a field, a hierarchical tree, and an Expression Builder embedded inside it. You can enter the expression directly in the field, or select an item from the tree. Condition Browser supports filtering. For example, when you start entering customer
the tree is narrowed down to items with customer
.
When an item is selected in the tree, the new selection appears in the field immediately. You can also use the embedded Expression Builder to create an expression.
Once the Expression Builder is launched and an expression is created, the new expression appears in the Condition Browser field. Once you create an expression and click the OK button in the Condition Browser, the newly created expression appears in the field that is to the left of the Condition Browser icon.
Figure 12-54 displays the Condition Browser.
The Date Browser is used to select a Literal Date or a Date Expression. The Date Browser has two options to switch between a Literal Date and a Date Expression. When one option is selected, the other one is disabled.
Select:
Literal Date option to enter a date using a Calendar pop-up
Date Expression option to enter the expression directly in the Date Expression field or to launch the Condition Browser to select a date expression.
Figure 12-55 displays the Date Browser.
The Right Operand browser is used to select multiple right expressions. The browser displays operands in each row. You can enter an expression directly in the operand field or launch the Condition Browser to select an expression. The + icon adds a row after the current one. The - icon deletes the current row. These icons are enabled and disabled based on the selected operator. For instance the in operator allows multiple right expressions. So in this case, the icons are enabled.
Figure 12-56 displays a Right Operand browser.
Note:
Using Right Operand browsers, you can enter multiple values for the right-side expression. However, you can place a Date browser outside a Right Operand browser, and in which case, only one expression can be entered. For both these browsers, you cannot enter values directly in the right-side expression field. Once you have entered values using the browser and clicked OK, the values get added as comma-separated values on the Rules UI.When Oracle SOA Composer is in edit mode, you can edit, add, and delete a Decision Table in a ruleset. For more information on how to use edit mode, see Section 12.5, "Getting Started with Editing and Saving a Dictionary at Runtime".
In Oracle SOA Composer, you can add a Decision Table to a ruleset. For more information on working with Decision Tables, see Section 5.1, "Introduction to Working with Decision Tables".
To add a Decision Table in a ruleset:
In edit mode, select a ruleset of interest.
In the ruleset area, click Add and then Add Decision Table, as shown in Figure 12-57.
Figure 12-57 Adding a Decision Table in a Ruleset
A blank Decision Table is displayed as shown in Figure 12-58.
Using Oracle SOA Composer, you can add condition rows to a Decision Table.
To add condition rows to a Decision Table:
From Oracle SOA Composer, select a ruleset from the Rulesets navigation tab and select the Decision Table where you want to add conditions from the View box (for example, Decision Table 1).
In the Decision Table toolbar, from the list next to the Add icon, select Add Condition that displays the Condition Browser window where you can specify or select conditions.
The selected or specified condition row and a Rules column with the header R1 is added to the table; the cell below R1 has a "?" symbol (Figure 12-59). The "?" symbol indicates that the cell does not have a value yet.
Figure 12-59 New Condition Row Added in a New Decision Table
If you are adding a condition to a table that has existing condition rows, similar to adding a condition to a blank Decision Table, Oracle SOA Composer prompts for specifying the condition details. Once the details are provided, the specified condition is added as the last condition row; the condition cells under each rule column in the new row also have "?" symbols, as shown in Figure 12-60.
Figure 12-60 New Condition Row Added As Last Row in a Decision Table
For information about all symbols that might be used in a decision table, see Section 12.8.4.1, "Editing Decision Table Cells."
If you want to edit a specified condition, in the Conditions area, click the condition row, and then click the Edit Condition icon on the toolbar as shown in Figure 12-61. This displays the Condition Browser.
Figure 12-61 Editing a Condition to a Decision Table
Enter an expression by clicking in the Conditions Browser to select a variable, or click the Expression Builder icon to display the Expression Builder.
Expression Builder lets you build expressions.
Each condition row requires a bucketset from which to draw the values for each cell. When the value you select has an associated global bucketset, then by default the bucketset is associated with the condition row.
If there is no global bucketset associated with the value, then after you add a condition row to a Decision Table, you need to either specify an existing global bucketset or create a Local List of Values or a Local List of Ranges bucketset.
To associate a bucketset for the condition, perform either of the following:
In the Conditions area, select the condition, and select an existing bucketset from the Select Bucketset list as shown in Figure 12-62.
Figure 12-62 Associating an Existing Bucketset With a Condition Row
In the Conditions area, select the condition, and select either Local List of Values or Local List of Ranges (as relevant) from the Select Bucketset list as shown in Figure 12-63.
Figure 12-63 Associating a Local List of Values or Local List of Ranges With a Condition Row
You can edit the bucketset for the selected condition by clicking the Edit Bucketset icon as shown in Figure 12-64.
This displays the Bucketset Editor where you can add, edit or delete buckets. If editing a Local List of Values bucketset, you can also reorder buckets in the bucketset.
For more information on number formatting in bucketsets, see Section 12.5.1, "What You May Need to Know About Localized Number Formatting Support in Oracle SOA Composer."
Repeat Step 2 through Step 5, as required to add additional condition rows in the Decision Table.
For more information on adding condition rows, see Section 5.2.2, "How to Add Condition Rows to a Decision Table".
In Oracle SOA Composer, you can add actions to a Decision Table.
To add actions to Decision Table:
From Oracle SOA Composer, select a ruleset from the Rulesets navigation tab and select the Decision Table where you want to add actions.
From the list next to the Add icon, select Add Action and select an available action from the list. For example, click Modify as shown in Figure 12-65.
Figure 12-65 Adding an Action to a Decision Table
The Action Editor window is displayed as shown in Figure 12-66.
Table 5-1 in Chapter 5, "Working with Decision Tables," lists the available actions.
In the Action Editor window, select the action target and then specify values for an action cell.
For more information on number formatting in bucketsets, see Section 12.5.1, "What You May Need to Know About Localized Number Formatting Support in Oracle SOA Composer."
For more information on adding actions to Decision Tables, see Section 5.2.3, "How to Add Actions to a Decision Table."
Using Oracle SOA Composer, you can add a rule to a Decision Table.
To add a rule to a Decision Table:
From Oracle SOA Composer, select a ruleset from the Rulesets navigation tab and select the Decision Table where you want to add the rule.
From the list next to the Add icon, select Add Rule as shown in Figure 12-67.
Figure 12-67 Adding a Rule to a Decision Table
A new column for the added rule is displayed as shown in Figure 12-68.
Figure 12-68 Added Rule in the Decision Table
Note:
When you add a rule to a blank Decision Table, Oracle SOA Composer displays the Condition Browser window, and after you select or specify a condition, a condition row gets added automatically.Notice that the new rule is added as the first rule of the Decision Table and the other rules have moved as required to keep the bucket values in their defined order. This is because Order Rules By Bucket is enabled by default, which means rule ordering in a Decision Table is set according to the relative position of buckets associated with a condition expression. If Order Rules By Bucket is not enabled when you add a rule, the new rule is added as the last rule of the Decision Table. In either case, the cells in the new rule column have "?" symbols, indicating the cells do not have values yet.
For information about all symbols used in a table, see Section 12.8.4.1, "Editing Decision Table Cells." For additional information about rules ordering, see Section 12.8.4.2, "Controlling the Order of Rules in a Decision Table."
Enter values for the condition cells by double-clicking the cells.
Note:
You can enter values for the condition cells (or any other cells) only by double-clicking the cell.Double-click an Action row to enter values for the action cells.
Note:
If because of the inadequate column width, you cannot view the complete contents of a cell in a Decision Table, you can roll your mouse pointer over the cell to view the contents.Each rule in a Decision Table contains cells pertaining to three sections: Conditions, Conflicts, and Actions.
In view mode, a condition cell with a "?" symbol indicates that the cell does not have a condition value. If a cell has two or more values specified, a semicolon-separated list of values is displayed in the cell.
In the editable mode (that is, when you double-click a conditions cell), the condition cells display specified condition values in multichoice lists. When editing a new rule or when a condition value is unspecified, the condition cell is blank, as shown in Figure 12-69.
If you select All:
When the particular condition cell is double-click, the cell displays "All"
When the particular condition cell is not selected, the cell displays the "-" symbol
Figure 12-70 shows a Decision Table with a condition cell displaying the value "All" in editable mode, a cell displaying the "-" symbol, and cells displaying a semicolon-separated list of values.
Figure 12-70 Displaying All Values for a Condition
You can select any value that is available in the condition value list.
Note:
When you edit the condition cells, if Order Rules By Bucket is selected, the Decision Table is refreshed and the edited rule column may shift to the left or right depending on the selected condition cell value.Note:
You can modify the bucketset associated with a a condition, by clicking the condition. This enables the bucketset list and the Edit Bucketset icon so that you can edit the associated bucketset.When you add an action, an action row is created with the specified action type. There are two types of action cells:
The Action form cells contain checkboxes. When a rule fires, only selected actions are executed. In Figure 12-71, R1 and R3 action checkboxes are selected whereas the other action checkboxes are deselected. In this case, if R1 fires, the action will be executed, but if R2 fires, then the action will not be executed.
Note:
The Edit Action icon is enabled only if the action form cell row is selected. The Edit Action icon invokes the Action Editor window.The Action parameter cells contain the parameters of the action form. You can directly enter the action parameter values in the respective field or you can invoke the Condition Browser window to select a value.
Figure 12-71 displays both types of action cells. You can see that the action parameter cells, in edit mode, have edit fields with the Condition Browser icons next to them.
Figure 12-71 The Action Cells in a Decision Table
Figure 12-72 displays the Action Editor window where you can select the values for an action parameter cell. If you select the Always Selected checkbox, all the checkboxes for the particular action form get selected. All the checkboxes pertaining to the action form are also disabled, because the specified action "is always selected".
Note:
You can delete all the condition cells and all the action cells of a Decision Table at one go. Clicking the Conditions or the Actions box selects all the conditions or actions in the Decision Table respectively as shown in the following graphic.You can then click the Delete icon on the Decision Table toolbar to delete the conditions or actions.
By default the Order Rules by Bucket checkbox is enabled in a Decision Table, as shown in Figure 12-68. This means the order of the buckets in the bucketset associated with a condition row determines the order of the condition cells, and thus the order of the rules.
To change the order of rules in a Decision Table, you need to change the order of buckets in the bucketsets. For example, you can control rule ordering in a Decision Table by changing the relative position of the buckets in an LOV bucketset associated with a condition row. Note, however, that you cannot reorder range buckets.
When the Order Rules by Bucket checkbox is selected in a Decision Table and you add a rule, by default the new rule is added as the first rule column; the other rule columns move as required to keep the bucket values in their defined order. When the Order Rules by Bucket checkbox is not enabled and you add a rule, the new rule is added as the last rule column. If you now select the Order Rules by Bucket checkbox, the newly added rule shifts to the first column.
You can delete one or multiple rules in a Decision Table.
To delete rules in a Decision Table:
Select the rules column that you want to delete.
Click the Delete icon.
To delete multiple rules in a Decision Table:
Select a rule column that you want to delete.
Press the Ctrl key, and by keeping the key pressed, select the other rule columns as shown in Figure 12-73.
Click Delete.
In Oracle SOA Composer, you can define tests in a Decision Table by adding conditions to facts. For more information about defining tests and working with rule conditions, see Section 4.3, "Working with Rules".
Note:
To add more complex conditions to facts, see Section 12.8.11, "Working with Advanced Mode Options in a Decision Table."To add tests to a Decision Table:
From Oracle SOA Composer, select a ruleset from the Rulesets navigation tab and select the Decision Table where you want to add a test.
Click the Show Advanced Settings icon (double downward pointing arrows) next to the Decision Table name. If Advanced Mode is selected, deselect the checkbox.
Figure 12-74 Advanced Settings Area Expanded in a Decision Table
Just above the Decision Table toolbar, click the Add Test downward pointing arrow.
Select any of the following options according to your requirement as shown in Figure 12-75:
simple test
variable
nested test
not nested test
Use the field controls or Left Value and Right Value icons, and the operator list to create the condition expression.
Figure 12-76 Simple Test Added to a Decision Table
Note:
If a Decision Table already contains test conditions, you can add new test conditions by clicking the downward pointing arrow at the end of an existing condition and selecting the required test form type.You can modify the contents of a Decision Table to create a table that includes a complete set of rules for all cases, or a table that provides the least number of rules for the cases. The split and compact operations enables you to manipulate the contents in a Decision Table.
The split table operation creates a rule for every combination of buckets across the conditions. For example, in a Decision Table with 2 boolean conditions, 2 x 2 = 4 rules are created. In a Decision Table with 20 boolean conditions, 2**20 ~ 1 million rules are created. So, you only use split table when the number of rules created is small enough that filling in the action cells is feasible.
Using Oracle SOA Composer, split can be applied to an entire Decision Table. However, you cannot perform split operation on an individual condition row or cell.
From Oracle SOA Composer, select a ruleset from the Rulesets navigation tab and select the Decision Table that you want to split.
Click the Split Table icon as shown in Figure 12-77.
Using Oracle SOA Composer, you can compact a Decision Table by merging conditions of rules with identical actions. So, compacting a table enables you to remove conditions from a Decision Table. However, using Oracle SOA Composer, you cannot merge two or more condition cells.
From Oracle SOA Composer, select a ruleset from the Rulesets navigation tab and select the Decision Table that you want to compact.
Select the Compact Table icon as shown in Figure 12-78.
For more information on splitting and compacting Decision Tables, see Section 5.3, "Performing Operations on Decision Tables."
In a Decision Table, a "missing" rule is termed as a "gap." A gap in a Decision Table occurs when a rule does not cover some combinations of buckets, one from each condition.
Using Oracle SOA Composer, you can check for missing rules in Decision Tables.
From Oracle SOA Composer, select a ruleset from the Rulesets navigation tab and select the Decision Table in which you want to check for missing rules.
Click the Gap Analysis icon on the Decision Table menu as shown in Figure 12-79.
Figure 12-79 Checking for Missing Rules in a Decision Table
The Gap Analysis window is displayed as shown in Figure 12-80. You can select the rules that need to be added to the Decision Table.
For more information about checking for missing rules, see Section 5.3.5, "How to Perform Decision Table Gap Checking."
Rules in a Decision Table can conflict when they overlap and have different actions. Two rules overlap when at least one of their condition cells has a bucket in common. However, overlap without conflict is common and harmless. For more information about conflicts in Decision Tables, see Section 5.3.1.4, "Understanding Decision Table Conflict Analysis."
Using Oracle SOA Composer, you can find and resolve conflicts in a Decision Table.
To perform conflict resolution in a Decision Table:
From Oracle SOA Composer, select a ruleset from the Rulesets navigation tab and select the Decision Table on which you want to perform the Conflict Resolution.
Ensure that the Show Conflicts icon is selected on the Decision Table toolbar.
Click the Show Advanced Settings icon (double downward pointing arrows) next to the Decision Table name.
Ensure that Conflict Policy is set to Manual in the Advanced Settings area as shown in Figure 12-81. This is the default conflict policy.
Note:
For more information on conflict policies, see Section 5.3.1.4, "Understanding Decision Table Conflict Analysis."Select the Conflict row under Conflict Resolution and then click the rule that has a conflict to display the Conflict Resolution window as shown in Figure 12-82.
Figure 12-82 The Conflict Resolution Window
In the Conflict Resolution window, for each conflicting rule, in the Resolution field select a resolution from the list and click OK as shown in Figure 12-83.
Figure 12-83 Options for Conflict Resolution
For more information about the conflict resolution options in Decision Tables, see Section 5.3.1.4, "Understanding Decision Table Conflict Analysis."
In Oracle SOA Composer, you can turn the rows in a Decision Table to columns by clicking the Switch Rows to Columns icon on the Decision Table toolbar. This enables the rules to be displayed as rows, and conditions, actions, and conflicts to be displayed as the columns.
Switching rows to columns provides ease of navigation when a Decision Table has many rules because you can see all the rules together and you do not need to "page the columns" for viewing the rules.
Figure 12-84 displays a Decision Table before the switch operation.
Figure 12-85 displays the sample Decision Table after switching the rows to columns.
In Oracle SOA Composer, you can use advanced mode rules in a Decision Table just like you can work with advanced mode rules in a ruleset. The Advanced Mode rules options enable you to create, modify, and delete patterns, as well as add, modify, and delete conditions and actions within a pattern. For more information about advanced mode rules, see Section 4.7, "Working with Advanced Mode Rules".
Note:
To add a simple test using the <insert test> link above the Decision Table, see Section 12.8.6, "Defining Tests in a Decision Table."To show and use advanced mode options:
From Oracle SOA Composer, select a ruleset from the Rulesets navigation tab and select the Decision Table on which you want to add more complex rules.
Click the Show Advanced Settings icon (double downward pointing arrows) next to the Decision Table name.
Select Advanced Mode.
Figure 12-86 Advanced Mode Enabled in a Decision Table
The advanced mode options in a Decision Table are similar to the advanced mode options in a ruleset. For more information, see Section 12.6.11.1, "Working with Advanced Mode Options."
In Oracle SOA Composer, you can delete Decision Tables in a ruleset. For more information on working with Decision Tables, see Section 5.1, "Introduction to Working with Decision Tables."
To delete a decision table in a ruleset:
In edit mode, select a ruleset of interest.
In the ruleset area, in the View field from the list, select the Decision Table you want to delete.
Click Delete Decision Table as shown in Figure 12-87.
Figure 12-87 Select the Delete Decision Table Icon
Oracle SOA Composer enables you to define test variables that provide a way to shorten lengthy expressions that occur in rule and decision table conditions and actions. The variable and its value can be represented as an inline business term definition. The test variables are also called inline aliases.
So, instead of writing:
You can write:
In subsequent test conditions, you can use foo
as part of your expressions. The expression can be anything from a simple to a complex expression.
To define a variable, in the IF section of a rule, you need to click the down arrow adjacent to Add Test, and select variable from the list.
Apart from variables, you can also define other test form types, such as simple test, nested tests ((...)
), and not nested tests (not (...)
).
Oracle BPM enables you localize the names of some rules components. Providing a translated version of these aliases enables users to view these aliases based on the local setting of their browser when using the following applications:
Oracle SOA Composer
Oracle Business Process Composer
Oracle Process Workspace
Note:
Locale dictionaries are stored as resource bundles. You must create the resource bundle using Oracle JDeveloper. They must be deployed as part of the SOA composite application.Resource bundles cannot be created using Oracle SOA Composer. However, you can use Oracle SOA Composer to edit the localized strings within a resource bundle.
Oracle SOA Composer enables you to localize the aliases of the following rules components.
Buckets
Bucketsets
Decision Functions
Decision Function Facts
Globals
Links
Rulesets
Rules
Patterns
Using Oracle SOA Composer, in the edit mode, you can add translated versions of the aliases and their descriptions used to identify rules components.
To localize the alias of a rules component:
In Oracle SOA Composer, select the Translations tab. The Translations tab displays a table with multiple columns. By default, there are two columns one displaying the untranslated identifier of the rules component. The other displays the English locale as shown in Figure 12-88.
If you have defined other locales in your application, these also appear as columns in this table. See Section 2.6, "Localizing Oracle Business Rule Resources." for more information.
In the column of the locale you want to edit, double-click in cell corresponding to the alias you want to translate.
Enter the localized text for the alias.
Repeat steps 2 and 3 to localize all the aliases required for the locale.
Note:
Offline editing of locale files is not supported. When a locale is added, the xml file generated does not contain all the keys by default. They are added when a value is added.You can also localize from the editor. To localize from the editor click the Translations icon as shown in Figure 12-89
Translations pop up appears as shown in Figure 12-90. Enter the Alias for the rule components and click OK.
After you verify dictionary modifications, you can commit those changes to the MDS repository.
To commit changes to an Oracle Business Rules dictionary:
Click the Commit menu item.
In the Confirm dialog, click No if you do not want to make the changes in the MDS repository.
In the Confirm dialog, click Yes if you do want to make the changes in the MDS repository.
Remember to update the runtime changes into Rule Editor ADF following the tasks described in Section 4.12, "Importing Runtime Rules Changes From Repository Into JDeveloper"
When you open the dictionary after saving the edit session and deploying the composites, SOA composer opens the last saved edit session. To open the new dictionary click Revert, Clear all session edits and save changes button in the top menu.
Note:
A dictionary with validation errors can be saved, but it can be committed only after correcting the validation issues.When multiple users are editing the same dictionary, Oracle SOA Composer shows a message that the dictionary is being edited by another user and asks for a confirmation. When multiple users work on a single dictionary, only the last commit is persisted.
Oracle SOA Composer enables you to update rules dictionaries at runtime. However, the modifications made to the dictionaries through Oracle SOA Composer are not automatically reflected in Oracle JDeveloper. To synchronize the dictionary updates made in Oracle SOA Composer with the dictionaries available in Oracle JDeveloper, you must select the Export option in Oracle Enterprise Manager Fusion Middleware Control Console. This utility allows you to export the SOA composite application along with the dictionary.
To select the Export option in Fusion Middleware Control Console:
In Fusion Middleware Control Console, select the composite that contains the dictionary to be exported. Figure 12-91 displays the selected composite in Fusion Middleware Control Console.
Click SOA Composite drop-down list on the right panel and select Export as shown in Figure 12-92.
Figure 12-92 Selecting the Export Utility
Select Option 1: Export with all post-deploy changes from the Export Composite page and click Export as shown in Figure 12-93.
Figure 12-93 Exporting All Postdeployment Changes
In Oracle SOA Composer, in the Edit mode, you can validate a dictionary for errors. The dictionary level validation errors are displayed in a Validation Panel in the bottom of Oracle SOA Composer window as shown in Figure 12-94.
Note:
When you open rules in Oracle SOA Composer, the Validation panel remains in the collapsed state. If you click the Validate button on the Oracle SOA Composer toolbar, the Validation Panel is expanded, and it remains in the expanded state during subsequent user interactions.However, if you manually collapse the Validation Panel or drag the panel separator, the working of the automatic collapse and expand cannot be guaranteed.
The Validation Panel lists all the dictionary-level validation errors. When you double-click a row in the Validation Panel, Oracle SOA Composer leads you to the erroneous component. For example, if a Bucket or a Bucketset error is double-clicked in the Validation Panel, Oracle SOA Composer switches to the Bucketsets tab and displays the invalid icon next to the Bucketset name. You can move the mouse cursor over the invalid icon to see the list of error messages for that Bucketset as shown in Figure 12-95.
Figure 12-95 Bucketset Validation Error Messages
When the Bucketset Editor window is displayed, the invalid fields are highlighted in the editor, and a pop-up containing the error messages are displayed, as shown in Figure 12-96.
Figure 12-96 Highlighted Error Entries in Bucketset Editor
When you double-click an error pertaining to a Decision Table, the UI switches to the Decision Table UI and displays the error messages when you move the mouse cursor on the invalid icon as shown in Figure 12-97.
Figure 12-97 Accessing the Erroneous Component
Similarly, in the Validation Panel, if you double-click an error pertaining to a rule in a ruleset, the UI switches to the ruleset to which the rule belongs and highlights the erring fields of the rule. In addition, all the errors pertaining to the rule are displayed in a pop-up as shown in Figure 12-98.
The Validation Panel does not get updated automatically to display any new validation errors that may be generated due to any modification to the dictionary components.
For example, when a new rule is added with some errors, the Validation Panel is not updated automatically. You need to click the Validate button on the Oracle SOA Composer menu to update the Validation Panel with the new error entry, as shown in Figure 12-99.
When a dictionary is open, you can obtain dictionary and composite details from the Info dialog.
To obtain dictionary information:
With an open document, you can obtain the document type, composite details, and document path by clicking Info. This displays the Oracle SOA Composer open file information, as shown in Figure 12-100.
Figure 12-100 Using Info Dialog to Obtain the Document Path for an Open Dictionary
Using Oracle SOA Composer, you can view and edit tasks that may be or may not be associated to Approval Management Extensions (AMX) rules. AMX enables you to define complex task routing slips for human workflow by taking into account business documents and associated rules to determine the approval hierarchy for a work item. Additionally, AMX lets you define multi-stage approvals with associated list builders based on supervisor or position hierarchies. At design time, you can define the approval task in the Human Task Editor of Oracle JDeveloper, and associate the task with a BPEL process. For more information about approval management and tasks, see "Using Approval Management" in Oracle Fusion Middleware Modeling and Implementation Guide for Oracle Business Process Management.
In Oracle SOA Composer, the Task Editor is embedded as a task flow so that you can view and perform all the task metadata lifecycle operations.
In Oracle SOA Composer, you can open a task or an AMX rules metadata with the Open menu.
To open a task or an AMX rule using the Open menu:
In Oracle SOA Composer, from the Open menu, select Open Task as shown in Figure 12-101. Oracle SOA Composer connects to the MDS and displays the Select a Task to open dialog box. This dialog box lists the available composite applications that contain tasks and AMX rules.
Note:
You can differentiate between traditional rules and AMX rules depends on the naming convention.For example, if a composite has the following artifacts:
<AMX task name>.tsk
<AMX rule name>Rules.rules
In this case, the Rules.rules file is an AMX rules file associated with an AMX task, and so, is displayed as a part of an AMX task in the list of Select a Task to open, and not as a part of an ordinary Oracle Business Rules listing.
In the Select a Task to open dialog box, to open a task or AMX rule, select an entry in the table and click Open, or double-click an item as shown in Figure 12-102.
If the composite that you have selected only has a task and no associated AMX rule or ruleset, then the task window is displayed as shown in Figure 12-103.
Figure 12-103 Oracle SOA Composer with Only Task Displayed
If the composite contains a task and an associated AMX rule or ruleset, then Oracle SOA Composer displays both the task and the rule or ruleset in a tabbed window as shown in Figure 12-104.
Figure 12-104 Oracle SOA Composer with Both Task and AMX Rule
Task Configuration enables business users and administrators to review the rules that were configured automatically by the workflow designer. These predefined rules can be changed for a specific customer based on the customer's applicable corporate policies.
In Oracle SOA Composer, Task Configuration enables you to edit the event-driven (only tasks) and data-driven rules (tasks with an associated AMX rules) associated with an approval flow at runtime.
To configure event-driven settings:
Log on to Oracle SOA Composer and open the required task.
Click Edit on the Oracle SOA Composer menu bar to open the selected task for editing as shown in Figure 12-105.
Make the relevant edits and click Save as shown in Figure 12-106.
You can configure the following options and settings:
Task aggregation
Error notification
Assignment and routing policy
Expiration and escalation policy
Notification settings
Task access settings
Setting Approval Aggregation Requirements
Task aggregation requirements can be any of the following:
None
Once per task
Once per stage
You can specify the user and group names that need to be notified in case of an error in the task. You need to click the On Error Notify search icon to display the Configure Error Assignees dialog box where you can specify the user or group names as shown in Figure 12-107.
Setting Assignment and Routing Policy
You can set the assignment and routing policy by using the options available in Oracle SOA Composer. Figure 12-111 shows the available options for setting assignment and routing policy.
Figure 12-108 Setting Assignment and Routing Policy
For more information about the assignment and routing options available in event-driven configuration, see "Routing Policy Method" in Oracle Fusion Middleware Developer's Guide for Oracle SOA Suite.
Setting Expiration and Escalation Policy
You can set the expiration and escalation policy for the task by using the available items in the Expiration and Escalation Policy list. The available list items are:
Never Expire
Expire After
Escalate After
Renew After
Figure 12-109 displays the list of options for setting the expiration and escalation policy.
Figure 12-109 Setting Expiration and Escalation Policy
Configuring Notification Settings
You can configure notification settings for a task by using the options available in the Notification Settings section of Oracle SOA Composer.
Figure 12-110 displays the different options available to configure notification settings for a task.
Figure 12-110 Specifying Notification Settings
Configuring Task Access Settings
You can set access-rule settings to control the actions a user can perform. You can also specify content and action permissions based on the logical role of a user, such as creator (initiator), owner, assignee, and reviewers.
In Oracle SOA Composer, you can set access settings by using the options available under Task Access as shown in Figure 12-111.
Figure 12-111 Specifying Task Access Settings
For more information on configuring task access, see "How to Define Security Access Rules" in Oracle Fusion Middleware Modeling and Implementation Guide for Oracle Business Process Management.
To configure data-driven settings:
Log on to Oracle SOA Composer and open the required task.
Click Edit on the Oracle SOA Composer menu bar to open the selected AMX rule-associated task for editing as shown in Figure 12-112.
Figure 12-112 Opening an AMX Rule for Editing
Make the relevant edits and click Save as shown in Figure 12-113.
Figure 12-113 Saving AMX Rule Configuration
You can perform the following actions:
Adding, updating, and deleting a rule
Changing rule assertions (which depend on the type of list builder for which the rule has been configured)
Adding a variable
For more information about editing data-driven settings, see "How to Edit Data-Driven Settings" in Oracle Fusion Middleware User's Guide for Oracle Business Process Management.