Working with Sample Projects

To understand how TIBCO ActiveMatrix BusinessWorks Plug-in for OSIsoft PI System works, you can run the sample projects packaged with the installer, which are located in the TIBCO_HOME/bw/palettes/pi/version/samples directory.

The BigData Sample Project

The BigData sample project demonstrates the sending of PI tag change events to a Hadoop Distributed File System (HDFS) by using the OSIsoft PI system plug-in and the Big Data plug-in. The Big Data plug-in of version 6.2 is supported.

Note: To run the processes in the BigData sample project, you must install TIBCO ActiveMatrix BusinessWorks™ Plug-in for Big Data and configure the parameters.
The BigData sample project contains the following processes, and each process corresponds to a task:
  • createschema.bwp

    Run this process first to create the schema for uploading data to the Big Data server.

  • ErrorHandler.bwp

    This process is run automatically to check the errors when creating schema. You are not required to run it.

  • tagchanges.bwp

    This process uses the AF TagEventListener activity to monitor and query tag changes.

The Example_AF Sample Project

The Example_AF sample project demonstrates the usage of the AF Server connection and the AF activities.

Note: You must configure the OSIsoft PI System AF connection correctly to run the PIAF process.
The Example_AF sample project contains one process, that is PIAF.bwp, which shows how to use the AF activities to:
  • Create and modify tags.
  • Retrieve tag definitions.
  • Set tag values.
  • Retrieve tag values, including the latest tag value, the archival value with a specified timestamp, the historical values within a specified time range, and a specified number of historical values.

The Example_JDBC Sample Project

The Example_JDBC sample project demonstrates the usage of the JDBC connection and the JDBC Query activity.

Note: You must configure the OSIsoft PI System JDBC connection correctly to run the processes in the Example_JDBC sample project.
The Example_JDBC sample project contains the following processes, and each process corresponds to a task:
  • getArcvalues.bwp

    This process shows how to use the JDBC Query activity to get a specified number of historical tag values within a specified time range.

  • getSnapshot.bwp

    This process shows how to use the JDBC Query activity to get the latest tag value.

  • getTagDefinition.bwp

    This process shows how to use the JDBC Query activity to get tag definitions.

  • PIJDBC.bwp

    This process shows how to use the JDBC Query activity to:

    • Get tag definitions.
    • Get the latest tag value.
    • Get the historical tag values within a specified time range.