Reusable workflows

Hello everybody,

I want to build reusable workflows in UiPath Studio. I have an existing workflow that enters data into the Last Name, First Name, and Email fields. In the new test case, I want to reuse this workflow and also enter data into the Age field, but without the old workflow being corrupted.

I don’t want to build an additional workflow that only enters the age. I could add an empty string to the old workflow, but that’s not the best solution, is it?

What options are there? Is the dictionary the right way? Some more information: I’m using a test data queue as my data source.

Thank you very much for your help.

@sz118

invoke it from a different workflow and add age type as well in the main flow

generally if the fields look similar in selector leaving out the name field then you can add variables in selector and pass the name and us the same type into dynamically for all fields

cheers

1 Like

In your workflow - Add an input argument as Text which could be used inside your workflow to decide the flow

As mentioned above - If only 2 cases needs to be handled- Then use an if condition bsaed on this input argument.
Example If inputargument=“Age” - execute only the activities related to Age, Else execute the other flows

If there are multiple cases - Use a switch statement and based on the input value - add the activities accordingly

Hope it helps. Let me know if you need more details

1 Like

Thank you for the responses. I’ve now implemented it so that I intercept the additional field with an if condition in the workflow, so that a value is only entered if test data for this case is provided.

1 Like

Kindly mark solution to close the topic

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.