190 IBM WebSphere RFID Handbook: A Solution Guide
8.2.3 Simulating a back-end system
Because we do not have the equivalent of an enterprise system in our ITSO lab,
we used the PremisesTest bundle, which you can configure through the
premises-test.properties file that comes with the Premises Server. This bundle
can simulate three of the RFID domains: a reader, an Edge Controller, and a
back-end system. We used this file to simulate a back-end enterprise system.
This section explains how we did this.
For more information about this file, see 6.2.5, “Using KimonoPremisesTest
bundle” on page 138.
Find RFID tag data
We read our RFID tags to determine their actual values, so we could put these
values in the simulator file:
RFID_HOME\RFID\edgecontroller\premises\smf\premises-test.properties
View the Premises Server SMF console
To view the Premises Server SMF console, follow these steps:
1. On the Premises Server, stop the SMF service.
2. Start SMF by running smf.bat:
From a command prompt, change to the SMF directory:
IBM-RFID-HOME\edgeconroller\premises\smf
Then enter:
smf.bat
3. To show the bundles that are running, enter:
SMF> ss
4. Verify that KimonoConsoleLog [26] and KimonoPremisesTest [25] are
RESOLVED, as shown in Example 8-4.
Example 8-4 Premises Server SMF console
Framework is launched.
id Type State Bundle
27 .jar ACTIVE smfbd:/PremisesLoggingConnector [27]
26 .jar RESOLVED smfbd:/KimonoConsoleLog [26]
25 .jar RESOLVED smfbd:/KimonoPremisesTest [25]
24 .jar ACTIVE smfbd:/MBAF [24]
23 .jar ACTIVE smfbd:/win32service [23]
21 .jar ACTIVE smfbd:/MicroBrokerBridgeManager [21]
20 .jar ACTIVE smfbd:/KimonoPremisesBridge [20]
19 .jar ACTIVE smfbd:/Rfid [19]
Chapter 8. Running the Dock Door Receiving scenario 191
18 .jar ACTIVE smfbd:/MicroBrokerBridgeJMS [18]
17 .jar ACTIVE smfbd:/MicroBrokerBridge [17]
15 .jar ACTIVE smfbd:/MicroBrokerManager [15]
14 .jar ACTIVE smfbd:/MicroBroker [14]
13 .jar ACTIVE smfbd:/ConfigurationAdmin [13]
12 .jar ACTIVE smfbd:/EventLog [12]
11 .jar ACTIVE smfbd:/MicroBrokerTrace [11]
10 .jar ACTIVE smfbd:/MQTelemetryTransport [10]
9 .jar ACTIVE smfbd:/MicroBrokerRegistry [9]
8 .jar ACTIVE smfbd:/OSGi-SPR3-ServiceTracker [8]
7 .jar ACTIVE smfbd:/LogService [7]
6 .jar ACTIVE smfbd:/SMFBundleMessages [6]
5 .jar ACTIVE smfbd:/PersistenceManager [5]
2 .jar ACTIVE smfbd:/OAF_Base [2]
1 .jar ACTIVE smfbd:/OSGi-SPR3-ServiceInterfaces [1]
0 ACTIVE System Bundle [0]
5. To start the SMF console log, enter:
SMF> start 26
The KimonoConsoleLog [26] should now be active, as shown here:
26 .jar ACTIVE smfbd:/KimonoConsoleLog [26]
Scan RFID tags
To scan RFID tags, do the following:
1. At your edge location, turn your switch ON and activate your motion sensor.
2. Scan each tag once.
3. To stop reading, deactivate your motion sensor and turn your switch OFF.
Note: The delayafterquiet property of the MotionSensorAgent sets the
period of time after the motion sensor starts that a reader attempts to read
tags. Depending on this setting, your reader might stop by itself.
192 IBM WebSphere RFID Handbook: A Solution Guide
Copy the tag data
After we read the tags we copied the tag data from the console to put in our list of
accepted tags. Because we wanted to test an invalid tag, we only copied one
pallet tag and one case tag.
1. Return to the Premises Server SMF console and look through the output for
XML messages with type='tag_read' as shown in Example 8-5.
Example 8-5 XML message example with type='tag_read'
Intermec1Bx
[INFO] 2005-10-20 12:23:48.359 - TagReadTransformation@44625bb6: doTransform() -> transformed
message (after decoding) = properties
{msgDuplicate=false, qos=1, msgID=4,
topicProperty=receiving/portal/A305-21-1B/signal/tags},resourceName=EDGE.IN.Q,
sourceResourceName=receiving/portal/A305-21-1B/signal/tags,body=<?xml version='1.0'
encoding='UTF-8'?><ibmprem:ibm-premises-unified-format dts='2005
10-20T12:23:48' xmlns:ibmprem='http://www.ibm.com'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http:/
www.ibm.com IBMPremisesUnifiedMessageFormat.xsd'><event location='A305-21-1B'
type='tag_read'><rfid-tag-data antenna='0' count='1'
discovered='960282721899' reader='Intermec1B' tagid='ef04304000000020'/></event>
</ibmprem:ibm-premises-unified-format>
2. Copy the value of tagid. For example:
ef04304000000020
Edit the premises-test.properties file
We pasted the tag data into the simulator file. We also made other necessary
changes to use just the back-end simulation and not use the Premises Server
and Edge Controller simulation. To edit the premises-test.properties file:
1. Open the following file for editing (Example 8-6):
IBM-RFID-HOME\RFID\edgecontroller\premises\smf\
premises-test.properties
2. Look for the list of expected tags in the properties section of
DockDoorRecievingEventHandler.java.
Example 8-6 premises-test.properties file
###############################################################################################
#
# Properties for DockDoorReceivingEventHandler.java
#
# id - the ID of the handler
# (DEFAULT = <fully qualified class name of the handler>)
# message-the format of the validation response sent to the Premises Server

Get IBM WebSphere RFID Handbook: A Solution Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.