Skip to content

Commit

Permalink
Apama Analytics Builder block SDK for 10.7.0.32
Browse files Browse the repository at this point in the history
  • Loading branch information
ddfourni1 committed Apr 29, 2022
1 parent e97592c commit cc029cf
Show file tree
Hide file tree
Showing 49 changed files with 142 additions and 142 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This excludes the Analytics Framework 'CDP' file, which is provided in binary fo

## Analytics Builder version

This version of the SDK supports Analytics Builder 10.7.0. To make use of this, you will require an installation of Apama 10.5.4. If you do not already have access, then you can download the 'community' edition from <http://www.apamacommunity.com/downloads/> (shortly after the official Software AG release date).
This version of the SDK supports Analytics Builder 10.7.0. To make use of this, you will require an installation of Apama 10.5.4. If you do not already have access, then you can download the 'community' edition from <https://www.apamacommunity.com/downloads/> (shortly after the official Software AG release date).

Note that Analytics Builder requires your Cumulocity IoT tenant to be subscribed to an 'apama-ctrl' microservice. The 'apama-ctrl-starter' microservice offers only restricted functionality and does not support custom blocks.

Expand Down
Binary file modified block-api/framework/analyticsbuilder-framework.cdp
Binary file not shown.
Binary file modified block-api/framework/cumulocity-forward-events.cdp
Binary file not shown.
Binary file modified block-api/framework/cumulocity-inventoryLookup-events.cdp
Binary file not shown.
58 changes: 29 additions & 29 deletions bundles/AnalyticsBuilder.bnd
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<bundle name="Analytics Builder" type="monitorscript" singleton="true">
<version>
<id>10.7.0.25</id>
<date>2019-06-07</date>
<author>Software AG</author>
<comments/>
<!--
Copyright (c) 2019 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG Progress Software Corporation and/or its subsidiaries and affiliates. All rights reserved.
-->
</version>
<description>Support for building blocks</description>
<monitors>
<fileset dir="${ANALYTICS_BUILDER_SDK}/block-api/framework">
<include name="analyticsbuilder-framework.cdp"/>
</fileset>
</monitors>
<dependencies>
<dependency bundle-filename="JSONPlugin.bnd" catalog="${APAMA_HOME}/catalogs/bundles/"/>
<dependency bundle-filename="MemoryStore.bnd" catalog="${APAMA_HOME}/catalogs/bundles/"/>
<dependency bundle-filename="ScenarioService.bnd" catalog="${APAMA_HOME}/catalogs/bundles/"/>
<dependency bundle-filename="AnyExtractor.bnd" catalog="${APAMA_HOME}/catalogs/bundles/"/>
<dependency bundle-filename="Management.bnd" catalog="${APAMA_HOME}/catalogs/bundles/"/>
<dependency bundle-filename="HTTPClientConnectivityGenericEvents.bnd" catalog="${APAMA_HOME}/catalogs/bundles/"/>
<dependency bundle-filename="ConnectivityPlugins-Common.bnd" catalog="${APAMA_HOME}/catalogs/bundles/"/>
<dependency bundle-filename="AutomaticOnApplicationInitialized.bnd" catalog="${APAMA_HOME}/catalogs/bundles/"/>
</dependencies>
</bundle>
<?xml version="1.0" encoding="UTF-8"?>
<bundle name="Analytics Builder" type="monitorscript" singleton="true">
<version>
<id>10.7.0.32</id>
<date>2019-06-07</date>
<author>Software AG</author>
<comments/>
<!--
Copyright (c) 2019 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG Progress Software Corporation and/or its subsidiaries and affiliates. All rights reserved.
-->
</version>
<description>Support for building blocks</description>
<monitors>
<fileset dir="${ANALYTICS_BUILDER_SDK}/block-api/framework">
<include name="analyticsbuilder-framework.cdp"/>
</fileset>
</monitors>
<dependencies>
<dependency bundle-filename="JSONPlugin.bnd" catalog="${APAMA_HOME}/catalogs/bundles/"/>
<dependency bundle-filename="MemoryStore.bnd" catalog="${APAMA_HOME}/catalogs/bundles/"/>
<dependency bundle-filename="ScenarioService.bnd" catalog="${APAMA_HOME}/catalogs/bundles/"/>
<dependency bundle-filename="AnyExtractor.bnd" catalog="${APAMA_HOME}/catalogs/bundles/"/>
<dependency bundle-filename="Management.bnd" catalog="${APAMA_HOME}/catalogs/bundles/"/>
<dependency bundle-filename="HTTPClientConnectivityGenericEvents.bnd" catalog="${APAMA_HOME}/catalogs/bundles/"/>
<dependency bundle-filename="ConnectivityPlugins-Common.bnd" catalog="${APAMA_HOME}/catalogs/bundles/"/>
<dependency bundle-filename="AutomaticOnApplicationInitialized.bnd" catalog="${APAMA_HOME}/catalogs/bundles/"/>
</dependencies>
</bundle>
48 changes: 24 additions & 24 deletions bundles/CumulocityHelper.bnd
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<bundle name="Cumulocity Block Helpers" type="monitorscript" singleton="true">
<version>
<id>10.7.0.25</id>
<date>2020-06-29</date>
<author>Software AG</author>
<comments/>
<!--
Copyright (c) 2019-2020 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG Progress Software Corporation and/or its subsidiaries and affiliates. All rights reserved.
-->
</version>
<description>Support for Cumulocity input and output blocks</description>
<monitors>
<fileset dir="${ANALYTICS_BUILDER_SDK}/block-api/framework">
<include name="cumulocity-forward-events.cdp"/>
<include name="cumulocity-inventoryLookup-events.cdp"/>
</fileset>
</monitors>
<dependencies>
<dependency bundle-filename="AnalyticsBuilder.bnd" catalog="${ANALYTICS_BUILDER_SDK}/bundles/"/>
<dependency bundle-filename="Cumulocity Event Definitions.bnd" catalog="${APAMA_HOME}/catalogs/bundles/"/>
</dependencies>
</bundle>
<?xml version="1.0" encoding="UTF-8"?>
<bundle name="Cumulocity Block Helpers" type="monitorscript" singleton="true">
<version>
<id>10.7.0.32</id>
<date>2020-06-29</date>
<author>Software AG</author>
<comments/>
<!--
Copyright (c) 2019-2020 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG Progress Software Corporation and/or its subsidiaries and affiliates. All rights reserved.
-->
</version>
<description>Support for Cumulocity input and output blocks</description>
<monitors>
<fileset dir="${ANALYTICS_BUILDER_SDK}/block-api/framework">
<include name="cumulocity-forward-events.cdp"/>
<include name="cumulocity-inventoryLookup-events.cdp"/>
</fileset>
</monitors>
<dependencies>
<dependency bundle-filename="AnalyticsBuilder.bnd" catalog="${ANALYTICS_BUILDER_SDK}/bundles/"/>
<dependency bundle-filename="Cumulocity Event Definitions.bnd" catalog="${APAMA_HOME}/catalogs/bundles/"/>
</dependencies>
</bundle>
4 changes: 2 additions & 2 deletions doc/005-Intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Analytic models run in the Apama correlator, and are managed by the Analytics Bu

Blocks can be tested using the PySys test framework that is included in an Apama installation. In order to develop, test and package blocks, you will need a full installation of Apama.

Blocks are implemented in Apama's Event Processing Language (EPL). This guide assumes a working knowledge of EPL. Refer to the [Apama documentation on developing EPL applications](http://www.apamacommunity.com/documents/10.5.4.0/apama_10.5.4.0_webhelp/apama-webhelp/#page/apama-webhelp%2Fco-DevApaAppInEpl_how_this_book_is_organized.html) and the [API Reference for EPL (ApamaDoc)](http://www.apamacommunity.com/documents/10.5.4.0/apama_10.5.4.0_webhelp/ApamaDoc/index.html). This guide also assumes a working knowledge of the Analytics Builder data model. Refer to the [Apama Analytics Builder documentation](https://documentation.softwareag.com/onlinehelp/Rohan/Analytics_Builder/pab10-7-0/apama-pab-webhelp/index.html#page/apamaanalyticsbuilder-webhelp%2Fto-AnaBui_getting_started_with_apama_analytics_builder.html).
Blocks are implemented in Apama's Event Processing Language (EPL). This guide assumes a working knowledge of EPL. Refer to the [Apama documentation on developing EPL applications](https://documentation.softwareag.com/onlinehelp/Rohan/Apama/v10-5/apama10-5/apama-webhelp/index.html#page/apama-webhelp%2Fco-DevApaAppInEpl_how_this_book_is_organized.html) and the [API Reference for EPL (ApamaDoc)](https://documentation.softwareag.com/onlinehelp/Rohan/Apama/v10-5/apama10-5/ApamaDoc/index.html). This guide also assumes a working knowledge of the Analytics Builder data model. Refer to the [Apama Analytics Builder documentation](https://documentation.softwareag.com/onlinehelp/Rohan/Analytics_Builder/pab10-7-0/apama-pab-webhelp/index.html#page/apamaanalyticsbuilder-webhelp%2Fto-AnaBui_getting_started_with_apama_analytics_builder.html).

The Analytics Builder block SDK has branches in a GitHub repository. You need to download the appropriate release of the block SDK based on the version of the Cumulocity IoT tenant you are using. Refer to the [Releases](https://github.com/SoftwareAG/apama-analytics-builder-block-sdk/releases) page of the block SDK. The version of the block SDK should be compatible with the version of the Cumulocity IoT tenant.
The Analytics Builder block SDK has branches in a GitHub repository. You need to download the appropriate release of the block SDK based on the version of the Cumulocity IoT tenant you are using. Refer to the [Releases](https://github.com/SoftwareAG/apama-analytics-builder-block-sdk/releases) page of the block SDK. The version of the block SDK should be compatible with the version of the Cumulocity IoT tenant.

Blocks can range from very simple stateless functions to more complex logic. Blocks can make use of:

Expand Down
8 changes: 4 additions & 4 deletions doc/035-Testing.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Testing blocks

Blocks can be tested using the PySys testing framework. This is included in the Apama installation, along with extensions for using Apama with PySys. Built on top of the Apama extensions is a framework to test blocks. Refer to the [Apama Python API documentation](http://www.apamacommunity.com/documents/10.5.4.0/apama_10.7.0.0_webhelp/pydoc/).
Blocks can be tested using the PySys testing framework. This is included in the Apama installation, along with extensions for using Apama with PySys. Built on top of the Apama extensions is a framework to test blocks. Refer to the [Apama Python API documentation](https://documentation.softwareag.com/onlinehelp/Rohan/Apama/v10-5/apama10-5/pydoc/index.html).

The samples include tests. The `pysystestproject.xml` configuration relies on the environment variable `ANALYTICS_BUILDER_SDK` being set to the location of the block SDK using an absolute path. PySys tests should contain a `run.py` with a class that extends `apama.analyticsbuilder.basetest:AnalyticsBuilderBaseTest`. In the `execute` method of the test, start a correlator with the `self.startAnalyticsBuilderCorrelator()` method. This starts a correlator, injects the Analytics Builder framework into it, and returns a `CorrelatorHelper` object. Provide a `blockSourceDir` parameter with the path to the source of the blocks, typically within the project tree (use `self.project.SOURCE` from the supplied `pysysproject.xml` file). Then, create a model to test the block with the `self.createTestModel('<blockUnderTest>')` This results in a model being activated in the correlator with an input and output connected to every input and output of the block, and an identifier of the model is returned. The block can be exercised by sending events created by the `self.inputEvent` method, for a given block input identifier.
The samples include tests. The `pysystestproject.xml` configuration relies on the environment variable `ANALYTICS_BUILDER_SDK` being set to the location of the block SDK using an absolute path. PySys tests should contain a `run.py` with a class that extends `apama.analyticsbuilder.basetest:AnalyticsBuilderBaseTest`. In the `execute` method of the test, start a correlator with the `self.startAnalyticsBuilderCorrelator()` method. This starts a correlator, injects the Analytics Builder framework into it, and returns a `CorrelatorHelper` object. Provide a `blockSourceDir` parameter with the path to the source of the blocks, typically within the project tree (use `self.project.SOURCE` from the supplied `pysysproject.xml` file). Then, create a model to test the block with the `self.createTestModel('<blockUnderTest>')` This results in a model being activated in the correlator with an input and output connected to every input and output of the block, and an identifier of the model is returned. The block can be exercised by sending events created by the `self.inputEvent` method, for a given block input identifier.


Both `createTestModel` and `inputEvent` take an optional argument: `id` - an identifier of the model. If an identifier is not specified, `createModel` will use the identifiers `model_0` and upwards, and `inputEvent` will use `model_0` (that is, the first created model).
Both `createTestModel` and `inputEvent` take an optional argument: `id` - an identifier of the model. If an identifier is not specified, `createModel` will use the identifiers `model_0` and upwards, and `inputEvent` will use `model_0` (that is, the first created model).

`createTestModel` takes these arguments:

Expand All @@ -14,7 +14,7 @@ Both `createTestModel` and `inputEvent` take an optional argument: `id` - an ide
* `id` (optional) - identifier of the model
* `corr` (optional) - correlator to use; defaults to using the last correlator started by `startAnalyticsBuilderCorrelator`.
* `inputs` (optional) - a map of the types of inputs, from input identifier to the type of the input. If an input identifier is not specified, the input defaults to the 'float' type. If the value for the identifier is set to 'None; or an empty string, that input is not connected
* `wiring` (optional unless testing multiple blocks) - list of strings containing source block index, output port identifier, target block index, input port identifier separated by colons - e.g. `['0:timeWindow:1:window']`
* `wiring` (optional unless testing multiple blocks) - list of strings containing source block index, output port identifier, target block index, input port identifier separated by colons - e.g. `['0:timeWindow:1:window']`


The following methods can be used to check the output of the block is as expected:
Expand Down
4 changes: 2 additions & 2 deletions doc/apamadoc/apama/analyticsbuilder/ABConstants.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;
</TD><TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1"><A HREF="../..//apama/analyticsbuilder/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A></TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;
</TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT>&nbsp;
</A></TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1" WIDTH="100%" ALIGN="RIGHT"><FONT CLASS="NavBarFont1"><B>Apama Analytics Builder 10.7.0.25</B></FONT></TD>
</A></TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1" WIDTH="100%" ALIGN="RIGHT"><FONT CLASS="NavBarFont1"><B>Apama Analytics Builder 10.7.0.32</B></FONT></TD>
</TR>
</TABLE>
</TD><TD ALIGN="right" VALIGN="top" ROWSPAN="3"><EM></EM></TD>
Expand Down Expand Up @@ -121,7 +121,7 @@ <H3>MODEL_NAME_IDENTIFIER</H3>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;
</TD><TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1"><A HREF="../..//apama/analyticsbuilder/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A></TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;
</TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT>&nbsp;
</A></TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1" WIDTH="100%" ALIGN="RIGHT"><FONT CLASS="NavBarFont1"><B>Apama Analytics Builder 10.7.0.25</B></FONT></TD>
</A></TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1" WIDTH="100%" ALIGN="RIGHT"><FONT CLASS="NavBarFont1"><B>Apama Analytics Builder 10.7.0.32</B></FONT></TD>
</TR>
</TABLE>
</TD><TD ALIGN="right" VALIGN="top" ROWSPAN="3"><EM></EM></TD>
Expand Down
4 changes: 2 additions & 2 deletions doc/apamadoc/apama/analyticsbuilder/ActivateModel.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;
</TD><TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1"><A HREF="../..//apama/analyticsbuilder/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A></TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;
</TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT>&nbsp;
</A></TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1" WIDTH="100%" ALIGN="RIGHT"><FONT CLASS="NavBarFont1"><B>Apama Analytics Builder 10.7.0.25</B></FONT></TD>
</A></TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1" WIDTH="100%" ALIGN="RIGHT"><FONT CLASS="NavBarFont1"><B>Apama Analytics Builder 10.7.0.32</B></FONT></TD>
</TR>
</TABLE>
</TD><TD ALIGN="right" VALIGN="top" ROWSPAN="3"><EM></EM></TD>
Expand Down Expand Up @@ -86,7 +86,7 @@ <H3>modelId</H3>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;
</TD><TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1"><A HREF="../..//apama/analyticsbuilder/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A></TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;
</TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT>&nbsp;
</A></TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1" WIDTH="100%" ALIGN="RIGHT"><FONT CLASS="NavBarFont1"><B>Apama Analytics Builder 10.7.0.25</B></FONT></TD>
</A></TD><TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1" WIDTH="100%" ALIGN="RIGHT"><FONT CLASS="NavBarFont1"><B>Apama Analytics Builder 10.7.0.32</B></FONT></TD>
</TR>
</TABLE>
</TD><TD ALIGN="right" VALIGN="top" ROWSPAN="3"><EM></EM></TD>
Expand Down
Loading

0 comments on commit cc029cf

Please sign in to comment.