How to save/retrieve data model variables in script or service tasks?

cancel
Showing results for 
Search instead for 
Did you mean: 
mathewsmotta
Customer

How to save/retrieve data model variables in script or service tasks?

Hello all,

 

We're currently trying to save some data in an external database using data models. We've been successful in doing so with a simple form and Store entity task.

 

However, our use case is a bit more complex - the process requests calculation results from an external source through REST and we want to store the response of this request in a data model (instance? variable?) instead of a process variable. This way we could keep using the store task mapping the variables (doing so like resultJson.prop1, resultJson.prop2)

 

Is there a way to achieve this?

 

We also noticed that after a store task, the data model variable .getEntity() returns null - is that expected?