cancel
Showing results for 
Search instead for 
Did you mean: 

Sub Process

AmithRajagopal
Level 4
Hi ,   Can anyone please tell me how to call a sub process dynamically ?. Like if we had the option to chnage the sub process name and input using a data item intead of a drop down. One option will be to use cmd prompt and run the bat file for each process , so that we can pass different batch file as input to "Start process " action. Is it a good approach? Thanks and Regards, Amith    
10 REPLIES 10

david.l.morris
Level 14
Hi Amith, Could you describe your use case? I'm trying to imagine the scenario where you would need to dynamically pass in what process to run from within another process. A lot of this will depend on what your conditions are for which process/subprocess to run. Is it the day of the week, some type of input data that comes in from outside, situations that occur with the automation during running? And this will also depend on whether you need the 'subprocess' to generate a new session or if it should run from the already-running session. If you're simply trying to have one process or another run during a session, just throw a decision stage in there that checks some input and depending on the true/false (or use a choice stage for more), it will run one process or the other. Respectfully, Dave
Dave Morris 3Ci at Southern Company Atlanta, GA

AmithRajagopal
Level 4
Thanks Dave for your reply ,    I have a main process and based on the item data from queue i need to run different sub processes , say > 50 or 100. and in future more sub processes will add up. Instead of modifying the code each time  when i have  a new item similar to the others , i can use cmp prompt to call each sub processes (sequentially ) based on my item data. I had already done that creating a batch file and powershell script and its working fine. but  i am not sure of the side effects or if its a good approach.  Thankfully,  Amith   

david.l.morris
Level 14
Hi Amith, Two things I can think I can think of to consider (as far as side effects) is licensing and management information/auditing. For licensing, when you call a process from CLI, it'll generate a new session, which may be exactly what you need. But I just wanted to point it out. If you have your first process (the one that checks the queue data) running all the time and it spawns sessions of different processes based on data in the queue, you may find yourself using up your license limit. For management information/auditing, if you are performing tasks in the scripts, those actions won't be logged by Blue Prism for use in MI or for audit later. This isn't necessarily a problem, but it's good to consider it just as the possible licensing issue. As far as using powershell scripts/batch files, that's not discouraged as a matter of practice. BP gives exposes CLI commands so that we can use them. You may also want to consider exposing processes/objects as Web Services, which gives you the ability to trigger processes without having them on a schedule. Respectfully, Dave
Dave Morris 3Ci at Southern Company Atlanta, GA

david.l.morris
Level 14
One thing I want to amend from my reply above... When I say that BP won't log the actions you perform in the script, I meant things like the decisions (if/then) that you performing in the script. The calls you make to Blue Prism that cause BP to do something should be in the audit log afterward. I haven't personally verified that every command is logged in the audit log, but they should be. Dave
Dave Morris 3Ci at Southern Company Atlanta, GA

david.l.morris
Level 14
Hi Amith, Also, see if this meets your requirements (search for this in the Documents section): Blue Prism Dynamic Scheduler Examples It's a set of files you can download and in that is documentation on how to dynamically start sessions up for processes. I think this gets at what you're looking for. Respectfully, Dave
Dave Morris 3Ci at Southern Company Atlanta, GA

AmithRajagopal
Level 4
thanks Dave, Actually the above said PDF helped , its the same i mentioned in my above comments , in the sample process they have given , the process names and all other details are given in external file and either from file directly or through a queue each process is called and here they say dynamic scheduling . I am doing the excat same thing as mentioned . Using AutomateC.exe and passing the process name arguments.   Thanks Again , Amith

Hi Dave, 
If a process that calls 3 sub processes within it is scheduled to run in control room, how many licenses will be consumed? 
For example
Process A has a choice stage and calls sub process S1 , for next item it calls S2. and so on based on nature of queue data.

------------------------------
Sahana Mohan
Solution Designer
Blueprism
------------------------------
Sahana Mohan Lead Software Engineer SS&C Blue Prism

Hi Sahana,

I would like to think and hope that in your example only one license would be required when running a process that calls several sub-processes. (process A calling both process S1 and S2, depending on the data)

With the best practice rules prescribing to define sub-processes for re-usable chunks of logic in either objects or sub-processes, it would be greatly counterproductive of BP to require multiple licenses to run such a beautiful construction.

------------------------------
Happy coding!
Paul
Sweden
------------------------------
Happy coding!
Paul, Sweden
(By all means, do not mark this as the best answer!)

Hi Sahana,

As you are just using the default functionality to call another sub process, the whole process gets executed in one session consuming single license only.

Also if you want to experiment there's a asset available on DX called "Function for License Utilisation SQL Script" https://digitalexchange.blueprism.com/dx/entry/3439/solution/license-utilisation-sql-script

------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------