Service Trigger Simulations
When a server service is simulated, the actions defined for the service are executed. If any of these actions make use of data in the $MT_SERVICE page source tree, then, for the simulation, you will need to manually create the data in the tree. This is because in a real-use scenario the data in the $MT_SERVICE page source is generated at run time from the service's trigger information—data that is not generated during a simulation.
<Root> <Triggers> <File name="" filename="" reason=""/> <URL name="" url=""/> <Timer name=""/> </Triggers> </Root> |
For simulations, you can manually create the data in the $MT_SERVICE tree as follows:
1.Start the simulation as usual: designer or server. The Trigger Settings for Service Simulation dialog appears.
2.This dialog contains a pane for each type of trigger. (The pane for File System triggers is shown in the screenshot below.) Add an entry for each individual trigger you want to simulate (by clicking the Add icon). (If you do not add any entry, the nodes of the $MT_SERVICE page source will be empty during a simulation. If no XPath expression in the definition of service actions accesses a node from the page source, then it is irrelevant whether the $MT_SERVICE tree contains any data or not.)
3.Enter the values with which you want to simulate the trigger's actions; each trigger is identified by its Name attribute. For example, notice, in the screenshot below, that you can enter three values for the File System trigger. These translate to the attribute values of a File element of the $MT_SERVICE tree (see the structure of the $MT_SERVICE tree above). If you want to use the server for a simulation, make sure that the names you enter for triggers match the names of triggers on the server.
4.If you wish to use these values for subsequent service simulations without having to see this dialog, then uncheck the Show this dialog option at the bottom of the dialog. (If at a later time you wish to show this dialog when you start a simulation, go to the Simulations tab of the Options dialog (Tools | Options), and check the option Show dialog for triggers when simulating service.
5.Click OK. The service will be simulated using the $MT_SERVICE page source values that you specified in the dialog (described above).
For a detailed description of how to create services, see the section Server Services.