Customizable CamSDK.Client?


As far as i see from the documentation and the examples, the Forms SDK uses restful connections to the server in order to move data between the browser and the server.
Is it possible to configure the Client to use another middle layer?
Or is it there any mechanism that allows the extension of the Client object?
We have our own middle layer that transports data back and forth between the front end (browser-javascript) and the back end (our server-java).


Hi Cristian,

could you explain in a bit more detail what you refer to as another middle layer is it a javascript implementation of ajax requests?


Hi Askar,

And thank you for your reply.

It’s a javascript-java bridge based on XMLHttRequests and json-rpc. The front end part is implemented in javascript.
We have a product which is used in browser. Our server serves the pages and uses the above bridge to transport data between front-end and back-end. We want to use the Form SDK in our pages, but we must avoid that each and every client/browser accesses the Camunda server. That’s why the idea of overwriting Form SDKs Client so that it uses our bridge.
The data flow will be then:
browser <–our_bridge–> our server <–webservice–> camunda server.
By the way: we’ll use the Stand Alone Engine architecture.


Another solution I see, is to use a path to our server when configuring the Client.
Afterwards we just have to implement the required interface on our system.

Hi @criss,

I think the easiest way to solve the problem of your FE isolation from “real engine”, is implementing a proxy pass to your custom implementation of Java Middleware. I am not sure if this is a suitable option for you, since you write that your solution is js based. I am not aware of any way to intercept XHR requests and reroute them.

You could of course just provide your own implementation of CamSDK client library and replace original with it in Camunda webapps.

I hope that helps,

Hi @criss,

If you don’t want to touch the CamSDK, you can use some proxy in front of Camunda (like NGINX), which would route the request to Camunda REST to your Middleware transparently as long as the Middleware implements the Camunda REST API in compatible way. With the NGINX you can do that flexibly for only some REST end points so you can start with all requests going to Camunda directly and gradually replace them with your own.

So it would be:
Your JS --> CamSDK --REST–> NGINX --> Middleware --> Camunda

1 Like

Hi Askar, Lukas,

I’ll try this:

  • serve the resources (CamSDK js and jquery plus whatever other dependencies) from our server
  • implement a proxy pass on our server (we have tomcats with an apache in front of them) to proxy any request for “/engine-rest” to the camunda server.
    Let’s see how it works…
1 Like

Hi there,

I’m again on the forum, so I thought I should leave an update to this.
The soluton described above (plus a few cors headers) worked like a charm.