- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2022 08:18 AM
Hi I have a requirement where i have to associate 2 RITM in one Request . i have put that code in the run the run script of the workflow .
and in the same script i have added to the code to copy all the variables from the old RITM to the new one and workflow for new RITM starts as configured in catalog item(i.e another workflow for new RITM)
Till here everything is working fine
- i am able to create new RITM and associate all the variables to it
- The workflow is launched successfully and new RITM flow is fine.
But when i am able to access the variable in the second workflow using current.variables.<variablename> it is giving un defined . and for all the variables .i have checked all the variables entry in the mtom table and it is having all the values of the variables .
please suggest if i am missing something . how does current.variables.<variablename> works ?? and why i am not able to get the value of the variable using this in the workflow.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2022 02:37 AM
I Have added a timer with 10Sec before creation of first task in child RITM workflow. Now i am able to use current.variables is working fine. Thank you for your reply @asifnoor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2022 08:42 AM
Hi,
may be by the time your 2nd wf is triggered the variables are not copied to the ritm yet. I suggest you trigger the wf from the script after the 2nd ritm is created and variables are copied.
For this, you might have to copy your exiting flow as new and under properties, conditions-> select manual. Then in your WF run scirpt activity, trigger the flow
var wflw = new Workflow();
wflw.startFlow(wflw.getWorkflowFromName('give the workflow name'), ritm, 'insert');
Mark the comment as a correct answer and also helpful if this has answered the question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2022 02:37 AM
I Have added a timer with 10Sec before creation of first task in child RITM workflow. Now i am able to use current.variables is working fine. Thank you for your reply @asifnoor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2023 02:07 AM - edited 05-26-2023 02:09 AM
OMG are you kidding me!? I've spent the last 3 hours trying to troubleshoot an issue where the variables did not have data when called from a workflow step, but were discoverable from a background script and would work elsewhere in the workflow.
I added a 1 second timer right before the step with the problematic script using the variables and the script ran perfectly after that.
Well, thank you 1 year later almost to the exact date!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2023 10:31 AM
We've got a similar situation here today.
In The workflow notification, the To Script will output the variable info.
In the body section, I call an email script.
In the email script I am trying to pull the same variable data that I can see in the To Script above.
For whatever reason, the email script bombs when trying to get the variable info
I added a 5 second timer in the workflow just before the email notification activity. Still nothing.
I can however, pull the variable data from a background script. WTH????