Automation Orchestrator deployments can work in a cluster, which involves transferring configuration data between the clustered nodes. When you make a configuration change, like adding an inventory object on one of the cluster nodes, that change does not automatically propagate to the workflow engines of the rest of the nodes.

The Automation Orchestrator plug-ins must contain code that fulfills a set of requirements.
  1. Detect that a change was applied.

    The IEndpointConfigurationService.getVersion() method returns the current version of the configuration data in the database.

    The following code detects changes by comparing the current version to the version that is stored in the database.

    public class DefaultConnectionPersister implements ConnectionPersister {
    
     @Autowired
     private IEndpointConfigurationService cachingEndpointConfigurationService;
    
     private String configurationVersion;
    
     public boolean changed() throws IOException {
     return configurationVersion == null || configurationVersion.isEmpty()
    ||
    !configurationVersion.equals(cachingEndpointConfigurationService.getVersion());
     }
    
    }

    This check is invoked every time an object that depends on the configuration data is accessed.

  2. If the check detects a change, load configuration data.
    Note: The Automation Orchestrator platform caches the IEndpointConfigurationService.getVersion() method. The caching interval is different depending on the version of Automation Orchestrator.

    The maximum caching interval is two heart-beat intervals. For example, if the heart-beat interval is five seconds and a configuration change occurs on Node1, calling the getVersion() method on the other nodes returns a cached value for a maximum of 10 seconds.

IEndpointConfigurationService implementation

During the plug-in development, you must implement IEndpointConfigurationService in such a way, that the IEndpointConfigurationService.getVersion() method can work on all supported versions of Automation Orchestrator.
  1. In the Maven pom.xml file, add a compile-time dependency to the o11n-plugin-tools artifact, so that the plug-in package includes the artifact.
    <dependency>
     <groupId>com.vmware.o11n</groupId>
     <artifactId>o11n-plugin-tools</artifactId>
     <version>${vco.version}</version>
    </dependency>
  2. Implement IEndpointConfigurationService depending on the type of the plug-in.
    For Spring-based plug-ins, the name of the component is cachingEndpointConfigurationService.
    1. The name the property must be cachingEndpointConfigurationService.
      @Autowired
      private IEndpointConfigurationService cachingEndpointConfigurationService;
    2. Add the application content XML to the plug-in.
      <context:component-scan basepackage="com.vmware.o11n.plugin.sdk.endpoints.extensions" annotationconfig="true"/>
      For plug-ins that are not Spring-based, search the correct version, for example, in the setServiceRegistry method.
      endpointConfigurationService =
      EndpointConfigurationServiceFactory.lookupEndpointConfigurationService(registry
      );
  3. Reload the configuration data.

    By fetching all data through endpointConfiguratonService, find the changed entries on the other nodes.

  4. Update the state of the inventory objects according to the loaded configuration data.