Creating Dynamic Types Generator Action

When using VRO Dynamic types with Dynamic Types Generator you may occasionally need to create an action to manually extract the required data.

It might not be immediately obvious what format that action needs to take. I found that by tracing the workflows through that the best action to use as an example is….

com.vmware.coe.http-rest/executeRequestJson

this action comes as a part of the Dynamic Types Generator Package.

Key things to not are types of Data passed and exactly what the return data is. It is the return data from the Rest Call in a specific format.

var properties = new Properties();
properties.put(“statusCode”, response.statusCode);
properties.put(“headers”, response.getAllHeaders());
properties.put(“contentLength”, response.contentLength);
properties.put(“requestFullUrl”, request.fullUrl);
properties.put(“contentAsString”, contentAsString);

The Action can contain whatever filtering you like, but you must honour the above format. In my scenario, I just a line to intercept the contentAsString and to filter it as was required.

Another word of caution, actions generated like this ARE NOT captured when performing a Dynamic Types Export. You need to manually add them to the package before continuing.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s