Aggregate all Input Parameter values from a function to, for example, a JSON String?

Does anyone know a way to automatically (with a command or integration) aggregate all Input Parameter's values from a function to for example a JSON String?

We want to use this to make the error handling easier (copy past a set of activities) and make sure developers never forget adding them manually. Also remote developers might not always know what input parameters to a function are crucial.

Right now we concatenate them 'manually' in a string, or if they are structures use the JSON serialize action. 

As sometimes there are just to many input fields and/or structures developers tend to skip some.

I know this set of data has to be available in Outsystems engine 'under the hood' but are they exposed somewhere with a system function/command? Or can we get a hook on it by using some c# code?

It would be of great added benefit.

WHy not use these widgets?

Behavioral wrote:

WHy not use these widgets?

But do they automatically capture all input parameters at once? And would that be copy-pastable to another function without modification?


It serizalise and deserialize outsystems record/recordlist from/to json.

If the input of that type, i think u can benefit that standar json type.

regards

In my project i use it to save all data with different data types for audit trail purpose.

regards

Behavioral wrote:

In my project i use it to save all data with different data types for audit trail purpose.

regards

Thanks for your reply, but I know how to serialize to and from JSON, 

My question was about collecting all input variables at once, with a single command, without knowing what they are (so that it is re-usable in any function no matter the difference in input parameters)



in you case, i would create an input parameter of type JSON - that includes all input parameters.

Or can u give an example?

regards 

Behavioral wrote:

in you case, i would create an input parameter of type JSON - that includes all input parameters.

Or can u give an example?

regards 

The case is 'all cases' i want this function to be re-usable in all other functions in all other projects.

Let me rephrase: i want a system command that gives me all input variables at once so i can store them for troubleshooting/error-handling without doing any manual work other then copying in those generic actions, since they are generic i can just copy paste them over. The important thing here is that they are generic and do not require any other work then just a copy paste.


Hi Daniel,

Unfortunately this is not possible. OutSystems does not offer variable parameters or serializing more than a single variable.

Hi Daniel,

May be u can create exension if yours is .Net stack:

https://stackoverflow.com/questions/214086/how-can-you-get-the-names-of-method-parameters

regards


@Behavioral: that's no good, that only works for the .NET function you are executing, not for the Action calling it.

Ok Thank you Sir,

regards