Package ilog.rules.teamserver.model
See: Description
-
Interface Summary Interface Description ActivityLockingFacility Provides change activity locking facilities.IlrBaselineManagementFacility Baseline management services for a Decision Center session.IlrDeploymentFacility Deployment services for a Decision Center session, allowing to generate and deploy rulesets and RuleApps.IlrElementDetails Details of a Decision Center element.IlrElementHandle Handle on an element in Decision Center.IlrElementSummary Summary of a Decision Center element.IlrIsUserInRoleCallback A callback with a single method to determine the roles of the current user.IlrLockingFacility Locking services provided by a Decision Center session.IlrModelConstants Decision Center constants.IlrQueryableElement Describes the type of objects that are inserted in the working memory of the rule engine for executing all query actions and conditions that have no SQL equivalent.IlrSearchCriteria IlrSearchCriteria
is the base interface for all classes that specify search criteria to pass to theIlrSession
findElements
search methods.IlrSession Allows you to connect a registered user to Decision Center.IlrSessionCallback Root interface for callbacks to be called by IlrSession implementations.IlrSessionController IlrSessionController
is the base interface for all classes that define security settings and interactive behavior for Decision Center.IlrSessionFactory A static object used to connect a registered user to Decision Center and get a correspondingIlrSession
instance.IlrTestingFacility Testing services for a Decision Center session, allowing execution and generation of a test suite or simulation archive.SessionListener Defines an object which listens for session events. -
Class Summary Class Description BranchHelper BranchHelper
handles branch specific operations.Change Description of a change on an element between two branches.CommitEvent Used to notify interested parties that an object has been committed in Decision Center.DeleteEvent Used to notify interested parties that an object has been deleted in Decision Center.IlrActivityTestingSearchCriteria IlrArchiveOutput Result object returned when generating a ruleset or RuleApp archive.IlrBusinessVersion Version of a Decision Center.IlrCommitableObject Holds an element to commit in the database along with its details and/or a list of its contained elements to add or delete during the commit.IlrDefaultIsUserInRoleCallback Default implementation of IlrIsUserInRoleCallback.IlrDefaultSearchCriteria IlrDefaultSearchCriteria
is the default implementation ofIlrSearchCriteria
.IlrDefaultSessionController IlrDefaultSessionController
is the default session controller implementation used by Decision Center.IlrElementError A Decision Center error created when generating a ruleset archive, checking a ruleset archive, committing an object, and so on.IlrElementPropertyUtil IlrElementVersion Version of a Decision Center.IlrModelHelper IlrModelInfo Contains information on the Decision Center model.IlrRuleAppDeploymentOperation A RuleApp deployment operation represents an operation done on a RuleApp during deployment on the Rule Execution Server.IlrRuleAppDeploymentReport RuleApp deployment report.IlrSessionHelper IlrSessionHelper
contains a set of helper methods that you use to manipulate Decision Center services and data.IlrSettings Provides a set of methods to save and retrieve Decision Center settings.MergeOperation Description of a change between two branches.SessionEvent Abstract class for events that notifies a change of an element in Decision Center. -
Enum Summary Enum Description Change.Status Status attached to the change.IlrElementPropertyUtil.PropertyType MergeOperation.Action List of actions that can be applied to the MergeOperation elements. -
Exception Summary Exception Description IlrActivityObjectLockedException Thrown when an object is locked by an other Change Activity in the same Release, and prevents a write operation.IlrApplicationException Root exception class for business exceptions happening on the server when using the client API (this API).IlrArchiveGenerationException Thrown when the level of an error that occurred during ruleset archive generation is greater or equal to the level specified in project options.IlrCannotCompareDeleteVersionException Thrown when trying to compare two versions of an element and one version is marked as 'deleted'.IlrCannotDeleteException Thrown when trying to delete an element that is still referenced by other elements.IlrCannotRestoreDeleteVersionException Thrown when trying to restore a version of an element that has been marked as 'deleted'.IlrConcurrentModificationException IlrConnectException Thrown when a user fails to connect to the server using an implementation ofIlrSessionFactory
.IlrElementBaselineNotFoundException This exception is thrown when the system cannot find a baseline for a given element matching either the working baseline or one of its dependent baselines.IlrFolderLockedException Thrown when a folder is locked and prevents an operation.IlrFrozenBaselineException Thrown when trying to manipulate (add/remove elements) a baseline that is frozen.IlrInvalidElementException Thrown when an element is invalid.IlrKnownUUIDException Thrown when trying to commit a new project element with a UUID that is already the UUID of an existing element in the Decision Center repository.IlrMissingDecisionServiceException IlrObjectLockedException Thrown when an object is locked and prevents a write operation.IlrObjectNotFoundException Thrown if a Decision Center object does not exist in the database.IlrObjectNotLockedException Thrown when trying to unlock an object that is no locked.IlrObjectNotRootLockException Thrown when trying to unlock an object that is already participating in a lock initiated by a higher package.IlrProjectBaselineNotFoundException This exception is thrown when the system cannot find a baseline for a given project matching either the working baseline or one of its dependent baselines.IlrProjectEltBaselineNotFoundException This exception is thrown when the system cannot find a baseline for a given project element matching either the working baseline or one of its dependent baselines.IlrReadOnlyException Thrown when trying to set a value for a feature that is read-only.
Package ilog.rules.teamserver.model Description
Overview
Decision Center is a rule management server and repository integrated into a J2EE application server. It is used for authoring, managing, validating, and deploying rule projects containing business rules. IlrSession is the main entry point to Decision Center. You use this class to do the following:
- Search the Decision Center repository
- Execute an action query
- Create new elements such as projects, packages, and rules
- Retrieve, commit, and lock elements
- Manage baselines
An element in Decision Center is any object contained in a rule
project. For example, a rule, a ruleflow, a decision table, a business
object model, a query, or a template. The Eclipse Modeling Framework (EMF) is
used in Decision Center to define the rule model, that is, the set of elements
that are managed in a rule project, and their associated properties. All elements
are instances of an EMF class defined by the EClass
interface.
Properties are represented by the EStructuralFeature
interface.
Call getPropertyValue(String)
and getPropertyValue(EStructuralFeature)
to retrieve the property values of an element. See the
EMF documentation
for more information.
All rule artifacts are instances of the IlrElement
interface.
You manipulate Decision Center artifacts using the following
interfaces:
Name | Description | Scope |
---|---|---|
IlrElementHandle |
The base interface for all elements | Retrieve from server |
IlrElementSummary |
Contains the name of the element only. Mainly used for GUI applications | Retrieve from server |
IlrElementDetails |
Contains all information contained in an element. Can be cast directly
to a type such as IlrRule |
Retrieve from server |
IlrCommitableObject |
Any element that will be added to the repository | Add to server |
Use an IlrSessionFactory
instance to connect to the Decision Center, and then retrieve an IlrSession
instance by calling IlrSessionFactory.getSession
.
All session objects are stateful, that is, they are always
associated with the user whose credentials were given when connect
was called. See IlrSession for a code example
of how to create a user session using the API.
Rule Projects
A rule project corresponds to a specific organization of rules. Rule projects are stored in the repository. A repository can contain many rule projects, but rule projects are displayed one at a time in Decision Center. Rule projects can, however, be set up to reference other projects in the repository. The following code example shows how to create an empty rule project using the API:
//Create Project String projectName = "testProject"; IlrRuleProject testProject = null; IlrRuleProject workingProject = (IlrRuleProject)IlrSessionHelper.getProjectNamed(session, projectName); if (workingProject!=null) { testProject = workingProject; session.eraseProject(testProject); System.out.println("Project Deleted"); } testProject = (IlrRuleProject)IlrSessionHelper.createRuleProject( session, projectName);
Note: This code example uses IlrSessionHelper to interact with Decision Center.
Versions and Baselines
Decision Center keeps track of all the changes made to any project element by storing all the versions of each element.
Baselines correspond to a snapshot of the state of a project at a given moment in time. A project can contain many baselines, all of which you can consult. You can restore a baseline if required.
When a user connects to Decision Center, for your custom application to work correctly, it is essential that you set the baseline for the current user. The following code example shows how to set the baseline for a user:
String project = "loanvalidation-rules"; // get the project by name IlrRuleProject ruleProject = (IlrRuleProject) IlrSessionHelper.getProjectNamed(session, project); // open current baseline IlrBaseline currentBaseline = IlrSessionHelper.getCurrentBaseline(session, ruleProject); session.setWorkingBaseline(currentBaseline);
The following code example shows how to create a baseline from the state of the elements in the current rule project.
Date today = new Date(); String baselineName = "testBaseline" + today.toString(); IlrBaseline newBaseline = session.createBaselineFromCurrentState(baselineName);See IlrSession for a more complete example.
Project Security and User Behavior
Decision Center security means restricting user access to a given project. When security is not enforced on a project, any user of Decision Center can create, update, view, or delete any of the elements in that project. When you enforce security on a project, you specify which groups can access the project. When a user signs in, Decision Center evaluates what the user can do, based on which groups the current user belongs to. The default groups are as follows:
User | Description |
---|---|
rtsUser | Can manipulate data in the Explore, Query, and Compose tabs |
rtsConfigManager | Has rtsUser rights plus control of configuration data in the Configure tab |
rtsAdministrator | Has full control of all aspects of Decision Center |
When the current user tries to modify an element inside a rule project using either the web GUI or via a custom application, session controller methods are called to control the way Decision Center reacts. The default session controller implementation used by Decision Center is IlrDefaultSessionController.
You customize the security settings of Decision Center by creating a
subclass of IlrDefaultSessionController
. For example, you can create
a custom session controller that logs the actions of each user to a file or database.
See IlrSessionController
for an example of of how to create a custom session controller.
In order for Decision Center to take your customized session controller into account, you must register your new implementation in one of the following ways:
- by setting the
teamserver.controller.class
parameter in thepreferences.properties
file. For more information, see theserveractionnotification
sample in the Samples Console. - through the
setConfigParam
ant task
Note: You should create a subclass of
IlrDefaultSessionController
when you customize Decision Center
behavior and not IlrSessionController
directly.
You need at least rtsConfigManager
rights to:
- Create, delete, or update baselines (
write
methods in IlrBaselineManagementFacility)
Also, you need at least rtsAdministrator
rights to:
- Create, delete, or update permissions (
write
methods in IlrPermissionsFacility) - Create or erase projects (IlrSession.eraseProject, IlrSessionHelper.createProject)
- Generate the SQL schema, execute the SQL script, upload extentions (Ant tasks in the Installation Manager)
- Make calls to IlrSession.findElement without any working baseline set
- Release a lock (IlrLockingFacility.releaseElementLock)
However, note that when using the IlrSession API, some actions are less restrictive than when using the Decision Center Enterprise console. Specifically, the rtsUser
can, for example:
- Create ruleset extractors
- Create RuleApps
- Create servers
- Edit project dependencies