JBoss.orgCommunity Documentation
Ensure that the following requirements have been met before continuing with the install.
The Application doesn't change the Mobicents JAIN SLEE Hardware Requirements, refer to Mobicents JAIN SLEE documentation for more information.
Note that application makes use of Resource Adaptors - this implies that RAs requirements must be taken into consideration!
Also be aware that each Resource Adaptor may have some specific hardware requirements!
Downloading the source code
Subversion is used to manage its source code. Instructions for using Subversion, including install, can be found at http://svnbook.red-bean.com
Use SVN to checkout a specific release source, the base URL is http://mobicents.googlecode.com/svn/tags/applications/ussdgateway, then add the specific release version, lets consider 1.0.0.BETA1.
[usr]$ svn co http://mobicents.googlecode.com/svn/tags/applications/ussdgateway/1.0.0.BETA1 slee-application-ussdgateway-1.0.0.BETA1
Building the source code
Maven 2.0.9 (or higher) is used to build the release. Instructions for using Maven2, including install, can be found at http://maven.apache.org
Use Maven to build the binary.
[usr]$ cd slee-application-ussdgateway-1.0.0.BETA1 [usr]$ mvn install
Once the process finishes you should have the deployable-unit
jar file in the target
directory, if Mobicents JAIN SLEE is installed and environment variable JBOSS_HOME is pointing to its underlying JBoss Application Server directory, then the deployable unit jar will also be deployed in the container.
Similar process as for Section 2.2.1, “Release Source Code Building”, the only change is the SVN source code URL, which is https://mobicents.googlecode.com/svn/trunk/applications/ussdgateway.
Installing Mobicents USSD Gateway creates a mobicents-ussd-gateway directory that contains gateway configuration, libraries required for boot and running, example rules definition file (.drl) etc. You need to know your way around the distribution layout to locate the drools file's to add new rules. The figure "view of Mobicens USSD Gateway" illustrates the installation directory of the Gateway.
Mobicents USSD Gateway
USSD Gateway Application uses Drools
as rule engine to perform decisions, it is important to understand JBoss Drools
Rule engine (Drools
) is configured with USSDGatewayChangeSet.xml
file. Its content alters how rule set is loaded and maintained within engine.
There are two ways of maintaining rules:
rules are loaded from designated file. Configuration file should look as follows:
<change-set xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.0/change-set.xsd'>
<add>
![]()
<resource
source='file:/home/baranowb/servers/jboss-5.1.0.GA/server/default
/deploy/mobicents-ussd-gateway/rules/'
type='DRL' />
</add>
</change-set>
rules are managed by Guvnor
Configuration file should look as follows:
<change-set xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.0/change-set.xsd'>
<add>
![]()
<resource source='http://localhost:8080/drools-guvnor/
org.drools.guvnor.Guvnor/package/ussdGateway/LATEST.drl' type='DRL' />
</add>
</change-set>
USSD Gateway
Application uses
Gunvor
to manage system wide rule set in consistent way, it is important to
understand
Guvnor
Guvnor
is deployed along with USSD Gateway
Application. To access it simply go to
http://<your server>/drools-guvnor/
. This will bring initial info screen or login screen - depends on
configuration.
If you have not configured the security you can directly login without providing any user id or password.
Guvnor
requires upload for fact model and creation of some resources before it can perform its tasks.
In case
Guvnor
has not been used(it is a new repository) you will get a message
asking if you would you like to install a sample repository? Its upto
you to install the sample repository. If you say yes, you would get
sample repository which you can refer to have better understanding of
Guvnor
Once you log-in follow the bellow steps:
Create a category specific to USSD gateway.
Go to
UssdGateway
.
Guvnor category
Create package for fact model.
Rules need a fact model (object model) to work off, so next you
will want to go to the Package management feature. Go to
ussdGateway
(note that this name
MUST
match package in
USSDGatewayChangeSet.xml
file).
Guvnor package
Upload fact model.
To upload a model, use ussdgateway-domain-x.y.z.jar which has the
fact model (Call.java API) that you will be using in your rules.
When you are in the model editor screen, you can upload a jar file,
choose the package name from the list that you created in the
previous step. Go to
UssdPojo
, select package
ussdGateway
and add the description, click
.
Guvnor fact model upload
Browse in newly open window and point to
${JBOSS.HOME}/server/default/deploy/mobicents-ussd-gateway/lib/ussdgateway-domain-x.y.z.jar
.
Edit your package configuration.
Now edit your package configuration (you just created) to import
the fact types you just uploaded (add import statements), and save
the changes. Go to Knowledge Bases and click on
ussdGateway
package. Click on
button.
This concludes configuration of
Guvnor
. Note that this has to be done only once.
Guvnor
allows to create rules and edit previously existing ones. Changes done with Guvnor
are automaticly propagated to all clients.
To create rule follow procedure below:
Create rule.
Go to ussd123Sip
, click on UssdGateway
Initial Category.
Select , actually you can use
any editor here that you are comfortable with. Select ussdGateway
as
package. Enter description and click Ok
.
Guvnor new rule
Edit rule.
Guvnor edit rule
Accept rule.
Click on
to validate the Rules you just defined. Once done with rule editing, you can check in the changes (save) by clicking onRebuild and validate package
After you have edited some rules in
package, you can click on the package, open the package, and build the whole package.Guvnor new rule