# Apama Extension for Visual Studio Code to develop/test Cumulocity EPL App

**URL:** <https://community.cumulocity.com/t/apama-extension-for-visual-studio-code-to-develop-test-cumulocity-epl-app/12499>\
**Category:** Forum\
**Tags:** Streaming-Analytics-Apama, analytics\
**Created:** [July 15, 2025, 11:43am UTC](https://community.cumulocity.com/t/apama-extension-for-visual-studio-code-to-develop-test-cumulocity-epl-app/12499 "2025-07-15T11:43:05Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christof\_Strack](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/christof_strack/32/30066_2.png) [@Christof\_Strack](https://community.cumulocity.com/u/Christof_Strack)\
**Post date:** [July 15, 2025, 11:43am UTC](https://community.cumulocity.com/t/apama-extension-for-visual-studio-code-to-develop-test-cumulocity-epl-app/12499/1 "2025-07-15T11:43:05Z")

</div>

Hi,

I took a look at the VS Code Extension for Apama, looked at the [Knowledge Article](https://community.cumulocity.com/t/introducing-the-new-apama-extension-for-vs-code/12315) and managed to:

1. install the extension
2. create a github project using the template **streaming-analytics-sample-repo-template**
3. started the devcontainer

My questions are:

1. Where do I specify to Cumulocity Tenant I want to connect?
2. After changing the epl code, what are the steps to test the changes? Restart the devcontainer?
3. Where do I see the correlator logs in the devcontainer?

Regards Christof

---

<div class="post-metadata">

**Author:** ![Ben\_Spiller](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/ben_spiller/32/30392_2.png) [@Ben\_Spiller](https://community.cumulocity.com/u/Ben_Spiller)\
**Post date:** [July 15, 2025, 12:00pm UTC](https://community.cumulocity.com/t/apama-extension-for-visual-studio-code-to-develop-test-cumulocity-epl-app/12499/2 "2025-07-15T12:00:10Z")

</div>

Hi Christof, it’s great to hear you’ve got the container setup.

The container comes with a checkout of the EPL Apps Tools ([GitHub - Cumulocity-IoT/apama-eplapps-tools: Tools for uploading and testing EPL Apps for Cumulocity Streaming Analytics (Apama)](https://github.com/Cumulocity-IoT/apama-eplapps-tools/tree/main)), documented at [EPL Apps Tools — EPL Apps Tools documentation](https://cumulocity-iot.github.io/apama-eplapps-tools/) so the next steps for testing and deploying would be follow those instructions - while benefitting from the EPL language support that the dev container gives you

---

<div class="post-metadata">

**Author:** ![Christof\_Strack](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/christof_strack/32/30066_2.png) [@Christof\_Strack](https://community.cumulocity.com/u/Christof_Strack)\
**Post date:** [July 15, 2025, 1:38pm UTC](https://community.cumulocity.com/t/apama-extension-for-visual-studio-code-to-develop-test-cumulocity-epl-app/12499/3 "2025-07-15T13:38:47Z")

</div>

Can I use the devcontainer to connect to a Cumulocity tenant as documented [here](https://cumulocity.com/apama/docs/latest/standard-connectivity-plugins/the-cumulocity-iot-transport-connectivity-plug-in/)?

---

<div class="post-metadata">

**Author:** ![Ben\_Spiller](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/ben_spiller/32/30392_2.png) [@Ben\_Spiller](https://community.cumulocity.com/u/Ben_Spiller)\
**Post date:** [July 15, 2025, 3:59pm UTC](https://community.cumulocity.com/t/apama-extension-for-visual-studio-code-to-develop-test-cumulocity-epl-app/12499/4 "2025-07-15T15:59:40Z")

</div>

Hi, just to confirm, you’re building an EPL app (not a custom microservice written in EPL)?

In that case I think what you need is the steps in [Using PySys to test your EPL apps — EPL Apps Tools documentation](https://cumulocity-iot.github.io/apama-eplapps-tools/using-pysys.html) to try out your EPL apps in a testcase. To configure the tenant details, see [GitHub - Cumulocity-IoT/streaming-analytics-sample-repo-template: This repo provides a template for developing Cumulocity Streaming Analytics assets such as Blocks and EPL Apps, with a dev container for opening in Visual Studio Code](https://github.com/Cumulocity-IoT/streaming-analytics-sample-repo-template?tab=readme-ov-file#cumulocity-cloud-operations). If you run it “locally” the correlator output will be in the test output dir. Even if you don’t bother to write any verify logic to start with, the approach of running it from a testcase is a good way to go.

You definintely wouldn’t restart the dev container - instead just run the pysys test within the container whenever you want to try things out.

You can also deploy the app to the cloud by running the commands shown in [Using the eplapp.py command line tool — EPL Apps Tools documentation](https://cumulocity-iot.github.io/apama-eplapps-tools/using-eplapp.html), in which case use the command line args mentioned in that topic to provide the tenant details.

Hope that helps, let us know if anything isn’t quite clear yet.

---

<div class="post-metadata">

**Author:** ![Harald\_Meyer](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/harald_meyer/32/1959_2.png) [@Harald\_Meyer](https://community.cumulocity.com/u/Harald_Meyer)\
**Post date:** [July 16, 2025, 7:28am UTC](https://community.cumulocity.com/t/apama-extension-for-visual-studio-code-to-develop-test-cumulocity-epl-app/12499/5 "2025-07-16T07:28:31Z")

</div>

@Christof_Strack once you get this to work, would be great to have a second article describing this workflow.

---

<div class="post-metadata">

**Author:** ![Christof\_Strack](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/christof_strack/32/30066_2.png) [@Christof\_Strack](https://community.cumulocity.com/u/Christof_Strack)\
**Post date:** [July 16, 2025, 10:59am UTC](https://community.cumulocity.com/t/apama-extension-for-visual-studio-code-to-develop-test-cumulocity-epl-app/12499/6 "2025-07-16T10:59:08Z")

</div>

I successfully added a connectivity plugin through the Apama Project View in VSCode.  
Now I want to configure the [properties](https://github.com/Cumulocity-IoT/apama-samples/blob/main/cumulocity/BasicSample/config/connectivity/CumulocityNotifications2.0/CumulocityIoTREST.properties) to connect to my tenant.  
The [template](https://github.com/Cumulocity-IoT/streaming-analytics-sample-repo-template?tab=readme-ov-file#cumulocity-cloud-operations) to uses a script `c8y-vars` to define the connection properties.

1. Question:Can I reference the env variables in my property file `config/connectivity/CumulocityRESTSupport/CumulocityIoTREST.properties`?

```auto
CUMULOCITY_USERNAME=${CUMULOCITY_USERNAME}

```

1. The [VS Code page](https://marketplace.visualstudio.com/items?itemName=ApamaCommunity.apama-extensions) mentions to run `correlator --config connectivity.yaml`.  
I did not find the file `connectivity.yaml`. Do I have to create this myself and what is the content for CumulocityIoTREST? Or is this created when the connectivity bundle is added?

---

<div class="post-metadata">

**Author:** ![Ben\_Spiller](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/ben_spiller/32/30392_2.png) [@Ben\_Spiller](https://community.cumulocity.com/u/Ben_Spiller)\
**Post date:** [July 16, 2025, 4:09pm UTC](https://community.cumulocity.com/t/apama-extension-for-visual-studio-code-to-develop-test-cumulocity-epl-app/12499/7 "2025-07-16T16:09:26Z")

</div>

I’m still not quite sure why you need the connectivity plugin - are you building an EPL app, or is it EPL in a custom Apama microservice?

1. No, for connectivity properties you’d need to put the required values into a .properties file, or on the correlator command line with -Dkey=value. Just remember don’t commit any file with a password to version control

2. connectivity.yaml is just a placeholder, so you’d need to point at whatever connectivity yaml files are in your project, which as you guessed are created when you add a connectivity bundle to the project

---

<div class="post-metadata">

**Author:** ![Christof\_Strack](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/christof_strack/32/30066_2.png) [@Christof\_Strack](https://community.cumulocity.com/u/Christof_Strack)\
**Post date:** [July 17, 2025, 3:04pm UTC](https://community.cumulocity.com/t/apama-extension-for-visual-studio-code-to-develop-test-cumulocity-epl-app/12499/8 "2025-07-17T15:04:26Z")

</div>

I realize I didn’t explain what I actually wanted to achieve clearly.

My goal is to test an EPL app, such as the sample app “Create an alarm if the value exceeds min/max,” locally.

I’m familiar with the Apama plugin in Eclipse, where I could:

1. Create an EPL app and add the Cumulocity Connectivity plugin
2. Configure the required parameters for a Cumulocity tenant
3. Run the EPL application locally

I’d like to replicate this experience as closely as possible using a devcontainer and the Apama Extension for Visual Studio Code.

I have the following resources:

1. [Apama VSCode extension](https://marketplace.visualstudio.com/items?itemName=ApamaCommunity.apama-extensions)
2. [streaming-analytics-sample-repo-template](https://github.com/Cumulocity-IoT/streaming-analytics-sample-repo-template)

I’m trying to determine how to connect these pieces to fill in the missing parts.

Is this approach feasible?

---

<div class="post-metadata">

**Author:** ![Ben\_Spiller](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/ben_spiller/32/30392_2.png) [@Ben\_Spiller](https://community.cumulocity.com/u/Ben_Spiller)\
**Post date:** [July 21, 2025, 10:36am UTC](https://community.cumulocity.com/t/apama-extension-for-visual-studio-code-to-develop-test-cumulocity-epl-app/12499/9 "2025-07-21T10:36:38Z")

</div>

Cool, so the question is how to do “local” testing of an EPL app.

I know this is different than what you were used to with eclipse, but currently the recommended approach for that would be to use PySys, as in [Using PySys to test your EPL apps — EPL Apps Tools documentation](https://cumulocity-iot.github.io/apama-eplapps-tools/using-pysys.html#testing-locally)

It doesn’t mean you have to write lots of testcases and validation logic up front, but using an actual test framework for starting your application gives you a simple and repeatable way it getting it running. And then if/when you do want to formalise your experiments into actual testcases you can stick with the same approach.

It also avoids us having two different ways of doing the same thing (i.e. starting up an EPL app locally) which feels a bit wasteful, and two different ways of configuring tenant options etc.

You can use a test like [apama-eplapps-tools/samples/TestLocalCorrelator at main · Cumulocity-IoT/apama-eplapps-tools · GitHub](https://github.com/Cumulocity-IoT/apama-eplapps-tools/tree/main/samples/TestLocalCorrelator) as a starting point, and provide your C8Y tenant options in [apama-eplapps-tools/samples/pysysproject.xml at main · Cumulocity-IoT/apama-eplapps-tools · GitHub](https://github.com/Cumulocity-IoT/apama-eplapps-tools/blob/main/samples/pysysproject.xml) (except for the password - use an env var for that to avoid a security risk). If you want you can even keep the test running until you press Enter by adding a Python `raw_input()` function call to the test.

This is a bit of a new workflow, so if any part is unclear let us know so we can improve the instructions.
