Trying to get a string list from the orchestrator

Hi everyone

  1. I have a project with an argument (string), but for some reason when I publish the process, my orchestrator doesn’t recognize the argument so I can’t insert the values from the orchestrator, the argument is in the main (it’s a State machine, and the argument is in the main sequence)
  2. and also - does the argument need to be in the main sequence for me to insert values from the orchestrator?
    Thank you very much
    Please help me

@dlichtenstadt Argument needs to be in the main Sequence, as that is the Sequence which is going to be executed at the beginning. The Start Sequence of the Process. If you have really created arguments in the argument Panel which is in the Main Sequence, it should have reflected in the Parameters Section when creating Jobs. Have you checked the parameters Section in the Jobs of that Process?

Also make sure you have published the latest Process that has the arguments.

@dlichtenstadt

Make it a String argument and store it as serialized JSON and read it as Array(Of String) by deserializing JSON.

If you don’t know how to handle that, add UiPath.Web.Activities to project’s dependencies and use it’s
SerializeJSON and DeserializeJSON activities

this is the main process inside the project, as u see there is an argument


and also this a string (it’s not a problem right?)
and this is the process after I published I tried to upload it with the arguments but as u can see, there is no arguments in the “Input values”

and also - if I want to add some arguments I need to create them in the main, but where will I insert the arguments values in to the variable that I have in the project? in assign?
thank you for the quick answer

@dlichtenstadt Can you show us the Screenshot of the Project Panel?

Important!

Any type of In argument can be used, yet please keep in mind that only primitives are validated by Orchestrator.

what do u mean primitives and validated?

It’s from the page linked above, not my words :slight_smile:

In other words, Orchestrator will accept only few types of data type (liste in link below) and Array is not one of them.

I’m coming back to my answer: serialiaze your data to allow passing them to the orchestrator.

EDIT: primitive data types and not just primitive types, obviously:

sorry but what do u mean by project panel?
the images that I uploaded aren’t enough?

ok
so how do I do that?
its a list of numbers between 1- 100 and I can write it all with a white space to separate.
and then it will be a string, and if I will want to check if the number is in that string I will do str.contain(“number”)?

1 Like

@dlichtenstadt This kind of Panel , Just wanted to Check if the Main is really a Main :sweat_smile:
Capture

U were right
it wasn’t the main, when I changed it to be the main I saw the in_argument in the process page.
so now I have the problem of not having the ability to run with string

1 Like

@dlichtenstadt The Solution what you described is possible, But you don’t need a String array as an argument and I think most of it was covered by @msan 's post

yeah I figured
but I didn’t understand what should I do or how…
so if u could help me with it I’ll be glad

@dlichtenstadt You can use String Type as an Argument. Pass the values in the Orchestrator with a Separator like a Space or a Comma. In the Workflow, You would need to Split the String Argument based on the Separator which will convert the String into an Array.

Say in_StrVar is your String Argument. Then Create an Array of String variable, strArray and use the below code in Assign Activity.
strArray = Split(in_StrVar," ")

Considering Space was the Separator

2 Likes

thank u very much for the explanation
@msan u as well
thank u very much for the answer!!!

2 Likes

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