站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 4.0.0.11754MR2 API 英文版文档

ISplit (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档


org.drools.ruleflow.core
Interface ISplit

All Superinterfaces:
INode, Serializable
All Known Implementing Classes:
Split

public interface ISplit
extends INode

Represents a split node in a RuleFlow. A split is a special kind of node with one incoming connection and multiple outgoing connections. The type of split decides which of the outgoing connections will be triggered when the incoming connection has been triggered.

Author:
Kris Verlaenen

Field Summary
static int TYPE_AND
          All outgoing connections of a split of this type are triggered when its incoming connection has been triggered.
static int TYPE_OR
          One or multiple outgoing connections of a split of this type are triggered when its incoming connection has been triggered.
static int TYPE_UNDEFINED
           
static int TYPE_XOR
          Exactly one outgoing connection of a split of this type is triggered when its incoming connection has been triggered.
 
Method Summary
 IConstraint getConstraint(IConnection connection)
          Returns the corresponding constraint of the given outgoing connection
 Map getConstraints()
          Returns the constraints of the split.
 IConnection getFrom()
          Convenience method for returning the incoming connection of the split.
 int getType()
          Returns the type of the split.
 void setConstraint(IConnection connection, IConstraint constraint)
          Method for setting a constraint corresponding to the given outgoing connection
 void setType(int type)
          Sets the type of the split.
 
Methods inherited from interface org.drools.ruleflow.core.INode
getId, getIncomingConnections, getName, getOutgoingConnections, setId, setName
 

Field Detail

TYPE_UNDEFINED

static final int TYPE_UNDEFINED
See Also:
Constant Field Values

TYPE_AND

static final int TYPE_AND
All outgoing connections of a split of this type are triggered when its incoming connection has been triggered. A split of this type should have no constraints linked to any of its outgoing connections.

See Also:
Constant Field Values

TYPE_XOR

static final int TYPE_XOR
Exactly one outgoing connection of a split of this type is triggered when its incoming connection has been triggered. Which connection is based on the constraints associated with each of the connections: the connection with the highest priority whose constraint is satisfied is triggered.

See Also:
Constant Field Values

TYPE_OR

static final int TYPE_OR
One or multiple outgoing connections of a split of this type are triggered when its incoming connection has been triggered. Which connections is based on the constraints associated with each of the connections: all connections whose constraint is satisfied are triggered.

See Also:
Constant Field Values
Method Detail

setType

void setType(int type)
Sets the type of the split.

Parameters:
type - The type of the split
Throws:
IllegalArgumentException - if type is null

getType

int getType()
Returns the type of the split.

Returns:
the type of the split.

getConstraint

IConstraint getConstraint(IConnection connection)
Returns the corresponding constraint of the given outgoing connection

Parameters:
connection - the outgoing connection
Returns:
the corresponding constraint of the given outgoing connection
Throws:
IllegalArgumentException - if connection is not a valid outgoing connection for this split
UnsupportedOperationException - if this method is called on a split with split type of something else than XOR or OR

setConstraint

void setConstraint(IConnection connection,
                   IConstraint constraint)
Method for setting a constraint corresponding to the given outgoing connection

Parameters:
connection - the outgoing connection
constraint - the constraint
Throws:
IllegalArgumentException - if connection is not a valid outgoing connection for this split
UnsupportedOperationException - if the split type is something else than XOR or OR

getConstraints

Map getConstraints()
Returns the constraints of the split.

Returns:
a map containing for each connection the constraint associated with that connection, or null if no constraint has been specified yet for that connection
Throws:
UnsupportedOperationException - if this method is called on a split with split type of something else than XOR or OR

getFrom

IConnection getFrom()
Convenience method for returning the incoming connection of the split.

Returns:
the incoming connection ot the split.


Copyright © 2001-2007 JBoss Inc.. All Rights Reserved.