When configuring a custom Service-Task i prefer to use camunda’s Input / Output Parameters. I realized, that in most cases i don’t really need the Input-Parameters to be persisted. Is it possible to declare (within my BPMN) that certain Input-Parameters shall be transient ones?
I know that i can use Field-Injections instead, but than i end up spreading the required Servie-Task-Inputs as Field-Injections (if no persistence is needed) and Input-Parameters (if persistence is required).
I don’t think this is possible. input and out parameters will always create a regular variable. There isn’t any way i know of that you could make it transient.
It would prob be a good feature request for Camunda to expose the Variables class in the EL Resolver so expressions can access the org.camunda.bpm.engine.variable.Variables static methods
@StephenOTT thanks, your suggestion worked for us while not using Modeler-Templates.
Now as we started to define custom Modeler-Templates for our Service-Tasks we ran into the next issue unfortunately.
It seems like your suggested approach doesn’t go well with the template rules, since camunda:executionListener only accepts the property type Hidden so it cannot have user input.
We also tried to use camunda:executionListener to create the transient variable first and camunda:inputParameter to set it’s value, but this fails with:
org.camunda.bpm.engine.ProcessEngineException: ENGINE-17006 Cannot set transient variable with name my_transient_var to non-transient variable and vice versa.
We’ve implemented a custom Service-Task which validates certain files. Our Validator can be equipped with several parameters that can affect the validation process. We want to expose those parameters to be configurable inside Camunda’s Modeler in a user-friendly manner. Hence the template.
We don’t want to persist the parameters and that’s why we were looking into transient variables.
So basically we want Template-Properties to be only available to the JavaDelegate so that we don’t clutter the Database with unnecessary variables.