Creating a variable provider for use by a REST call

Procedure

  1. Create a class that extends com.datasynapse.fabric.broker.userartifact.variable.AbstractVariableProvider and override the methods as needed. For example:
    package com.tibco.sf.providers;
    import java.util.Properties;
    import com.datasynapse.fabric.broker.userartifact.variable.AbstractVariableProvider;
    public class My_Var_Provider extends AbstractVariableProvider
    {
      private static final long serialVersionUID = 1L;
      @Override
      public Properties getVariables()
      {
        Properties p = new Properties();
        p.setProperty("MyApp/vars/name", "SomeString");
        p.setProperty("MyApp/vars/episodic", "true");
        p.setProperty("MyApp/vars/Xduration", "60");
        return p;
      }
      @Override
      public void destroy()
      {}
      @Override
      public void init() throws Exception
      {}
    }
  2. Export a JAR from it and save it to the TIBCO Silver Fabric Broker directory:
    SILVERFABRIC_HOME/webapps/livecluster/deploy/config/variableProviders
  3. Create an XML file with the properties shown in this sample to associate the new class for TIBCO Silver Fabric.
    <variableProvider class="com.tibco.sf.providers.My_Var_Provider">
       <property name="name" value="Some_PROVIDER_Name"/>
       <property name="description" value="GV values are in the JAR"/>
       <property name="enabled" value="true"/>
    </variableProvider>

    The variable provider name used by the REST statement is specified as "name" in the XML file.

    Save the XML file in the same directory as the JAR: 

    SILVERFABRIC_HOME/webapps/livecluster/deploy/config/variableProviders

    You can verify what variable providers are ready for use by 
    REST invocation on the TIBCO Silver Fabric Administrator > 
    Admin > Variables page.
    

    NoStart (Optional) The default value is false, meaning that the archives are both deployed and started by default. If NoStart is set to true, the application is deployed, but not started. -F "NoStart=true". This option works for 5.x versions of BusinessWorks.

    NoStop (Optional) The default value is false, meaning that running applications are stopped when a new archive is deployed. If NoStop is set to true, the application is not stopped when deployed. -F "NoStop=true". This option works for 5.x versions of BusinessWorks.