Rule Execution Server API

ilog.rules.factory
Class IlrTaskIfNodeStatement

java.lang.Object
  extended by ilog.rules.factory.IlrBaseStatement
      extended by ilog.rules.factory.IlrFlowNodeStatement
          extended by ilog.rules.factory.IlrControlNodeStatement
              extended by ilog.rules.factory.IlrSplitNodeStatement
                  extended by ilog.rules.factory.IlrTaskIfNodeStatement
All Implemented Interfaces:
ilog.rules.factory.IlrSourceElement, IlrStatement, Serializable

public final class IlrTaskIfNodeStatement
extends IlrSplitNodeStatement

Represents the class of an if node in a ruleflow.

Warning: Serialized objects of this class will not be compatible with future releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of IBM Decision Server.

See Also:
IlrTaskFactory, IlrSplitNodeStatement, IlrTaskJoinNodeStatement, IlrControlNodeStatement, IlrFlowNodeStatement, Serialized Form

Constructor Summary
IlrTaskIfNodeStatement(String name)
          Builds an if node for a ruleflow.
IlrTaskIfNodeStatement(String name, IlrFlowNodeStatement previousNode)
          Builds an if node for a rule flow and connects the created node to the passed node.
 
Method Summary
 IlrFlowNodeStatement getFalseNode()
          Returns the node connected to the if node that will be executed if the test returns false.
 IlrTest getTest()
          Returns the test linked to the if node.
 IlrFlowNodeStatement getTrueNode()
          Returns the node connected to the if node that will be executed if the test returns true.
 void setFalseNode(IlrFlowNodeStatement node)
          Sets the node that will be executed in case the test returns false.
 void setNextNode(IlrFlowNodeStatement node)
          This method should never be used; it throws an UnsupportedOperationException exception.
 void setTest(IlrTest test)
          Sets the test linked to the if node.
 void setTrueNode(IlrFlowNodeStatement node)
          Sets the node that will be executed in case the test returns true.
 
Methods inherited from class ilog.rules.factory.IlrSplitNodeStatement
close
 
Methods inherited from class ilog.rules.factory.IlrFlowNodeStatement
exploreStatement, getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlrTaskIfNodeStatement

public IlrTaskIfNodeStatement(String name)
Builds an if node for a ruleflow. It is useful to set a label if the node is the target of a goto statement.

Parameters:
name - The label The label used to target the node in a goto statement.

IlrTaskIfNodeStatement

public IlrTaskIfNodeStatement(String name,
                              IlrFlowNodeStatement previousNode)
Builds an if node for a rule flow and connects the created node to the passed node. This constructor should not be called to connect the new node to an IlrTaskIfNodeStatement nor to an IlrTaskSwitchNodeStatement. Instead, you should use IlrTaskIfNodeStatement.setTrueNode, IlrTaskIfNodeStatement.setFalseNode, IlrTaskSwitchNodeStatement.setCaseNode, IlrTaskSwitchNodeStatement.setDefaultNode. It is useful to set a label if the node is the target of a goto statement.

Parameters:
name - The label used to target the node in a goto statement.
previousNode - The node that is before the new node in the ruleflow. The two nodes are connected by calling the method IlrFlowNodeStatement.setNextNode.
Method Detail

setTest

public void setTest(IlrTest test)
Sets the test linked to the if node.

Parameters:
test - The test executed by the node.

getTest

public IlrTest getTest()
Returns the test linked to the if node.

Returns:
the test executed by the node.

setNextNode

public void setNextNode(IlrFlowNodeStatement node)
This method should never be used; it throws an UnsupportedOperationException exception. To link nodes to the if use setTrueNode or setFalseNode instead.

See Also:
setTrueNode(ilog.rules.factory.IlrFlowNodeStatement), setFalseNode(ilog.rules.factory.IlrFlowNodeStatement)

setTrueNode

public void setTrueNode(IlrFlowNodeStatement node)
Sets the node that will be executed in case the test returns true.

Parameters:
node - The node connected to the if node that will be executed in case the if node's test returns true.
See Also:
setFalseNode(ilog.rules.factory.IlrFlowNodeStatement)

getTrueNode

public IlrFlowNodeStatement getTrueNode()
Returns the node connected to the if node that will be executed if the test returns true.

Returns:
the node connected to the if node that will be executed if the test returns true.

setFalseNode

public void setFalseNode(IlrFlowNodeStatement node)
Sets the node that will be executed in case the test returns false.

Parameters:
node - The node connected to the if node that will be executed in case the if node's test returns false.
See Also:
setTrueNode(ilog.rules.factory.IlrFlowNodeStatement)

getFalseNode

public IlrFlowNodeStatement getFalseNode()
Returns the node connected to the if node that will be executed if the test returns false.

Returns:
the node connected to the if node that will be executed if the test returns false.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013