cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Scripting in SCP Workflow Cloud Foundry

vbalko-claimate
Active Contributor
0 Likes
2,108

Hello,

I am manipulating data in a script task in SCP Workflow on Cloud Foundry.

I got object stored in the context

$.context.myObj = {
                    key1: val1,
                    key2: val2,
                    key3: val3
};

Now I try to handle that object as a standard JS object

Object.keys($.context.myObj).forEach(.....)

I got an error

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

Where can I find the specification of that special kind of object and how to handle them? Is there some specification, documentation or at least some information (beside that standard docu)

View Entire Topic
Yogananda
Product and Topic Expert
Product and Topic Expert
0 Likes
vbalko-claimate
Active Contributor
0 Likes

Thanks yoganandamuthaiah,

I checked the links, but I would probably need more guiding in these.

I didnt found anything usefull in github link - just error in ancient nodejs version, which was corrected. But no goodies for me.

Stackoverflow - as usually - is full of guidance, but in this case, all solutions seems to me overcomplicated - to create huge function just to access objects members?

It has to be better way. It is pitty, that try fail method in this case is extremly time consuming. For every try I have to build, deploy and start wf again. 3 - 5 minutes per cycle. Also no console - just helper variables in context.

Does anybody know how to polish scripts in WF?