Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Troubles with custom events

Avatar

Former Community Member

Background:

8.2 version

I'm trying to throw/receive a custom event but nothing is working for the receive to work. Below is the event information.

I create a process that throws the event. I create another process that has the event as, I have tried both Start point and Receive. It will not trap no matter what I do. How do I debug this?

Cheers,

Event:

Asynchronous

Event Data Template:

<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://www.ec.gc.ca/xsd/SampleData/" elementFormDefault="qualified" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.ec.gc.ca/xsd/SampleData/">
    <element name="SendEmail">

    <complexType >
        <all>
            <element name="EmailTo" type="string" />
            <element name="EmailFrom" type="string" />
            <element name="EmailSubject" type="string" />
            <element name="EmailCC" type="string" />
            <element name="EmailBCC" type="string" />
            <element name="EmailBody" type="string" />
        </all>
    </complexType>
    </element>
</schema>

5 Replies

Avatar

Level 10

I would test with the Start Point. This will ensure that it's listening for the event.

Are you using any filter on your Start Point?

Any errors in the application server log?

Jasmin

Avatar

Former Community Member

Thank you for the quick reply.

I'm getting this in the log file:

deliverNotificationToService
SEVERE: Notification could not be delivered to registered subscriber. Reason: Template object: STRT_ER1271876090599 not found.

What template is it referring to?

Avatar

Former Community Member

I found the issue.

On the Recieve side, the variables are of type xml. I was assigning the individual nodes from the source to the destination, but it would seem that the JBOSS (JAVA) needs to have Value type variables. I changed the recieve variables to strings and it is working fine.

So it would seem that complex types cannot be trapped from events, or that is it not as simple to do.

Avatar

Level 10

You can pass xml as part of you event message.

Jasmin

Avatar

Level 1

Hi Jasmin,

I have a custom event set up with a schema for the message as well as the main event. When I dispatch the event, the listener event I have set up does not receive the message body and I get an adobe.workflow.template.document.TemplateNodeNotFoundException: Template object ER1319221392779 not found.

The event thrower is using a schema for the message body and the event receiver also uses an INPUT variable of type xml set to the same schema.

Any idea what I'm doing wrong?

Thanks,

Jack