Process Recognition

Hi Team,

We have 2 processes running in production say
Process A - Runs in scheduler on a daily basis once in a day (6am IST)
Process B - On demand it’s a manual run
Both the process performs the same validations only the reporting (email template differs)
Question is since 2 different processes performs the same validations is it possible to keep one single process. If yes, how ?
If we convert it into into single process whenever the process runs at 6am it has to recognize that it is running in scheduler and it should send the email with appropriate template(Schedular mail template). If we trigger manually it should recognize that its been triggered manually then it should send the email with appropriate template(Manual trigger mail template). If this is feasible how it can be done or any other ideas there to achieve this ?

Thanks

Hi Honda,

Yes its possible to send different email for different trigger.

For achieve this, make use of get Jobs activity.

  1. Apply filter as below: “State eq ‘Running’ and ReleaseName eq ‘YourProcessName’”. Also set Top as 1 in property panel.

  2. Once found use if-else block to check whether process is started via scheduler or via manually.
    Expression to use to know how process started(for our information) : GetOrcJobs(0).Source.ToString()

Expression to use in if-else block:
If GetOrcJobs(0).Source.Equals(“Manual”)–> Send manual email template
else:
Send scheduler email template.

If this solves your issue, then kindly make as solution. :slight_smile:

Br,
Nikhil Zambare

@Honda,

Just add an argument in Main.xaml to identify if it’s 6 PM run or not.

By using this argument add your logic in bot to send report or not.

You can also check at start of your bot if current time is between 6 AM - 6.05 AM then send required report, assuming that bot wont be in pending state for more than 5 min due to other bots or someone starts it manually at that time.

Thanks for your reply. Is it possible to identify a test set is started manually or scheduled from Orchestrator ?

Yes its possible, please refer the solution I have provided earlier.
You have to make use of get jobs activity.

Br,
Nikhil Zambare