Validation using regex in orchestrator queue schema is not working

Hi All,
I have a requirement to do the queue data validation in the queue schema itself (I can’t go with the usual data validations as we normally do in dispatcher/performer).
I tried giving a regex value in the pattern of the queue json but somehow it’s not getting validated.
Attaching the queue json schema I created along with a sample csv file I used for testing.
Need to understand why the regex is not working .

The regex I used in the first pattern is to validate a number starting with 966 and have a total of 12 digits.
sampleQueueSchema.json (541 Bytes)

Sample csv input screenshot
image

In the true case scenario only the first row should get added to the queue , but here both the items are getting uploaded(ie regex validation not working)

Hi @Sam_Abraham

If your question is I am using the regex in Json file to extract the number in the picture which is starts with 9666 and other 9 numbers.

The regex are not working which is in Json file to extract the data.
Better to change the regex expression.
I have written a regex. Check the below one.

9666\d{9}

image

Hope it helps!!

Hi @mkankatala ,
I already tried with the above mentioned regex . It’s also not working , the validation is not happening.
Also the screenshot I given is the sample csv file that will be uploaded to the queue for testing purpose.

Thanks,
Sam

You didn’t attached any sample csv files in the query. @Sam_Abraham

Do you want to provide one more regex expression.

Hi @mkankatala ,
The forum is not allowing me to upload a csv file, that’s why I attached the screenshot of my sample CSV file opened in Notepad++.
The issue I face is I have to use regex validation in UiPath orchestrator queue schema and I read that by using the keyword “pattern” we can give that validation.
But when I tested that the validation is not working and all data/queue items will be uploaded to the queue without any validation.
Please do let me know if any more info is required.

Thanks,
Sam

I think it was not validating with your regex code.

I have tried with your regex code it’s not extracting the required data.

Use the regex code that I have provided and try. @Sam_Abraham

Hi @mkankatala ,

When we use json we can’t use just back slash but with an escape character like below:

966\\d{9} if we do not use the additional back slash json will become invalid

Then you can use the below regex it doesn’t have slashes.

9666[0-9]{9}

image

Hi @mkankatala ,
I have also tried with this and the result is same, that validation is not happening in the queue and all the items are getting pushed to queue.
I believe there is something issue with the queue json schema but I am not able to identify the issue

Thanks

1 Like

Most probably, The issue is related to the CSV file we upload.

Try to use queue activities for addition which should do the job.

1 Like

Yes we hope so there is an issue with the queue Json schema.

I have checked the regular expressions one more time it working properly.

Happy Automation!!

1 Like

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