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.
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