I have a question about creating automations that can be used across multiple people in an organization, I’m thinking using the REF (that has an excel config file with the queue name) but also applicable to any framework.
For my use case I would have processes that run for each business client, so for example I’ll have two clients, Client A and Client B.
When someone in the organization runs a process (to collect keyword information for example), they would run it specifically for their client.
So if I started the keyword process, I would add transactions of multiple keywords (each as a transaction in the queue) for Client A to a queue.
But if someone else starts the same process but for Client B, I would not want Client B’s keywords to be added as transactions in the same queue as Client B.
Ideally I would want each instance of a process (or Job) to dynamically create a queue so that each client has their own queue using the clients name (Client A, Client B, Client C, …).
To address your scenario, where you want each instance of a process to dynamically create a separate queue for each client, you can follow these steps:
Dynamic Queue Creation: Develop your automation process in such a way that it dynamically creates a new queue for each client. This can be achieved by using the Orchestrator API to programmatically create queues. When starting the process, include logic to check if a queue already exists for the client. If not, create a new queue with the client’s name.
Queue Naming Convention: Define a naming convention for the queues based on the client’s name. For example, you can use “Client_A_Queue”, “Client_B_Queue”, etc. This convention will help organize and identify the queues associated with each client.
Queue Management: Implement logic within your process to manage the queues efficiently. This includes adding transactions to the appropriate queue based on the client, retrieving transactions from the correct queue, and handling any errors or exceptions related to queue operations.
Security and Access Control: Ensure that proper security measures are in place to restrict access to queues. Only authorized users should be allowed to interact with queues specific to their clients.
Monitoring and Maintenance: Regularly monitor the queues to ensure smooth operation and address any issues promptly. Implement mechanisms for queue cleanup and maintenance as needed to optimize performance and resource utilization.
Thank you for the comprehensive response and makes sense. Some follow up questions:
The dynamic Queue Creation: can this happen from a UiPath process/activity rather than the API? As ideally having another system to help manage queues in orchestrator seems kind of redundant
Overall, is dynamic queue creation the correct way of doing this, like what is the standard? For example if you look at REFramework, the config file contains the queue name, so you would have to bypass this with the proposed approach.
Also like surely many other people have the same situation where the output of a set of transactions initiated by one user needs to be separate from the output of a set of transactions from another user?
Answer for the 1 st question–>1. Yes, dynamic queue creation can be achieved directly within a UiPath process/activity without relying on the Orchestrator API. You can design your automation to create queues dynamically based on client names or other criteria using UiPath activities.
Here’s a high-level approach to implement dynamic queue creation within UiPath:
Read Client Information: Start by reading client information from a source such as an Excel file, database, or any other data source.
Check Queue Existence: For each client, check if a corresponding queue already exists in Orchestrator. You can use the Get Queue Items activity to check if the queue exists or query the list of queues using the Orchestrator HTTP Request activity.
Create Queue Dynamically: If a queue does not exist for the client, create a new queue dynamically. Use the Add Queue Item activity or the Orchestrator HTTP Request activity to create a new queue in Orchestrator with the client’s name.
Handle Errors and Exceptions: Implement error handling mechanisms to deal with cases where queue creation fails due to errors or exceptions. You can use Try-Catch activities to handle exceptions gracefully and log any errors for troubleshooting.
Queue Management: Once queues are created, you can proceed with adding transactions to the appropriate queue for each client and managing queue operations within your automation process.
Answer for the 2nd question–>Dynamic queue creation from within a UiPath process/activity without using the Orchestrator API may not be the most efficient or standard approach. While it is technically possible to create queues dynamically within a process/activity, it may introduce complexity and limitations, especially when managing multiple clients or scaling the solution.
Again, thank you so much this is very helpful and understood.
Sorry for the follow up question again, but I think this is the crux of the query. You mention that its not the most efficient or standard approach, so what would be?
Here’s a use case example:
There’s me an Bob and we both work on a marketing that cold calls people in a specific location. Bob works in Johannesburg and I work in Cape Town.
We’ve built a process that checks a list of names against our CMS, to see if the name is an active or new potential client.
The process then creates an excel with all the list of names as well as the status (existing/new) next to the name.
Now using the REFramework the process would add each name as a transaction in a queue (called “check names”).
If I upload a list of names, and bob uploads a list of names at the same time to the same queue, we will end up with one excel file output that lists all the names for both me and bob, with their corresponding status.
In this use case, how should it be setup so that Bob and I can both use the process as it was intended, but that we get two outputs, one for Bob (with the names he supplied) and one for me (with the names I supplied)?
Again, thanks for the help so far, and apologies for belaboring the point, I just don’t understand how one would organise/structure a process/workflow/queue to accommodate this kind of use case across teams of people in an organisation.
To achieve separate outputs for Bob and yourself while using the same process, you can modify the process to dynamically create separate queues for each user’s input. Here’s a step-by-step approach:
–>Modify Queue Name Dynamically: Instead of using a fixed queue name like “check names”, modify the process to dynamically create queue names based on the user who uploaded the list of names. For example, you can append the username or a unique identifier to the queue name.
–>Queue Creation Logic: When a user uploads a list of names, the process should check if a corresponding queue exists for that user. If not, it should create a new queue with the dynamically generated name.
–>Queue-specific Outputs: Modify the process to generate separate outputs for each queue. After processing the list of names for a user, the process should generate an Excel file with the results specific to that user. You can use the dynamically generated queue name to name the output file.
–>User Authentication and Authorization: Implement user authentication and authorization mechanisms to ensure that each user can only access and process their own queue. This can be achieved through user accounts and roles in UiPath Orchestrator.
–>Logging and Monitoring: Implement logging and monitoring functionality to track the processing status and results for each user. This will help in troubleshooting and auditing.
Creating a new queue for each Job is not a correct way to do things.
Now using the REFramework the process would add each name as a transaction in a queue (called “check names”).
Why would you add each name as a separate queue item? Add them all into one queue item as a comma delimited list or JSON (so it can be broken back up by the performer). So you have one queue item for each list of names to check.
I mean, I’m not sure. So far I’ve been using it for each item I want to perform a task on.
To clarify, I work in the SEO space, a lot of what I do is at a keyword level.
So for me each keyword I add to queue as a transaction, this allows me to have keywords where the process was successful and keywords where the process failed. Instead of running all the keywords again, I can just load all the failed transactions (which are keywords), and run the process again.
If it do everything is a comma separated list, wouldn’t I have to run the whole list again if something failed?
Any documentation or reading on the correct way of doing it would be great, I can’t find what I’m looking for.
It sounds like you might want to work from a spreadsheet. Put the list of keywords into an Excel file, and create a queue item with one of the values being the path and filename of the Excel file to work from. Then you can get the transaction, read the file, loop through the keywords (For Each Excel Row), perform the steps for each one and write Success/Fail back to the spreadsheet. That way you can include an If that stops it from processing a row in the spreadsheet if it has already been processed successfully.