Create Multiple Situations from a single Situation
Question;
I have an XML file with multiple situations, but they are imported as a single situation. How do I get them to appear as separate situations in my knowledge model?
Answer;
Please note: This is written for version 2.4 of the Behaviour Engine.
Sometimes you may have an XML file that contains multiple situations you wish to import as separate situations. As XML does not support multiple root nodes the following steps are required.
Firstly, ensure that your XML file has a single root element, i.e.:
<Situation id="1" name="Test1"/> <Situation id="2" name="Test2"/> <Situation id="3" name="Test3"/>
Should be converted to;
<Root> <Situation id="1" name="Test1"/> <Situation id="2" name="Test2"/> <Situation id="3" name="Test3"/> </Root>
Save the file, so that a knowledge node can reference it within your knowledge model
Within the knowledge model screen of the Erudine Behaviour Engine, create an XML File node (use your mouse right-click to bring up the contextual menu):
Using right click on the data knowledge node, select the properties option. You will be presented with the following screen. Add your data file path location information to the com.erudine.inbox.filePath property:
Click on Apply. Add a process node of type enrich to your knowledge model and link the data node to it. Once this is done, right mouse click on the data node and select "Remove All behaviour". Your knowledge model will be presented as follows:
Double click the data node. You will be presented with the following, the single XML file represented as a single situation in a Conclusion tab window.
Right mouse click one of the Situation concepts, and go to Add Categorisation Conclusion -> Send from data to -> process:
On the following screen, create the behaviour to satisfy the application (the second tab window will turn green to signify this):
Click Ok. Double click the process node. The focus will move to that node, and you will be presented with a list of situations that originally started out as sub elements within a single XML file:
You have converted elements within a single XML file into multiple situations that can be processed by the Erudine Behaviour Engine.
If this article was useful to you, please click below to rate it!
| Your Rating: |
![]() ![]() ![]() ![]()
|
Results: |
![]() ![]() ![]() ![]()
|
5 | rates |
