How to retrieve Non-persistant data?

0
HI I have my data in json file.I have created a json file and have done import mapping to create an entity in Non persistent database .So now I have my data in a non-persistant database .I want to retrieve this Non-persistant data in my microflow .How can I get my data in my microflow?  Thanks in Advance.
asked
2 answers
5

Hi,

Some background information: non-persistent entities are not stored in the actual database, but that data only lives in the session as variables. Using non-persistent entities is a best-practice for importing stuff, as you can first check all imported data before inserting in the database, so you are on the right track!

To do something with the non-persistent objects in your microflow, you can use the return variable from the actual import mapping and, if needed, retrieve other objects over association.

 

 

answered
2

Hi,

The import action in your microflow should return an object (typically, this object is called Root and is the top object in your JSON structure and Import mapping).  Using this object, you can retrieve via Association all related objects.  Note that when retrieving via Association, you can only retrieve using a single association step, not multiple steps.  So if you have a database structure that is 3 or 4 levels deep, you'll have to retrieve each level in a single retrieve action.  In other words, if your database structure looks like this

And PurchaseOrder is the object you get from the Import action, in order to retrieve PaymentTerms, you would need to create one retrieve action to get Header object, and then use the Header object in another retrieve action to get PaymentTerms.

Hope that helps,

Mike

answered