Class Reportable

java.lang.Object
com.thingworx.things.connected.reportable.Reportable

@ThingworxExtensionApiClass(since={8,4}) public class Reportable extends Object
  • Constructor Details

    • Reportable

      protected Reportable()
  • Method Details

    • EvaluateReporting

      @ThingworxExtensionApiMethod(since={8,4}) public boolean EvaluateReporting(String eventName, org.joda.time.DateTime eventTime, String source, String sourceProperty, InfoTable eventData) throws Exception
      Service Category:
      Service Description:
      Evaluates this Thing's Reporting status based on its strategy.
      Parameters:
      eventName - Name of the event - STRING
      eventTime - Time event is triggered - DATETIME
      source - Name of Thing that triggered event - STRING
      sourceProperty - Soure property - STRING
      eventData - Data used to evaluate presence - INFOTABLE

      This method evaluates if a Thing is reporting Then sets the Connectable read-only properties accordingly: "isReporting" = result of that call "reportingLastEvaluation" = new Date() after the call finished "reportingLastChange" = if isReporting changed, then lastEvaluationTime; otherwise unchanged
      Throws:
      Exception - if the Thing doesn't have the right Properties, Services, has a Strategy that does not refer to a visible Thing, if the service calls return invalid values, or other exceptional conditions
    • SetReportingStrategy

      @ThingworxExtensionApiMethod(since={8,4}) public void SetReportingStrategy(String strategyThing) throws Exception
      Service Category:
      Service Description:
      Set this Thing's reporting strategy.
      Parameters:
      strategyThing - Name of the Strategy Thing - THINGNAME

      This method sets the Strategy used for evaluating if a Reportable is indeed reporting
      Throws:
      Exception - if the Strategy Thing specified does not exist if the Strategy Thing specified does not extend from ReportingByConnection
    • GetReportingStrategy

      @ThingworxExtensionApiMethod(since={8,4}) public String GetReportingStrategy() throws InvalidRequestException
      Service Category:
      Service Description:
      Retrieves this Thing's reporting strategy.
      Returns:
      result Name of the Strategy Thing - STRING
      Throws:
      InvalidRequestException - If an error occurs

      A Strategy is a Thing that represents an algorithm to determine if a device is Reporting or not This service exposes the Strategy that this Thing uses for Reporting evaluation, which is stored in a config table