Custom element in camunda engine

Hello,
I created React frontend application with bpmn-js library. My backend is in spring boot with camunda starters. I setup frontend for create custom elements which are extend from ExclusiveGateway. On the left menu except standard bpmn elements user can choose custom elements with different icon apperance. When I add process to backend I have errors that it can’t be parsed by camunda engine.

This is my example process:
<bpmn:process id=“new_process” isExecutable=“true”>
<bpmn:startEvent id=“StartEvent” />
<custom:myCustomElement id=“Gateway_1” name=“My Custom Gateway” camunda:class=“com.example.MyCustomClass”>
bpmn:extensionElements
camunda:inputOutput
<camunda:inputParameter name=“customParameter”>Test</camunda:inputParameter> </camunda:inputOutput>
</bpmn:extensionElements>
</custom:myCustomElement>
<bpmn:endEvent id=“EndEvent” />
</bpmn:process>

I debug camunda engine andI found that camunda use saxParser to parse diagram and saxParser have table of expected elements for each element like bpmn:process. My custom element is inside process and exception is thrown. Any idea how to add expected element or disable this validation?

What would you expect the engine to do with this element – even if no exception would be thrown at parse time?

Remember that in BPMN, a gateway doesn’t make a decision, it simply evaluates already existing information.
Given that, how do you extend a [“True” vs “False” with a maximum of one “True”] (or alternatively: "If ___ Then ___ Else ___ ") evaluation?

I expect that this element will work like to ExclusiveGateway. Just on frontend it will looks different. And different executionListener will be execute for all custom objects

My elements will work the same as exclusiveGateway, just have different icon in frontend and user can add some custom inputParameters. For all custom elements different ExecutionListener will be execute to set logic for true or false comparation in sequenceflows.

The custom logic should be in a script or ExternalWorker before the gateway.

Instead of doing
IF SomeComplicatedFunction(Paramaters) > SomeOtherValue

Do something more like:

Script Task: SomeComplicatedFunction(Parameters)  --> X
Set Variable: SomeOtherValue --> Y
Gateway: IF X > Y

ok, it can be before gateway. But my problem is to deploy my process because of I can’t parse custom objects. How to solve this?

For extending Task elements, have a look at the Templates.

Camunda templates is for extending logic for standard bpmn elements. I have several custom elements which are extend from standard bpmn element.