In this Lesson
You will learn about the Pump’s execution detail log. The log describes the Pump’s action as it runs your agents.
It is worth noting that agents are not aware of each other at runtime. Each agent thinks it is the only thing in existence – they cannot see or communicate with any other agent.
[ah, so they are king of the world – but only in their own minds. i resemble that remark.]
The pump orchestrates all interactions among agents. It tells agents when to arrive at the party and when to leave. It tells them which actions to take as well as the specific information they should be operating on. Most importantly it ensures that all agents are well-behaved and coordinated in terms of the information they operate on. It could be said the Pump is ‘the program’ and agents provide the implementation details.
It is this loosely coupled independence that allows designers to easily add or remove agents from a scene without writing choreograph code (glue code). They can expect the agents to operate as a single unit because of the Pump.
So what if agents do not behave as you expect them to? Invite the execution detail log to the party because it may provide the clues needed to resolve the issue. The most frequent problem among agents is passing the wrong context or passing context at the wrong time (or not at all). The execution detail log will show you exactly which agents are running and what context is flowing around in the context pool.
In this lesson you will be looking at the output from that log and learn how it can benefit you in your development process.
Enabling the execution detail log
- Open the Eclipse preferences
- Expand the Soiree -> SxServer section and enable the log as shown here:
Create some log entries
- Start Derby if it is not already running
- Start the Party server
- Start the PartyPool solution
- Advance to the party list and then select a party from the list
- Close the Soiree desktop client
- Stop the server
Locating the Execution Detail Log file
When you run the embedded development server Soiree creates some folders in your home directory which are used by the server. The Execution Detail Log file is located in these folders.
The general form of the log’s location is as follows
/home folder/SoireeDevServerHome/eclipse workspace name/var/log/ExecutionLog.txt
Inspecting the log contents
Open the ExecutionLog.txt file and let’s take a look at the entries the pump created as you used the solution.
- When the solution started:
- When you clicked on the fish in the splash scene:
- When you selected a party from the list:
- When your agent finished running the pump injects the toggle fish layer because of the boolean set in the toggle agent
- When you closed the client the agents were asked to leave the party.
You may have noticed layer ids being referenced in the log. These values tell you exactly which of the scene’s layers are being added or removed from the session.
You can find a layer’s id as follows:
- Open the PartyDefinition scene
- Select any layer thumbnail in the ribbon bar
- Use the Layer menu to copy the layer id to the clipboard
- Paste the ID into an editor or text field that accepts text values.
You are finished with this lesson.