Blue Prism Product

last person joined: 10 hours ago 

Chat about Blue Prism products
Expand all | Collapse all

Automatic Work Queues creation

  • 1.  Automatic Work Queues creation

    Posted 11-25-2020 06:16
    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
    ------------------------------


  • 2.  RE: Automatic Work Queues creation

    Posted 11-25-2020 08:28
    Edited by Harshit Rawat 11-25-2020 08:37
    ​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
    ------------------------------



  • 3.  RE: Automatic Work Queues creation

    Posted 11-25-2020 09:06
    Where would the command go? Any code block in object or process?

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



  • 4.  RE: Automatic Work Queues creation

    Posted 11-25-2020 09:32
    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
    ------------------------------



  • 5.  RE: Automatic Work Queues creation

    Posted 11-25-2020 09:54
    Can these codes be used in the Code Stage of blue prism? Or does it require AutomateC?

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



Share