Implementing the session controller
To customize the behavior of Decision Center, you implement the IlrSessionController controller interface.
-
IlrSessionController#checkCreate(org.eclipse.emf.ecore.EClass)
-
IlrSessionController#checkDelete(ilog.rules.teamserver.model.IlrElementHandle)
-
IlrSessionController#checkUpdate(ilog.rules.teamserver.model.IlrElementHandle,%20ilog.rules.teamserver.model.IlrElementDetails,%20org.eclipse.emf.ecore.EStructuralFeature)
IlrSessionController#elementCommitted(ilog.rules.teamserver.brm.IlrBranch,%20ilog.rules.teamserver.model.IlrCommitableObject,%20ilog.rules.teamserver.model.IlrElementHandle)
IlrSessionController#elementDeleted(ilog.rules.teamserver.brm.IlrBranch,%20ilog.rules.teamserver.model.IlrElementHandle)
IlrSessionController#getInitialValue(ilog.rules.teamserver.model.IlrElementDetails,%20org.eclipse.emf.ecore.EStructuralFeature)
IlrSessionController#getPossibleValues(ilog.rules.teamserver.model.IlrElementHandle,%20org.eclipse.emf.ecore.EStructuralFeature)
IlrSessionController#isEditable(ilog.rules.teamserver.model.IlrElementHandle,%20java.lang.String)
IlrSessionController#isHidden(ilog.rules.teamserver.model.IlrElementHandle,%20java.lang.String)
The default controller
Decision Center comes with a default implementation of the controller: IlrDefaultSessionController.
To keep the default Decision Center behavior while adding your own customizing, subclass the default controller instead of rewriting a new one.
Setting up your own controller
To set up your own controller, repackage the Decision Center archive with the
repackage-ear command. In the repackage-ear command, use the
-DadditionalJars argument to specify the JAR file containing your custom class.
For information on how to repackage the Decision Center archive, see Repackaging the Decision Center archive.
-
Set it as a Decision Center configuration parameter using the set-config-param Ant task:
ant set-config-param -Dkey=decisioncenter.controller.class -Dvalue=mycompany.MyControllerClass -
Set it as a preference, adding the following line in a preferences.properties file that you can put in your JAR file:
decisioncenter.controller.class=mycompany.MyControllerClass