Skip to Content
Nov 02, 2020 at 10:46 AM

Dynamic Property access in SAP Workflow Service (neo)


Hi all,
is it possible to dynamically access object properties in a script task in SAP Workflow Service (Neo)?

Lets assume the following JSON Context for the workflow instance


And I like to create a new property for that object, whereas the name of the property needs to be dynamic. In pure JS I would do something like Object[varsSomeProperty].

var sMyProperty = "SomeProperty";
myObject[sMyProperty] = {};

When I try to do this in the Workflow Service I get the following error:

TypeError: [object ContextObject] is not an Object in <eval> at line number 17