|
Oracle Fusion Middleware Java API Reference for Oracle Business Rules 11g Release 1 (11.1.1.4.0) E10663-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.rules.sdk2.dictionary.DictionaryObject
oracle.rules.sdk2.dictionary.DictionaryComponent
oracle.rules.sdk2.ruleset.RuleComponent
oracle.rules.sdk2.ruleset.UnnamedRuleComponent
oracle.rules.sdk2.ruleset.Action
public class Action
An action, such as assert, assign, call, or retract.
When using this interface, selecting the Form property first will fix the options for target, which in turn will fix the number of expressions and the option list for each. The expressions cannot be added to the table; this is done automatically when the form or target is selected.
The interface can be used to build client side scripts, server interactions or some combination of both.
Form | Block | Var | Target | ||
---|---|---|---|---|---|
FORM_RL | -- | -- | raw | RL | |
FORM_CALL | -- | -- | Method | or | |
FORM_ASSERT | -- | -- | in- | ||
FORM_ASSERT_TREE | -- | -- | in- | ||
FORM_ASSERT_NEW | -- | -- | |||
FORM_RETRACT | -- | -- | FactType | ||
FORM_ASSIGN | -- | -- | |||
FORM_ASSIGN_NEW | -- | yes | FactType | or | |
FORM_EXPRESSION | -- | -- | any | valid | |
FORM_MODIFY | -- | -- | FactType | ||
FORM_SYNCHRONIZED | yes | -- | FactType | ||
FORM_IF | yes | -- | -- | ||
FORM_ELSE_IF | yes | -- | -- | ||
FORM_ELSE | yes | -- | -- | ||
FORM_FOR | yes | yes | FactType | ||
FORM_WHILE | yes | -- | -- | ||
FORM_RETURN | -- | -- | -- | ||
FORM_THROW | -- | -- | -- | ||
FORM_TRY | yes | -- | -- | ||
FORM_CATCH | yes | yes | |||
FORM_FINALLY | yes | -- | -- |
Form | Expression Table | Target or ET |
---|---|---|
FORM_RL | -- | -- |
FORM_CALL | n entry: parameters to m/f | both |
FORM_ASSERT | single term expression Object | 1 entry: expression ret Object only one |
FORM_ASSERT_TREE | single term expression Object | 1 entry: expression ret Object only one |
FORM_ASSERT_NEW | n entry: bean properties | both |
FORM_RETRACT | 1 entry: expression ret Object | only one |
FORM_ASSIGN | 1 entry: value to assign | both |
FORM_ASSIGN_NEW | 1 entry: expression | both |
FORM_MODIFY | n entry: properties of target | both |
FORM_SYNCHRONIZED | 1 entry: Object expression | only one |
FORM_IF | 1 entry: Boolean expression | -- |
FORM_ELSE_IF | 1 entry: Boolean expression | -- |
FORM_ELSE | -- | -- |
FORM_FOR | 1 entry: Collection | both |
FORM_WHILE | 1 entry: Boolean expression | -- |
FORM_RETURN | Rule: empty | |
Function: 1 entry of return type | -- | |
FORM_THROW | 1 entry Throwable | -- |
FORM_TRY | -- | -- |
FORM_CATCH | -- | -- |
FORM_FINALLY | -- | -- |
Actions may be executed conditionally and in blocks by using an Action form that provides a nested ActionTable. Actions listed in a nested ActionTable are only executed if the conditions in the parent action are satisfied, or a preceeding Action conditional dropped through to the nested Action Table. Tests that apply property of an ActionTable should not be confused with the Test property of a Rule's Pattern. A Pattern test is used to match and select FACTS in working memory. An Action Test does not refer to facts; it only contains expressions consisting of variable references and literals. For Actions that complete the action portion of a rule, a variable may be an instance reference to FACT selected by the rule's Pattern. For Actions used in a Function body, no FACT instances are available.
For example, an If action (FORM_IF) is required to have a nested block. The nested block contains any statements that in within the scope of the if test FORM_IF ActionTable contains the statment belonging to the if condition expression
The for action supports both for (i = 0; i < 10; i = i + 1) and for (Foo f : listFoo). The first form is deprecated. The UI should support the second form as follows: for (<type> <var> : <collection>) { The type is bound to Action.target, the var is bound to Action.variable, and collection is bound to Action.expression(0).value
Nested Class Summary |
---|
Nested classes/interfaces inherited from class oracle.rules.sdk2.dictionary.DictionaryComponent |
---|
DictionaryComponent.Diff, DictionaryComponent.DiffType |
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary | |
---|---|
static java.lang.String |
FORM_ASSERT |
static java.lang.String |
FORM_ASSERT_NEW |
static java.lang.String |
FORM_ASSERT_TREE |
static java.lang.String |
FORM_ASSIGN |
static java.lang.String |
FORM_ASSIGN_NEW |
static java.lang.String |
FORM_CALL |
static java.lang.String |
FORM_CATCH |
static java.lang.String |
FORM_DEFAULT |
static java.lang.String |
FORM_ELSE |
static java.lang.String |
FORM_ELSE_IF |
static java.lang.String |
FORM_EXPRESSION |
static java.lang.String |
FORM_FINALLY |
static java.lang.String |
FORM_FOR |
static java.lang.String |
FORM_IF |
static java.lang.String |
FORM_MODIFY |
static java.lang.String |
FORM_RETRACT |
static java.lang.String |
FORM_RETURN |
static java.lang.String |
FORM_RL |
static java.lang.String |
FORM_SYNCHRONIZED |
static java.lang.String |
FORM_THROW |
static java.lang.String |
FORM_TRY |
static java.lang.String |
FORM_WHILE |
Method Summary | |
---|---|
void |
desurround() |
ActionTable |
getActionTable() |
TableProperty<Action> |
getActionTableProperty() Get ActionTable Property. |
java.util.List<DOID> |
getAEReferences() Get DOIDs referenced by this Object and descendants. |
java.lang.String |
getAlias() Even though we extend UnnamedComponent, we need the variable name to translate expressions from persistent format (`ID`) to user format (name) |
java.util.List<DOID> |
getAllReferences() Get all DOIDs referenced by this Object and descendants. |
Expression |
getExpression(int i) Shorthand for getExpressionTable.getExpression(i) |
Expression |
getExpressionByParameterAlias(java.lang.String parameterAlias) Get Expression from this action's expression table by parameter alias. |
Expression |
getExpressionByParameterName(java.lang.String parameterName) Get Expression from this action's expression table by parameter name. |
ExpressionTable |
getExpressionTable() |
TableProperty<Expression> |
getExpressionTableProperty() Get ExpressionTable Property. |
DOID |
getFactTypeID() |
java.lang.String |
getForm() Get What kind of action. |
java.lang.String[] |
getFormOptions() |
TranslatedProperty |
getFormProperty() Get Form Property. |
int |
getFormSelected() |
java.util.List<DOID> |
getReferences() Get all DOIDs referenced by this Component and IDTable properties, but does not include contained dictonary components. |
static java.lang.String[] |
getSurroundingFormOptions(java.util.List<Action> actions) |
java.lang.String |
getTarget() |
DOID |
getTargetID() |
java.lang.String[] |
getTargetOptions() |
SettableProperty<java.lang.String> |
getTargetProperty() Get Target Property. |
int |
getTargetSelected() |
java.lang.String |
getVariable() |
SettableProperty<java.lang.String> |
getVariableProperty() Get Variable Property. |
boolean |
hasNestedActions() can this action's actionTable contain actions? |
boolean |
hasTarget() Does this form of action have a target? |
boolean |
isValueRequired(Expression e) |
void |
setForm(java.lang.String form) Set What kind of action. |
void |
setTarget(java.lang.String target) |
void |
setVariable(java.lang.String v) |
Action |
surround(java.lang.String form) |
static Action |
surround(java.lang.String form, java.util.List<Action> actions) |
Methods inherited from class oracle.rules.sdk2.ruleset.UnnamedRuleComponent |
---|
init, isAliasDistinct, isNameDistinct |
Methods inherited from class oracle.rules.sdk2.ruleset.RuleComponent |
---|
get, getParent, getParentTable, parentAction, parentComponent, parentFunction, parentPattern, parentRule, parentRuleCommon, parentRuleSheet, parentVariable, RHSRuleVariables |
Methods inherited from class oracle.rules.sdk2.dictionary.DictionaryComponent |
---|
clear, containsKey, containsValue, entrySet, get, getAlias, getAliasProperty, getCustom, getDependents, getDescription, getDescriptionProperty, getDiff, getDiffProperties, getDiffs, getFullyQualifiedAlias, getFullyQualifiedName, getName, getNameProperty, getNext, getObjectPath, getOptions, getPrevious, getProperties, getProperty, getSelected, hasDiff, isEmpty, isFullyQualifiedName, keySet, put, putAll, remove, setAlias, setCustom, setDescription, setName, size, validate, validate, values |
Methods inherited from class oracle.rules.sdk2.dictionary.DictionaryObject |
---|
equals, exists, getCombinedDataModel, getContainedIDs, getContainedIDs, getDataModel, getDictionary, getID, getIndent, getLevel, getObjectType, getParentByClass, getParentComponent, getParentComponentTable, getParentObject, getRuleSet, getState, getWarnings, hashCode, isModified, validate |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.rules.sdk2.ruleset.ScopedVariable |
---|
getID, getRLName, isAssignable, setRLName, setRLName |
Methods inherited from interface oracle.rules.sdk2.dictionary.UnnamedComponent |
---|
getName, getPropertyNames, setAlias, setName |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Field Detail |
---|
public static final java.lang.String FORM_DEFAULT
public static final java.lang.String FORM_ASSERT
public static final java.lang.String FORM_ASSERT_TREE
public static final java.lang.String FORM_ASSERT_NEW
public static final java.lang.String FORM_ASSIGN
public static final java.lang.String FORM_CALL
public static final java.lang.String FORM_RETRACT
public static final java.lang.String FORM_RL
public static final java.lang.String FORM_ASSIGN_NEW
public static final java.lang.String FORM_EXPRESSION
public static final java.lang.String FORM_IF
public static final java.lang.String FORM_ELSE
public static final java.lang.String FORM_ELSE_IF
public static final java.lang.String FORM_THROW
public static final java.lang.String FORM_CATCH
public static final java.lang.String FORM_TRY
public static final java.lang.String FORM_FINALLY
public static final java.lang.String FORM_FOR
public static final java.lang.String FORM_MODIFY
public static final java.lang.String FORM_WHILE
public static final java.lang.String FORM_RETURN
public static final java.lang.String FORM_SYNCHRONIZED
Method Detail |
---|
public void desurround()
public Action surround(java.lang.String form)
public static Action surround(java.lang.String form, java.util.List<Action> actions)
public static java.lang.String[] getSurroundingFormOptions(java.util.List<Action> actions)
public boolean isValueRequired(Expression e)
public boolean hasNestedActions()
public Expression getExpression(int i)
i
- ordinal of SimpleTest to retrieve from SimpleTestTablejava.lang.IndexOutOfBoundsException
public Expression getExpressionByParameterName(java.lang.String parameterName)
parameterName
- name of parameterpublic Expression getExpressionByParameterAlias(java.lang.String parameterAlias)
parameterAlias
- alias of parameterpublic TranslatedProperty getFormProperty()
public java.lang.String getForm()
see FORM_ above
public void setForm(java.lang.String form)
see FORM_ above
public java.lang.String[] getFormOptions()
public int getFormSelected()
public SettableProperty<java.lang.String> getTargetProperty()
public java.lang.String getTarget()
public void setTarget(java.lang.String target)
public java.lang.String[] getTargetOptions()
public int getTargetSelected()
public TableProperty<Expression> getExpressionTableProperty()
public ExpressionTable getExpressionTable()
public TableProperty<Action> getActionTableProperty()
public ActionTable getActionTable()
public SettableProperty<java.lang.String> getVariableProperty()
public java.lang.String getVariable()
public void setVariable(java.lang.String v)
public java.lang.String getAlias()
getAlias
in interface UnnamedComponent
getAlias
in interface ScopedVariable
getAlias
in class DictionaryComponent
public DOID getFactTypeID()
getFactTypeID
in interface ScopedVariable
public DOID getTargetID()
public boolean hasTarget()
public java.util.List<DOID> getReferences()
DictionaryObject
getReferences
in class DictionaryComponent
public java.util.List<DOID> getAEReferences()
DictionaryObject
getAEReferences
in class DictionaryComponent
public java.util.List<DOID> getAllReferences()
DictionaryObject
getAllReferences
in class DictionaryComponent
|
Oracle Fusion Middleware Java API Reference for Oracle Business Rules 11g Release 1 (11.1.1.4.0) E10663-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |