Home
Categories
Dictionary
Glossary
Download
Project Details
Changes Log
What Links Here
FAQ
License

Recorder splitFiles options



This article presents the splitFiles options managed by the recorder Application.

Note that these options will be considered for recording only if:
  • The value of the "format" property is "json"
  • The value of the "splitFiles" property is "true"
These options allow either to:
  • Produce one json file for each subscribed service notification, with only the content of the subscribed service serialized in the json file content
  • Produce one json file for each subscribed service notification, with the content of all the subscribed services serialized in the json file content
  • Produce one json file only for selected subscribed service notifications, with the content of the subscribed services associated with this one included in the json file content

If the "splitFiles" property is true, then the path is the path of the directory which will contain the files. This directory must exist, and may not be empty, but you will see a warning if it contain any json files prior to the recording.

Properties

Two properties are used to specify which content will be included:
  • "includeAllServices": true if all services should be included in each recorder event
  • "splitGroups": the specification of the groups of services to consider for splitted files

Explanation of the options

We will explain the options with the following configuration:
      <application name="recorder" >
         <deployment>
            <lib url="recorderEngine.jar" />
         </deployment>
         <modules>
            <module name="recorder" >
               <interfaces>
                  <listen service="service1"/>
                  <listen service="service2"/>
                  <listen service="service3"/>
               </interfaces>
            </module>
         </modules>
      </application>

Produce only the content of the subscribed service serialized in the json file

By default only the content of the subscribed service is serialized in the json file. Suppose that the recorder is notified from service1, then service2, then service3:
  • The recorder will serialize three json files, the first only with service1, the second only with service2, the last only with service3

splitjsondefault

Produce the content of all the subscribed services serialized in the json file

If the includeAllServices property is true, for each of the subscribed service the content of all the services will be serialized in the json file. Suppose that the recorder is notified from service1, then service2, then service3:
  • The recorder will serialize three json files, all of them with service1, service2, and service3

splitjsonallservices

Produce only for selected subscribed service notifications, with the content of the subscribed services associated with this one

If the includeAllServices property is not set or false, and the splitGroups property is set, this array property will be used to specify which service notification will be serialized, and which services will be included in the serialization.

The format of each of the values is a pattern:
      <service name or uri 1>...<service name or uri n>
For example:
      <moduleArrayProperty key="splitGroups">
         <value value="service1;service2;service3" />
      </moduleArrayProperty>
The recorder will only record when notified from service name or uri n, with the content of all the services from service name or uri 1 to service name or uri n.

If is possible to specify more than one group of services. Also services can have namespaces, for example this is valid:
      <moduleArrayProperty key="splitGroups">
         <value value="service1;service2;service3" />
         <value value="http://my.namespace/:service4;http://my.namespace/:service5" />
      </moduleArrayProperty>




For example:
      <properties>   
         <application name="recorder">
            <module name="recorder">
               <moduleProperty value="scenario" key="scenario"/>   
               <moduleProperty value="true" key="splitFiles"/>  
               <moduleProperty value="${YEAR}-${MONTH}-${DAY}-scenario-${INDEX}" key="splitNamePattern"/>  
               <moduleArrayProperty key="splitGroups">
                  <value value="service1;service2;service3" />
               </moduleArrayProperty>  
               <moduleProperty value="json" key="format"/>  
            </module>	
         </application>   
      </properties>
Suppose that the recorder is notified from service1, then service2, then service3:
  • The recorder will serialize ony one json file, for the last service3 notification, and with the content of service1, service2, and service3

splitjsongroups

Record trigger with splitGroups

The trigger for the record is the reception of the last service in the pattern:
      <service name or uri 1>...<service name or uri n>
This means that for example if we have the following splitGroups property:
      <moduleArrayProperty key="splitGroups">
         <value value="service1;service2;service3" />
      </moduleArrayProperty>
And we are notified from "service3" without having been notified from service1 or service2 prior to service3, we will still record the content of service1, service2, and service3 with their last received content:
splitjsongroups2

Records for other services

If a service is not part of any splitGroups property, it will be recorded as soon as it has been notified. For example, suppose that we have the following configuration:
      <application name="recorder" >
         <deployment>
            <lib url="recorderEngine.jar" />
         </deployment>
         <modules>
            <module name="recorder" >
               <interfaces>
                  <listen service="service1"/>
                  <listen service="service2"/>
                  <listen service="service3"/>
                  <listen service="service4"/>
               </interfaces>
            </module>
         </modules>
      </application>
and the following properties specification:
      <properties>   
         <application name="recorder">
            <module name="recorder">
               <moduleProperty value="scenario" key="scenario"/>   
               <moduleProperty value="true" key="splitFiles"/>  
               <moduleProperty value="${YEAR}-${MONTH}-${DAY}-scenario-${INDEX}" key="splitNamePattern"/>  
               <moduleArrayProperty key="splitGroups">
                  <value value="service1;service2;service3" />
               </moduleArrayProperty>  
               <moduleProperty value="json" key="format"/>  
            </module>	
         </application>   
      </properties>
Then if we receive service4, we will record only its content:
splitjsongroups3

See also


Categories: builtin-applis

Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence