So I gave this a try and this is the error I received. I tried to log out ch.dunes.scripting.jsmodel.ExecutionContextObject when logging out System.getContext(); but I couldn't get any values. Perhaps if I could log that out I could see what values I could get? Here is the output from the scriptable task you provided as an example.
2024-12-17 08:19:06.593 -07:00debug__item_stack:/item1
2024-12-17 08:19:06.597 -07:00errorError in (Workflow:test context value / Scriptable task (item1)#12759) TypeError: Cannot find default value for object.
2024-12-17 08:19:06.606 -07:00errorWorkflow execution stack:
***
item: 'test context value/item1', state: 'failed', business state: 'null', exception: 'TypeError: Cannot find default value for object. (Workflow:test context value / Scriptable task (item1)#12759)'
workflow: 'test context value' (3c8a81e6-6455-4a80-bca9-4a35a83aa0ca)
| 'no inputs'
| 'no outputs'
| 'no attributes'
*** End of execution stack.