Blocks may be written in any text editor, but for a more convenient development experience you may wish to try the Apama extension for Visual Studio Code. This provides features such as syntax highlighting and problem markers to quickly identify any errors in your block code. Note that this extension is maintained by the community on a best-effort basis, and is not a supported product.
See the extension’s documentation for details of how to get it installed (including the steps for running Visual Studio Code on Windows using the Apama installation packages for Linux).
To use the extension for block development you need to create an Apama project for your blocks, and add the bundle which makes available the same EPL APIs that will be used when your blocks are deployed to Cumulocity. To do this:
dev
package. If you have Docker available, you might instead run the following commands from within a builder
container image, or use the dev container at https://github.com/Cumulocity-IoT/cumulocity-analytics-vsc-devcontainer/git clone
) this SDK. We recommend ensuring the directory is named apama-analytics-builder-block-sdk
(i.e. the same as the repository, without any extra version number).apama_project create my-block-project
cd my-block-project
apama_project add bundle ../apama-analytics-builder-block-sdk/bundles/AnalyticsBuilder.bnd
../apama-analytics-builder-block-sdk/bundles/CumulocityHelper.bnd
For trying out your blocks and testing that they work correctly, we recommend the PySys test framework (which is included in the Apama installation). See Testing blocks.
< Prev: Introduction | Contents | Next: Basic blocks > |