I am getting this error when trying to run/ test my process in UiPath Studio
Error ERROR Validation Error The activity delegate with Handler ‘Udtræk tilknyttede devices på medarbejder, opdater mail og send mail til medarbejder. Opdater Excel rapport’ cannot be referenced by activity ‘For Each’ because the latter is not in the implementation of activity ‘DynamicActivity’. An activity delegate can only be referenced by the implementation of an activity which specifies that activity delegate as a child or import. The activity delegate with Handler ‘Udtræk tilknyttede devices på medarbejder, opdater mail og send mail til medarbejder. Opdater Excel rapport’ is declared by activity ‘For Each’. Loop - Copy (1).xaml
I have an Invoke Workflow File inside my for-each loop where the error is coming from. Any idea what might cause this error?
UiPath may occur when you try to invoke a workflow that contains activities that require a scope (such as browser or application scope) without providing the scope. This may cause the invoked workflow to fail and throw an exception.
To fix this error, you have a few options:
• You can add the scoped activity inside the invoked workflow instead of outside it. This way, the scope will be available for all the activities inside the invoked workflow
Check out the thread
• You can use arguments to pass the scope from the main workflow to the invoked workflow.
EX : If you have a browser scope in your main workflow, you can create an argument of type UiPath.Core.Browser and assign it to BrowserScope.BrowserElement property. Then, you can pass this argument to your invoked workflow and use it for your activities that require a browser scope.
Thank you so much for your swift response. I am not sure I quite follow you excatly.
In my process, I have multiple Invoke Workflow File, they are all passing successfully except one Invoke Workflow File activity. I can see, it might be some of the Import Arguments that might fail?
if you are on latest UiPath version…currently invoke workflow activity supports only relative paths which can be obtained by clicking the folder icon and selecting the xaml…If youa re trying to invoke any xaml outside the project folder it might not be possible as well
And as per the screenshot we can see that the path provided in the invoke workflow is either wrong or is not inside the same project
If you want to invoke some other xaml in another project then instead you have to use invoke process
Doing a relative path fixed the issue with the Invoke Workflow File having a wrong path, I don’t recall this being a problem with later versions of UiPath.
However, I still receive the exact same error, and now the process wont show me where the error is, only that it is inside the For Each loop activity. Any guidance on what to do from here?
Yes previously invoke workflow used to support it…but not now…
And coming to error…can you provide more info like what you are trying to do inside for loop and what is the Input argument type you are using and what is the type argument
If possible it would be great if you can share the project which has error so that we can open from our end as well
It looks like some issue with the for loop you have… I just created a new for loop and then moved whole sequence from one for loop to another then new one and then the error disappeared