C# Object as Process-variable with Lazy Properties using REST


I am using .NET to communicate with the Camunda REST-API. Implementing dynamic solutions is the core-focus. Clients need to be able to model a process and deploy it, making the back-end do all the work.

I am aware of the fact that using Java with the Camunda Library offers more functionality in terms of using properties of custom object. The reason I am not using this is because I need the functionality to deploy a process based on the BPMN file alone, instead of needing to create a ProcessApplication and deploy the corresponding .war file.

Correct me if im wrong:
When using an expression after the use of an XOR, properties of variables can be accessed. I imagine that this only works for actual Java-Objects, but i would like to create process variables as custom objects with REST.

First question: Is there a way to achieve this functionality?

The hierarchial structure of the objects needed can become quite large, and not all properties need to be loaded initially. Because of this i would like to load them lazy. This way, only when a getter is actually called, the property will hold a value. In these getters i would like to implement functionality for an API call, which returns the corresponding value.

Second question: Is Camunda able to handle this kind of code,created in C#, from a process created and initiated by a REST call?

I am very open to suggestions and other views regarding this, I have got the idea that I am missing out on something and I could use an extra pair of eyes.

Kind regards,