How We Did it Last Time

To recollect our test project from the previous article: if the incoming JSON request has a “userid” field with a value, then pass the request downstream as is; otherwise, inject the value “anonymous” into the field. E.g., this request

{
"id":1234
}

will need to be updated to become

{
"userid":"anonymous",
"id":1234
}

To achieve that, we converted the JSON payload into XML, and then the resulting logic looked (if we get rid of OSB specifics) as: