Hi,
I have a problem that is similar to the one that was described in: Activity working from workflow in library, but not when that library is called from a process
We have a xaml Workflow that is called by a coded c# automation. The code for that call is the following: _workflows.WorkflowInvocationService.RunWorkflow("C:\\Solutions\\Libraries\\LeasmanLibrary\\LeasmanBaseFunctions\\ReadPDFFiles.xaml", inputs);
The automation works fine while called inside the library but when the function that contains this call is called from the project the following error appears:
System.InvalidOperationException: Der ..\Libraries\LeasmanLibrary\LeasmanBaseFunctions\ReadPDFFiles.xaml-Workflow wurde nicht gefunden. Stellen Sie sicher, dass er Teil des Projekts ist.
at UiPath.Executor.WorkflowLoader.LoadWorkflow(String xamlPath, String compiledWorkflowAssemblyName)
at UiPath.Executor.InProcessRunner.BeginExecute(AsyncCallback callback, Object state)
at System.Threading.Tasks.TaskFactory1.FromAsyncImpl(Func3 beginMethod, Func2 endFunction, Action1 endAction, Object state, TaskCreationOptions creationOptions)
at System.Threading.Tasks.TaskFactory.FromAsync[TResult](Func3 beginMethod, Func2 endMethod, Object state)
at UiPath.CodedWorkflows.Utils.WorkflowExecutorExtensions.<>c__DisplayClass2_0.b__1()
at System.Windows.Threading.DispatcherOperation1.InvokeDelegateCore() at System.Windows.Threading.DispatcherOperation.InvokeImpl() --- End of stack trace from previous location --- at System.Windows.Threading.DispatcherOperation.Wait(TimeSpan timeout) at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherOperation operation, CancellationToken cancellationToken, TimeSpan timeout) at System.Windows.Threading.Dispatcher.Invoke[TResult](Func1 callback, DispatcherPriority priority, CancellationToken cancellationToken, TimeSpan timeout)
at System.Windows.Threading.Dispatcher.Invoke[TResult](Func1 callback) at UiPath.CodedWorkflows.Utils.WorkflowExecutorExtensions.ExecuteWorkflow(IWorkflowExecutor workflowExecutor, Boolean canUseDispatcher) at UiPath.CodedWorkflows.WorkflowInvocationService.RunWorkflow(String workflowFilePath, IDictionary2 inputArguments, Nullable`1 timeout, Boolean isolated, InvokeTargetSession targetSession, String assemblyName)
at LeasmanLibrary.LeasmanMainScreen.Request.CheckRequestPdfData(String addressNumber, String contractNumber, String leasingObject, String fileName)
at TAS_Leasman.TC054894.TC053725.Execute() in C:\Solutions\TAS_Leasman\TS054894\TC053725.cs:line 56 ist in Execute aufgetreten.
Is seems like the workflow was not found even though the whole path was appended. Relative paths like LeasmanBaseFunctions\ReadPDFFiles.xaml dont work as well.
Thank you in advance for your help!
