Before upgrading to UIPath 2022.10.1, I had a lot of processes in which I invoked different workflows depending on some conditions. I did this with a kind of dynamic call to these workflows, like this:
(“bej” is a string variable)
And had similar workflows with different names. After updating, I’m getting this error
Is there something I now need to do differently in order for that to work as it did before?
EDIT: I know I can work around this by nesting a bunch of ifs, I was just wondering if the change was intentional.
Thanks,
Matias
You might try to use an assign (testVar = “Login” + bej + “.xaml”) prior your invoke workflow file activity, and afterwards
Within the invoke workflow activity just pass the testVar.
It sounds strange, but sometimes it is worthy to separate the computation from the actual activity that you are using.
P.S. And do not forget to have the latest version of the used packages both within your workflow, and within your invoked workflow…
It’s weird, I can’t even debug the process. It throws out that error when validating the process and never starts, so I can’t really print out the path.
Try to invoke a file that is not on OneDrive.
Perhaps your windows security was also updated:
Antivirus policies that restrict PowerShell access may prevent the use of PowerShell-related activities. For example, you cannot use Invoke Workflow File and Invoke Power Shell when rule ID 6151 is enabled in McAfee Endpoint Security.
If you have persistence activities within your invoked file
When invoking a workflow, make sure it does not contain persistence activities. These should only be used in the main workflow.
Hey Marius,
Thanks for the tips. Here’s what I tried and how they turned out:
Using an absolute path didn’t work, it didn’t even register it as a full path, it thought it was a relative path so it threw this error:
And yes, the file exists in the folder in the right path with the right name. I’ve been working with dynamic paths before so I know they used to work.
I tried moving the file to a non-OneDrive folder and it still threw the same error.
3)I don’t have any antivirus installed so I doubt that could’ve caused it. I only have Windows Defender, and the workflow I’m trying to invoke isn’t PowerShell related, nor does it have persistence activities in it.
bej is just a dummy variable that I used to test this. It literally just contains “Bejerman” in it.
What’s interesting about this issue is that it’s not a runtime error. It throws out the exception after checking for validation errors, so I’m guessing something changed in the process with the latest Studio Update. Should I flag this as a potential bug?
Thanks,
Matias
I’m giving it a relative path. The invoke workflow activity only contains "Login " + bej + “.xaml”. The error shows where Studio is trying to find the workflow before even analyzing the variable “bej”.
The file is there and called “Login Bejerman”. The problem is that UIPath tries to find the file before even starting the process, so it fails because the variable is null at the moment.
Can you give some default value for the variable and if needed you can make the string as empty using an assign activity after starting execution And try …?