Variable string array not working in Invoke Workflow

Hello,

I’m trying to call workflow files from an invoke workflow activity by iterating around each external workflow. However, the string variable that should be replaced is not opening and executing the activities inside the workflow as I get an error that the syntax is incorrect. Preview the screenshots below.

Regular Method That Works

Error Using The Method That I Want

Variable Names Created

Any suggestions on why this is not working?

Hi @private_matter,
Below path is not valid could you please show us the assign values for this variable:

image

Hi,

I guess your project is Windows compatibility ( not Window-Legacy).
Unfortunately, variables and argument are not supported for workflow file name in Windows project, as the following document. It’s necessary to not use variable for xaml filename in it or use Windows-Legacy project.

Regards,

Try this:

Path.combine("C:\Users\Administrator\Documents\UiPath\Print On Demand Project", string.Format("{0}.xaml", ProductName.ToString))

Thank you for the information. This seems to be the problem as I’ve nearly tried everything but nothing worked. If I can’t pass any variables inside that activity, it means I will have to create 331 invoke activities inside my workflow which is really bad and time-consuming.

Tried that to no avail.

2023-01-14_172750

Please print this variable and make sure that the full WF location appear normally I believe that this is the issue please try and update us.

Hello @mahmoud.zaky

It doesn’t matter whether I use the full path or UiPath’s direct folder path. If I use the write line activity as in the screenshots below, the path is correct. However, when I copy/paste that into the Invoke Workflow activity, it simply rejects it automatically because variables are not allowed to be passed inside it though it’s a shame that this option is not available because I really needed it. Now I will have to replicate and clone 331 invoke activities instead of using one. See the output print result screenshots below as per your request.

This option already exist and working normally and has no issue and you can find below screen I tried myself and I asked you to make this action as when you show the error message its contains you variable name not variable value.

your shared error is below appear variable name not variable value.

Excuse me, but from where are your getting the (x) assign activity because mine is (v) assign and I don’t have the Save to and Value to save labels as in the screenshot you took. I have the latest packages installed as well. Are you using Studio X perhaps?

No Using Studio with version 2022.12.0 its just Studio Update not related to package

Hi,

Unfortunately, it’s specification at this time. As I mentioned in previous post, it’s necessary to indicate xaml file without variable (including to review your logic) or re-create your project as Windows-Legacy.

Regards,

Yes I guess there’s no other way around this except to recreate the entire project in windows legacy. But the question is: why have they removed this important feature in the first place? I don’t get it. It sounds stupid to remove such as useful option.

I downloaded the latest version 2022.12.0 but may I ask what’s the variable type that you’re using for WF_Path? Because setting it to string shows an error as below. It must be something else.

2023-01-16_213527

String Type, look here in your error you can find that the last path is not valid path

image

can you share with us your two work flows to check the error - if available - if not did you try this behavior in other work flow and not working if so can you share with us to check the error

Yes I know that the path seems wrong but it’s still not working. Download the project below. I only included 3 workflows for demo purposes.

Print On Demand Project.zip (23.0 KB)

Hello @mahmoud.zaky did you download the project? I still cannot continue working on my project due to this very issue.

WATCH what happens if I use switch activities when it’s not possible to use variables inside an invoke workflow activity. I’m forced to replicate 331 invoke activities and even split them into multiple switch activities that are wrapped in repeat number of times activities in order to reduce the lagging and even with that, a lot of lagging occurs when scrolling up and down as you can see in the demo video because I’m simply using too many activities in the workflow. And note that I have also uploaded 331 Boolean assets in orchestrator because if using more than 30 variables in studio, when opening the variables panel, lagging will also occur. This is super frustrating :rage: This proves that Studio Desktop cannot handle BIG DATA, that’s for sure. I hope developers can take a look at this thread and see how serious this issue is. @loginerror

HOW IT’S SUPPOSED TO BE

Thank goodness I finally solved the issue by myself after some smart thinking. There’s no need for using any switches or invoke activities at all, and no need to have 331 separate workflows anymore. :upside_down_face:

DOWNLOAD SOLUTION

Printful Template Creator.xaml (36.7 KB)