# How to check if the event was created

**URL:** <https://community.cumulocity.com/t/how-to-check-if-the-event-was-created/2054>\
**Category:** Forum\
**Tags:** Streaming-Analytics-Apama, cumulocity\
**Created:** [January 18, 2024, 10:26am UTC](https://community.cumulocity.com/t/how-to-check-if-the-event-was-created/2054 "2024-01-18T10:26:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabriele.chiossi](https://avatars.discourse-cdn.com/v4/letter/g/7ea924/32.png) [@gabriele.chiossi](https://community.cumulocity.com/u/gabriele.chiossi)\
**Post date:** [January 18, 2024, 10:26am UTC](https://community.cumulocity.com/t/how-to-check-if-the-event-was-created/2054/1 "2024-01-18T10:26:14Z")

</div>

Hello everyone,

I am in the process of creating an event using the following code:

```auto
Event emailInfos := new Event;
emailInfos.params.add("message", emailText);
emailInfos.params.add("newAlarm", newAlarms);
emailInfos.params.add("childDeviceId", source);
send emailInfos to "emailServer";

```

After initiating this event, I would like to confirm its successful creation. Despite checking on the Events page, I am unable to locate it. Is there a way to obtain a return value or confirmation to ascertain whether the event was created successfully or not?

Thank you in advance for your assistance.

---

<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:** [January 18, 2024, 10:40am UTC](https://community.cumulocity.com/t/how-to-check-if-the-event-was-created/2054/2 "2024-01-18T10:40:24Z")

</div>

Hi Gabriele,

this just sends the event to the “emailServer” channel in Apama. If you want it stored in C8Y, you have to send it to the Event.SEND\_CHANNEL channel.

---

<div class="post-metadata">

**Author:** ![gabriele.chiossi](https://avatars.discourse-cdn.com/v4/letter/g/7ea924/32.png) [@gabriele.chiossi](https://community.cumulocity.com/u/gabriele.chiossi)\
**Post date:** [January 18, 2024, 10:53am UTC](https://community.cumulocity.com/t/how-to-check-if-the-event-was-created/2054/3 "2024-01-18T10:53:00Z")

</div>

Yes, then from another EPL I am trying to read the Event like this:

```auto
action onload {
		monitor.subscribe("emailServer");

		log ("Inside the email aggregator");

		on all Event(type="emailServer") as e {
			log "ME " + e.toString();
			collctedEmail.append(e);
		}
 }

```

But nothing is found, do you know why?

---

<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:** [January 18, 2024, 11:08am UTC](https://community.cumulocity.com/t/how-to-check-if-the-event-was-created/2054/4 "2024-01-18T11:08:03Z")

</div>

In the code above, you are not setting the “type” but here you are filtering on “type”. Maybe that is the issue?

---

<div class="post-metadata">

**Author:** ![gabriele.chiossi](https://avatars.discourse-cdn.com/v4/letter/g/7ea924/32.png) [@gabriele.chiossi](https://community.cumulocity.com/u/gabriele.chiossi)\
**Post date:** [January 18, 2024, 11:22am UTC](https://community.cumulocity.com/t/how-to-check-if-the-event-was-created/2054/5 "2024-01-18T11:22:10Z")

</div>

What I want to do is listen for event “emailServer” only.  
For some reason it can’t find it though.

---

<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:** [January 18, 2024, 11:55am UTC](https://community.cumulocity.com/t/how-to-check-if-the-event-was-created/2054/6 "2024-01-18T11:55:27Z")

</div>

ok, but type is not the same as channel. If you want to use that as a filter criterion, you also have to set it:

```auto
Event emailInfos := new Event;
emailInfos.type := "emailServer";
emailInfos.params.add("message", emailText);
emailInfos.params.add("newAlarm", newAlarms);
emailInfos.params.add("childDeviceId", source);
send emailInfos to "emailServer";

```

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [July 16, 2024, 11:56am UTC](https://community.cumulocity.com/t/how-to-check-if-the-event-was-created/2054/7 "2024-07-16T11:56:20Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
