Use return tag and with the help of this you can pass variables to the parent workflow. You can do it though UI or can add it directly to the XML also.
@DivyaL_7 Check this Community Article: https://community.sailpoint.com/t5/Technical-White-Papers/Workflows/ta-p/72077. Page 40/41. It explains what is return tag and how you can use it. Document is old, but approach still holds true. Also, check existing LCM Provisioning (Parent workflow) and child workflow like: Identity Request Initialize to understand how are they managing return variables.
Note: Found a fix?Help the community by marking the comment as solution. Feel free to react(,, etc.)with an emoji to show your appreciation or message me directly if your problem requires a deeper dive.
I’m using the Return tag the way you mentioned but i have a problem the VariableX that is supposed to be sent to the parent workflow gets ovewritten by Parent workflow i think because i logged the variable on the subprocess workflow and it had the right value but in the parentworkflow it does get overwritten does anyone know why?
You’re using <Return name="project" to="project"/> to return the variable to the parent workflow and it is still getting overwritten? Are you able to log the variable in the parent to confirm?
We had a similar case where we implemented this by storing the values in the wfContext. It works. You can use wfContext.setVariable(“manualWorkItemsOnlyNewAccount”, true); wherever you need to set the value. Then configure the argument passing so the value flows between parent and child workflows in the steps you require.
So in the parentWorkflow the value of VariableX is always false, but in the subProcessWorkflow it is true..
Also just so i’m sure that the error is not coming from using boolean values i switched VariableX to a string “Activate” but it is still the same scenario the value of VariableX doesn’t get sent to the parent workflow either in string form or boolean form
We had a similar case where we implemented this by storing the values in the wfContext. It works. You can use wfContext.setVariable(“manualWorkItemsOnlyNewAccount”, true); wherever you need to set the value. Then configure the argument passing so the value flows between parent and child workflows in the steps you require.
I tried it but the resultVariable sets the variable in the subprocess workflow but i still have the same problem where in the parent workflow the value is not sent and is null…
I tried it but still not working.. I don’t think using an <Arg> is appropriate here, since arguments are passed from the parent workflow to the child workflow.
What I actually need is the opposite: I set the value in the child workflow using wfcontext.setVariable(...), and then I want to retrieve that value in the parent workflow so i can use it to transition to another step..
@DivyaL_7 I tested this with a simple sample workflow and if i return a variable from child workflow to parent workflow, then value from child WF is available in the parent wf. Please check the attached workflow and rule and see if you have configured in the same way.
Apologies, you need to put the value into the workflow object, not the wfcontext. It’s returning values for sub workflows and parent workflows. Here it is: if you don’t put the value in the workflow object, the value won’t be set in the sub workflow.