|
Oracle Fusion Middleware Java API Reference for Oracle Business Rules 11g Release 1 (11.1.1.5.0) E10663-05 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.rules.sdk2.decisionpoint.DecisionPointInstance
public class DecisionPointInstance
DecisionPoint is a helper class which manages the server-side portions of implementing Decision Points (calling OBR Decision Functions) from developers' Java code.
Method Summary | |
---|---|
DecisionPointInstance |
addInput(java.lang.Object input) Adds a fact object to be asserted as the Decision Point is run. |
DecisionPointInstance |
addResult(java.lang.String name, java.lang.Object value) addResult spools a named output value for return to the caller of the Decision Function. |
DecisionPointInstance |
addResults(java.util.List<DecisionPoint.NamedValue> toadd) addResults is used to spool a list of output values, guaranteeing that the resultant values will be spooled together regardless of what other Action Type instances may also be spooling values. |
void |
assertViewObjectsForWS() Assert a set of ViewObjects from a SimpleDecisionPointInput |
void |
assertViewObjectsForWS(java.util.List<ViewObjectRef> lvor) Assert a set of ViewObjects from a list of ViewObjectRef |
void |
cleanup() If invoke is called with the parameter false, then this method must be called before the decision point instance reference goes out of scope, otherwise a memory leak will occur. |
void |
clearInputs() Clear the fact objects input list |
DecisionTrace |
decisionTrace() |
int |
getActivationID() Get the activation id for the ADF-BC objects used in this decision point instance. |
DecisionPoint |
getDecisionPoint() Return the template DecisionPoint which created this DecisionPointInstance |
RuleDictionary |
getDictionary() set dictionary to use for trace analysis |
java.util.List<java.lang.Object> |
getInputs() Get the list of facts to be input to the decision function. |
java.util.Map<java.lang.String,java.lang.Object> |
getProperties() Return the map of properties local to this DecisionPointInstance. |
java.lang.Object |
getProperty(java.lang.String name) Return a property value of the given name. |
java.util.List<DecisionPoint.NamedValue> |
getResults() Get the NamedValue results of executing this decision point |
oracle.jbo.server.DBTransactionImpl2 |
getTransaction() Returns the transaction object to be used by this decision point instance. |
oracle.jbo.ViewObject |
getViewObject() Return the view object to use for this DecisionPointInstance |
ViewObjectReference |
getViewObjectReference() Return the view object reference to use for this DecisionPointInstance |
java.util.List<java.lang.Object> |
invoke() Executes the decision function, marshalling its parameters to the rules engine and returning any values spooled back by the ActionType instances. |
java.util.List<java.lang.Object> |
invoke(boolean ret) Executes the desired Decision Function, marshalling its parameters to the OBR rules engine and returning any values spooled back by the ActionType instances. |
boolean |
isAutoCommit() |
RuleSession |
ruleSession() Returns the RuleSession instance that was or will be used by this DecisionPointInstance. |
DecisionPointInstance |
setActivationID(java.lang.Integer id) Set the activation id for the ADF-BC objects used in this decision point instance. |
void |
setAutoCommit(boolean m_autoCommit) |
static void |
setCurrentDate(RuleSession rs, java.util.Calendar cal) Set the rule set current date to be used by this decision point |
void |
setDictionary(RuleDictionary dict) set dictionary to use for trace analysis |
static void |
setEffectiveDate(RuleSession rs, java.util.Calendar cal) Set the rule set effective date to be used by this decision point |
DecisionPointInstance |
setInputs(java.util.List<java.lang.Object> input) |
DecisionPointInstance |
setProperty(java.lang.String name, java.lang.Object value) Set a property value only in this DecisionPointInstance. |
DecisionPointInstance |
setRuleSession(RuleSession session) Set the RuleSession to use explicitly. |
DecisionPointInstance |
setTransaction(java.sql.Connection connection) Bootstraps and sets a transaction object from given a database Connection. |
DecisionPointInstance |
setTransaction(oracle.jbo.server.DBTransactionImpl2 newtransaction) Sets the transaction object to be used by this decision point instance. |
DecisionPointInstance |
setTransaction(java.lang.String dataSrcName) Bootstraps and sets a transaction object given a J2EE data source name. |
DecisionPointInstance |
setViewObject(oracle.jbo.ViewObject viewObject) Adds a view object to be asserted as the Decision Point is run. |
DecisionPointInstance |
setViewObjectReference(ViewObjectReference viewObjectRef) Sets a view object reference to be used to load a view object, which can then load datbase rows. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public DecisionPointInstance addInput(java.lang.Object input)
input
-public java.util.List<java.lang.Object> getInputs()
public DecisionPointInstance setInputs(java.util.List<java.lang.Object> input)
public void clearInputs()
public DecisionPointInstance setViewObject(oracle.jbo.ViewObject viewObject)
viewObject
- the ViewObject to use to load rowspublic oracle.jbo.ViewObject getViewObject()
public DecisionPointInstance setViewObjectReference(ViewObjectReference viewObjectRef)
viewObjectRef
- the ViewObjectReference to use to load a ViewObjectpublic ViewObjectReference getViewObjectReference()
public oracle.jbo.server.DBTransactionImpl2 getTransaction()
public DecisionPointInstance setTransaction(oracle.jbo.server.DBTransactionImpl2 newtransaction)
newtransaction
- the transaction to usepublic DecisionPointInstance setTransaction(java.sql.Connection connection) throws SDKException
connection
- the Connection instance to useSDKException
- if a NamingException occurs when trying to create a Transaction object from this Connectionpublic DecisionPointInstance setTransaction(java.lang.String dataSrcName) throws SDKException
dataSrcName
- name of the data sourceSDKException
- if the data srouce cannot be found or an exception coccurs when trying to create new transaction from the decision pointpublic DecisionPoint getDecisionPoint()
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
public java.lang.Object getProperty(java.lang.String name)
name
- the name of the property to retrivepublic DecisionPointInstance setProperty(java.lang.String name, java.lang.Object value)
name
- the name of a property to setvalue
- the value of the property to setpublic DecisionPointInstance setRuleSession(RuleSession session) throws SDKException, RLException
session
- the rule session to useSDKException
- if there is an error generating the RL for the rule sessionRLException
- if the rulesession throws an RLExceptionpublic RuleSession ruleSession() throws SDKException
SDKException
public void setDictionary(RuleDictionary dict)
public RuleDictionary getDictionary()
public void cleanup() throws SDKException
SDKException
public int getActivationID()
public DecisionPointInstance setActivationID(java.lang.Integer id)
id
- the activation idpublic DecisionTrace decisionTrace() throws SDKException
SDKException
public java.util.List<java.lang.Object> invoke() throws RLException, SDKException
RLException
- if the rule session throws an RLExceptionSDKException
- if there is an error accessing the dictionary or with specified parameterspublic java.util.List<java.lang.Object> invoke(boolean ret) throws RLException, SDKException
ret
- if true, the rule session is returned to the pool after execution. If false, the rule session used by execution is not returned to the rule session pool. If method cleanup() is not subsequently called, this can lead to a memory leak.RLException
- if the rule session throws an RLExceptionSDKException
- if there is an error accessing the dictionary or with specified parameterspublic DecisionPointInstance addResult(java.lang.String name, java.lang.Object value)
name
- The name of the outputvalue
- The value of the outputpublic DecisionPointInstance addResults(java.util.List<DecisionPoint.NamedValue> toadd)
toadd
- A list of NamedValue objects to add to this instancepublic java.util.List<DecisionPoint.NamedValue> getResults()
public void assertViewObjectsForWS(java.util.List<ViewObjectRef> lvor) throws RLException, SDKException
lvor
- list containing the view object refsRLException
- if the rule session throws an RLExceptionSDKException
- if there is an error accessing the dictionary or with specified parameterspublic void assertViewObjectsForWS() throws RLException, SDKException
RLException
- if the rule session throws an RLExceptionSDKException
- if there is an error accessing the dictionary or with specified parameterspublic static void setEffectiveDate(RuleSession rs, java.util.Calendar cal) throws RLException
rs
- the rulesession in which to set the effective datecal
- the date representation to setRLException
public static void setCurrentDate(RuleSession rs, java.util.Calendar cal) throws RLException
rs
- the rulesession in which to set the current datecal
- the date representation to setRLException
public void setAutoCommit(boolean m_autoCommit)
public boolean isAutoCommit()
|
Oracle Fusion Middleware Java API Reference for Oracle Business Rules 11g Release 1 (11.1.1.5.0) E10663-05 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |