- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2024 03:04 AM
I am rebuilding an old Workflow Activity. The WF activity used to run and read the Workflow Scratchpad to store data and use that in processing via an external Script.
I have reworked this via 2 methods for Flow Designer, but at the moment both are using a custom table which I'd prefer to eliminate.
I can see from the Flow Action that the running version resides in sys_flow_context, and the data in the variables can be read from sys_flow_value (does need an ACL change to let me check - but easy to address)
What I need to do is, from within my Flow Action is to call a Script Include and pass the sys_id of this now running flow_engine_context record.
eg:
new ScriptIncludeName().doSomething(fd_data.sys_id)
new ScriptIncludeName().doSomething(current.sys_id)
In a Script Step in a Flow Action, I am constantly getting fd_data is undefined, current is always null, this.sys_id = null
Anyone got any ideas on how to do this
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2024 07:50 AM
So, to get the ID of the current context (probably bad phrasing on my behalf)
var contextId = FlowScriptAPI.getContextID();
return contextId;
This allows me to get the ID of the running script action from a Script Include to do what I require
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2024 03:46 AM
Hi @poyntzj ,
Follow the images that I have attached,
Let me know if you any doubts and if you find this is useful don't forget to accept solutions.
Thanks,
Lithesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2024 07:51 AM
That is fine within the confine of the Flow or Script action,. but not if I want to do something with the flow from an external process such as a Script Include - which I do
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2024 07:50 AM
So, to get the ID of the current context (probably bad phrasing on my behalf)
var contextId = FlowScriptAPI.getContextID();
return contextId;
This allows me to get the ID of the running script action from a Script Include to do what I require