Table of Contents
Business entities are functional representations of the raw data from the analyze database. These messages will be processed as they are running through the system. This means that the data will be available after the business entity is created. There is no possibility to recreate this data from the historic data.
What do we mean by a functional representation of the data. For example, we receive messages like the next example:
<?xml version="1.0" encoding="UTF-8" ?> <Customers> <Customer> <first_name>Edward</first_name> <last_name>Evans</last_name> <full_name>Edward Evans</full_name> <phone>503-310-3671</phone> <address>1 A ST</address> <city>JOHNSTON</city> <filenumber>764453213</filenumber> </Customer> </Customers>
One of the questions which could be asked to you is for instance: "Is filenumber 764453213" filed in the system?" . If you have only the message available, this will be a problem. You have to open the messages and look at the message to find out if this filenumber has been send to the system. You can imagine how difficult this must be, if the messages are very big and you have a lot of them. This is where the business entities come in. As the messages are processed, we will extract the fuctional data from it and sent it to the database, so that we can search for the requested data, in this case filenumbers.
Creating a new business entity
To go to the business entities, select the type . If you started the business entities for the first time, you will see the following screen:
The following data is presented to you:
|ID||Every message has a correlation ID given to it by the system. This is its ID|
|Timestamp||Date-Timestamp the record is registered|
|Location||Location of the wiretap. This can be, for example, consumer, service or producer. But you can also define a value yourself in the Analyze wiretap yourself. Then you will see this value here.|
|Process||Process name, or the given value in accordance with the Analyze wiretap in your interface|
|Pointcut||Presentation of the PointCut given in the Analyze Wiretap during configuration of the Analyze wiretap in the constructor|
To create a new business entity you press the button, in the business entity section. The next screen will be presented to you:
First, we must name the business entity. This can be any name, it is just an identification for this business entity. As we want to know what this entity represents, choose a name which suits the purpose of this business entity. For this example we will create a business entity to check the file numbers. We will add the full name of the customer to the business entity for reference. This will look like this:
Press to save the selection. After saving this business entities and selecting the business entiry, the overview screen will change to represent the correct data.
As you can see, the newly created fields are added to the overview and to the filter options. You can use them as described with the messages / flows.
Before we go further, entering the data needed for selecting the correct functional data, we open a Flow and put it on a seperate tab, or in a seperate window. You can do that by pressing the button. A new tab in your browser will open with the selected detailed information.
Now that we have the fields that we want to see in our business entity, we have to define the rules for them. To do that, we edit the business entity by pressing the button. The next screen will open:
You see that there is a new button, . Press this button and we enter the Rules manager.
As this is the first time we see the Rules manager, it is empty. We now have to define the matches or links from the data we have and the data we want to present in the overview, in our case the file number and the full name of the customer.
To create a new Match entry, press the button and the following screen will open for you:
Now you have to add the positon from where you want to select the data. In our case this will be the first Analyze wiretap. Fill in the fields and press the button. You can verify the selection in the flow detail screen, which we opened in a different tab (see above). After adding the rule, it will turn up at the upper left of the screen, like this:
Now we have the section where we want to get the data from. But there could be a lot of different messages send over this entry point. Just think about it, We could, for instance, put an Analyze wiretap after a webservice call. This webservice call returns the answer to our request. But this response could be an error message as well.
The next step in defining the correct data is to set an Identify Rule. This rule is mandatory. It can be a simpel rule like the following XPATH expression: count(/Customers/Customer)>1 or something more complicated. The rule is to be sure we have the correct message to get the data from.Open the Match entry via the button, the following screen will be shown to you.
We enter the following information as the Identify Rule:
Now that we have the correcct message identified we need to add the Attribute Rules. With these lines we select the data out of the message and bind it to the defined fields. This looks like this:
After entering the Attribute Rules, do not forget to press the to save the rule set. And close the screens until you are in the Business entities overview.
Now, we will put the demo files in our in directory, to be processed. We have 4 customer files as described above, with different names and filenumbers. Let us see what has happened after we processed the messages.
As you can see, we added 4 messages. One of them was Edward Evans with filenumber 764453213. You see the Full Name and the Fiel number fields with the correct values. You can also search within these fields with the Filter options. This is what makes Analyze a very important tool to use.
For the next example we want to process a different message. This messages has some of the same values as described above, but has more than 1 nodes. It looks like this:
<?xml version="1.0" encoding="UTF-8" ?> <Customers> <Customer> <first_name>Gerald</first_name> <last_name>Davourds</last_name> <full_name>Gerald Davourds</full_name> <schoolfiles> <filenumber>3423342342342</filenumber> </schoolfiles> </Customer> <Customer> <first_name>Jan</first_name> <last_name>van Hoek</last_name> <full_name>Jan van Hoek</full_name> <schoolfiles> <filenumber>8677746655</filenumber> </schoolfiles> </Customer> <Customer> <first_name>Judith</first_name> <last_name>Hanen</last_name> <full_name>Judith Hanen</full_name> <schoolfiles> <filenumber>4598359375</filenumber> </schoolfiles> </Customer> <Customer> <first_name>Peter</first_name> <last_name>Toepuater</last_name> <full_name>Peter Toepuater</full_name> <schoolfiles> <filenumber>0384503850384</filenumber> </schoolfiles> </Customer> </Customers>
To process this message, we use the interface below.
Just a simple File Pickup an Analyze wiretap and a File Drop.
We want to use the same business entity, because we want to have the file number and the full name, but we are going to use a different rule set. So we open the Rules manager for Filenumbers (Edit Business Entity --> Rules)
Press the button to add a new Match entry, which looks like this:
Add the next Identify rule:
As you can see we added the Repeat Rule. This rule selects all the nodes you wat to have from the message. In this case our target will ben Customer, and within the customer we define the two Attribute rules, File number and Full Name.
ATTENTION: Check the attribute rules!
- There is NO forward slash at the front of the excpression
- Always convert the XPATH expression to Text by adding /text() behind the XPATH query
Now we put through our message and check the result:
You can double click on any of the messages to get some detailed information about this message.The following screen will pop up:
Double click on the message again, and you will get more detailed information.