Expand my Community achievements bar.

Custom Event Not Working

Avatar

Former Community Member

Hi,

     I have created a custom event named MyCustomEvent with xsd definition,

            <?xml version="1.0" encoding="UTF-8"?>
            <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
            <xs:element name="error">
             <xs:complexType>
              <xs:sequence>
                <xs:element name="FaultMessage" type="xs:string"/>
                <xs:element name="FaultCode" type="xs:string"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>

When I get some error from my custom Database component I am setting up the data for this event and throwing it but my orchestration which is responsible for receiving this event notification is never getting invoked.Any clues what could be the reason? Am I doing something wrong?

Thanks,

Vikram

4 Replies

Avatar

Level 10

You know you can just use the built-in Exception start point to catch exceptions coming from the JDBC service?

Jasmin

Avatar

Former Community Member

Yes Jasmin, I am aware of that.

But I am not reallly looking at exceptions. We have writting a custom component to execute Stored Procedures and depending on the error Code ( some numeruc value)  on Stored Procedure. I have to invoke some workflow. So whatever return values that I receive from stored procedure I use them to setup the event variables and then throw that event.

Avatar

Level 10

Are you using Workbench ES (8.*) ?

Because I faced a similar problem like this. When you create a event type, you will choose the schema by clicking on the browse button.

If you look into the Schema box, you will find some misleading characters prefixed with the schema.

You have to manually remove these characters to make you event to be received properly.

Nith

event.PNG

Avatar

Former Community Member

Hi Nith,

I have managed to resolve this issue now. There was something wrong with my schema definition.

I deleted my event and created a new one and its working fine now.

Thanks for your help.

Kind regards,

Vikram