This section explains how to execute the sample application.
Use general user permissions to execute the commands in the tasks below.
Perform the tasks in the following sequence:
Deploy the development assets when only one CEP engine has been deployed (for example, immediately after the initial setup of this product has completed).
Execute "/opt/FJSVcep/sample/sample1/bin/deployall.sh".
During this process, a number of queries will be made, so press "Enter" for all of them.
$ cd /opt/FJSVcep/sample/sample1/bin <ENTER>
$ ./deployall.sh <ENTER>
Are you sure you want to deploy the event type definition?(default: y) [y,n,q]:<ENTER>
Command cepdeployrsc executed successfully.
Are you sure you want to deploy the event type definition?(default: y) [y,n,q]:<ENTER>
Command cepdeployrsc executed successfully.
Are you sure you want to deploy the event type definition?(default: y) [y,n,q]:<ENTER>
Command cepdeployrsc executed successfully.
Are you sure you want to deploy the event type definition?(default: y) [y,n,q]:<ENTER>
Command cepdeployrsc executed successfully.
Are you sure you want to deploy the rule definition?(default: y) [y,n,q]:<ENTER>
Command cepdeployrsc executed successfully.
Are you sure you want to deploy the master data definition?(default: y) [y,n,q]:<ENTER>
Command cepdeployrsc executed successfully.
Are you sure you want to deploy the master data definition?(default: y) [y,n,q]:<ENTER>
Command cepdeployrsc executed successfully.
In this shell script, the following commands are executed:
Deploying event type definitions
cepdeployrsc eventtype -f /opt/FJSVcep/sample/sample1/resources/LocationEvent.xml
cepdeployrsc eventtype -f /opt/FJSVcep/sample/sample1/resources/CouponEvent.xml
cepdeployrsc eventtype -f /opt/FJSVcep/sample/sample1/resources/FilteredLocationEvent.xml
cepdeployrsc eventtype -f /opt/FJSVcep/sample/sample1/resources/FilteredCouponEvent.xml
Deploying master definitions
cepdeployrsc master -f /opt/FJSVcep/sample/sample1/resources/MemberInfo.xml
cepdeployrsc master -f /opt/FJSVcep/sample/sample1/resources/StoreInfo.xml
Deploying the rule definition
cepdeployrsc rule -f /opt/FJSVcep/sample/sample1/resources/SampleRule.xml
Execute the following command to start the CEP engine:
$ cepstarteng<ENTER>
Use the event sender sample program (/opt/FJSVcep/sample/sample1/bin/sendevent.sh) to send the sample data and use the engine log to check the rule operation.
Sending location information events and checking the results
$ ./sendevent.sh LocationEvent /opt/FJSVcep/sample/sample1/event/LocationEvent.csv<ENTER>
Check that "filterOut1" events have been output to the engine log.
Output example
2012-07-09 11:11:57,409 [DEBUG] filterOut1:length=1
filterOut1[0]
areaID :2222: String
age :30: String
memberID :MEM0008: String
2012-07-09 11:11:57,413 [DEBUG] filterOut1:length=1
filterOut1[0]
areaID :2222: String
age :20: String
memberID :MEM0003: String
Sending coupon events and checking the results
$ ./sendevent.sh CouponEvent /opt/FJSVcep/sample/sample1/event/CouponEvent.csv<ENTER>
Check that "filterOut2" events have been output to the engine log.
Output example
2012-07-09 11:15:38,054 [DEBUG] filterOut2:length=1
filterOut2[0]
areaID :2222: String
targetAge :30: String
storeID :STR0001: String
couponID :CPN0001: String
Sending location information events and checking the results
Send location information events within 3 minutes of sending coupon events.
$ ./sendevent.sh LocationEvent /opt/FJSVcep/sample/sample1/event/LocationEvent.csv<ENTER>
Check that events indicating a coupon issue ("EPL2" event) have been output to the engine log.
Output example
2012-07-09 11:17:25,314 [DEBUG] filterOut1:length=1
filterOut1[0]
areaID :2222: String
age :20: String
memberID :MEM0003: String
2012-07-09 11:17:25,321 [DEBUG] filterOut1:length=1
filterOut1[0]
areaID :2222: String
age :30: String
memberID :MEM0008: String
2012-07-09 11:17:25,323 [DEBUG] EPL2:length=1
EPL2[0]
storeID :STR0001: String
memberID :MEM0008: String
couponID :CPN0001: String
Sending location information events and checking the results
Send location information events again within 3 minutes of sending coupon events.
$ ./sendevent.sh LocationEvent /opt/FJSVcep/sample/sample1/event/LocationEvent.csv<ENTER>
Check that events indicating coupon issue ("EPL2" event) have not been output to the engine log.
Output example
2012-07-09 11:18:00,691 [DEBUG] filterOut1:length=1
filterOut1[0]
areaID :2222: String
age :20: String
memberID :MEM0003: String
2012-07-09 11:18:00,691 [DEBUG] filterOut1:length=1
filterOut1[0]
areaID :2222: String
age :30: String
memberID :MEM0008: String
Execute the following command to stop the CEP engine:
$ cepstopeng<ENTER>
Execute "/opt/FJSVcep/sample/sample1/bin/undeployall.sh" to undeploy the development assets in batch.
During this process, a number of queries will be made, so press "Enter" for all of them.
$ ./undeployall.sh<ENTER>
Are you sure you want to undeploy the event type definition?(default: y) [y,n,q]:<ENTER>
Command cepundeployrsc executed successfully.
Are you sure you want to undeploy the event type definition?(default: y) [y,n,q]:<ENTER>
Command cepundeployrsc executed successfully.
Are you sure you want to undeploy the event type definition?(default: y) [y,n,q]:<ENTER>
Command cepundeployrsc executed successfully.
Are you sure you want to undeploy the event type definition?(default: y) [y,n,q]:<ENTER>
Command cepundeployrsc executed successfully.
Are you sure you want to undeploy the rule definition?(default: y) [y,n,q]:<ENTER>
Command cepundeployrsc executed successfully.
Are you sure you want to undeploy the master data definition?(default: y) [y,n,q]:<ENTER>
Command cepundeployrsc executed successfully.
Are you sure you want to undeploy the master data definition?(default: y) [y,n,q]:<ENTER>
Command cepundeployrsc executed successfully.