cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic Work Queues creation

PedroGouveia
Level 4
Good Morning

Is there a way to create a Queue other than through the System > Workflow > Work Queues?
For example creating a new Queue through blue prism code

Thank you

------------------------------
Pedro Gouveia
------------------------------
4 REPLIES 4

HarshitRawat
Level 8
​Yes you can create the work queues using command line argument also

The command would look like this

" /createqueue """ & [Key Field] & """ " & [Running?] & " " & [Max Attempts] & " /queuename """ & [Queue Name] & """"&" /sso" &" /dbconname ""YourEnvironmentName"""


Alternatively you can use a C# code stage to run the command

 try
    {
  Success = true; 
  
     System.Diagnostics.Process tmpProc = new System.Diagnostics.Process();

     tmpProc.StartInfo.UseShellExecute = false;
  tmpProc.StartInfo.CreateNoWindow = true;
     tmpProc.StartInfo.FileName = File_Path;
     tmpProc.StartInfo.Arguments = Parameters;
     tmpProc.StartInfo.WorkingDirectory = Working_Directory;
     tmpProc.StartInfo.RedirectStandardError = true;
     tmpProc.StartInfo.RedirectStandardOutput = true;
    
  tmpProc.Start();
     using (System.IO.StreamReader SR1 = tmpProc.StandardOutput)
  {
  OutText = SR1.ReadToEnd();
  }
     using (System.IO.StreamReader SR2 = tmpProc.StandardError)
  {
  Error_Text = SR2.ReadToEnd();
     }
     tmpProc.WaitForExit();
     Exit_Code = tmpProc.ExitCode;
 }
     catch (Exception ex)
    {
  Error_Text = ex.Message;
  OutText = "";
  Success = false;  
  Exit_Code = -1;
    }


------------------------------
Harshit Rawat
------------------------------

Where would the command go? Any code block in object or process?

------------------------------
Pedro Gouveia
------------------------------

MindaugasBresku
Level 4
Hi, yes, you can use command line utility for creating queues

from automatec help:
/createqueue <keyfield> <running> <maxattempts>


example using username/password
"c:\Program Files\Blue Prism Limited\Blue Prism Automate\AutomateC.exe" /user [username] [password] /dbconname "[connection name in config file]" /createqueue "[keyfield name]" true 1 /queuename "[queue name]"

example usgin sso
"c:\Program Files\Blue Prism Limited\Blue Prism Automate\AutomateC.exe" /sso /dbconname "[connection name in config file]" /createqueue "[keyfield name]" true 1 /queuename "[queue name]"

in [] - use corresponding required values, brackets should not be used like this:
"c:\Program Files\Blue Prism Limited\Blue Prism Automate\AutomateC.exe" /sso /dbconname "Test BP Server" /createqueue "CaseID" true 1 /queuename "Test queue of cases"

------------------------------
Mindaugas Breskus
Software engineer
Swedbank
Europe/Vilnius
------------------------------

Can these codes be used in the Code Stage of blue prism? Or does it require AutomateC?

------------------------------
Pedro Gouveia
------------------------------