cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Login Agent

Daniel_Sanhueza
Level 8
Hello ppl! 

This post is only to see different points of view and what you recomend using Login Agent.

We are using the Login and Logout through the scheduler in a simply secuence "Login" On Complete -> "Process"  on complete -> "Logout" On Complete ->Stop.

What I said above is what I think are good practices using login agent (perhaps Im wrong)... so we are in a client that is telling us to put the Logic Login/Logout inside the process flow and also the bot has to be capable to restart himself when it reach an X number of operation and then continue with the process. But is this even possible? I created a process test, but as I thought, it failed throwing this error.

[2019-11-20 16:18:36Z] Listener failed : Unable to start listener - is this machine already running as a Resource PC? : Sólo se permite un uso de cada dirección de socket (protocolo/dirección de red/puerto)​
29762.png

The process consist in a process stage calling the login, then a Sleep (simulating the post completion delay that scheduler has) and then send mail, but as I said, it failed.

As far as I know the runtime resource is down when the machine is logged out, when the login is completed and the session had started, the runtime resource start (if was programmed as an automatic task). in this point is where the resource is capable of receiving work

Is possible for a process to restart himself changing between login agent and runtime resource?, If so, what am I doing wrong?

Regards community, 


------------------------------
Daniel Sanhueza
Analyst
Deloitte
America/Santiago
------------------------------
Daniel Sanhueza
RPA Professional Developer
Deloitte
1 BEST ANSWER

Best Answers

DaveMorris
Level 14
It is as Walter describes. It's not possible for Blue Prism instructions that are sent to the Login Agent Runtime Resource to survive after it shuts down and the Blue Prism Runtime Resource starts up. I'm referring to the 'hand off' that would have to occur as the machine is logging in. The only way for this to work would be for either (1) an enhancement to the Blue Prism Scheduler or (2) an outside controller app is used as a replacement for Scheduler. The first way I think is unlikely to happen. In the last 3 years, I think the only enhancement I've seen to Scheduler was the post-completion delay. I could be wrong. Maybe there were other things, but it certainly isn't a focus for improvement in the tool. The second way is possible but only if your organization has someone with the technical ability to build a controller app. Ami Barrett has mentioned he's done at his organization and it works well for them. I'm pretty sure eventually I'll do this as well because Scheduler just doesn't offer the flexibility needed for truly build-it-and-forget-about-it back office software robots.

Now, that doesn't mean you can't achieve what you're looking for to some small degree.

Here's how we use Scheduler/Login Agent for most automations...
It's very similar to what you and Walter described. Assuming we have only one process for the automation:
  • Task 1: Login on the RR
    • Post-Completion Delay: 120 seconds
    • On Complete: Task 2
    • On Exception: Task 2 (sometimes we have it Abort here but if we allow it to run Task 2 then the main process can email us if it fails because it's not logged in --more on this later)
  • Task 2: Run the automation's main process
    • On Complete: Task 3
    • On Exception: Task 3
  • Task 3: Logout

Now, if we have an automation that we really need to ensure that it runs right away if possible and we're concerned about the primary RR being offline or busy, then sometimes we'll use extra tasks for use on a different Runtime Resource that will only run if the primary tasks fail. Here's an example:
  • Task 1: Login on RR1 (Runtime Resource 1)
    • Post-Completion Delay: 120 seconds
    • On Complete: Task 2
    • On Exception: Task 4
  • Task 2: Run the automation's main process on RR1
    • On Complete: Task 3
    • On Exception: Task 3
  • Task 3: Logout on RR1
    • On Complete: Stop
    • On Exception: Abort
  • Task 4: Login on RR2 (Runtime Resource 2)
    • Post-Completion Delay: 120 seconds
    • On Complete: Task 5
    • On Exception: Task 5
  • Task 5: Run the automation's main process on RR2
    • On Complete: Task 6
    • On Exception: Task 6
  • Task 6: Logout on RR2
    • On Complete: Stop
    • On Exception: Abort

I hope that isn't confusing. The main point is that if Runtime Resource 1 is busy or offline then it'll automatically run on Runtime Resource 2 and we're happy. Also, though technically your Login process has to be running as Foreground or Exclusive mode probably for this to work (ours currently runs as background so it wouldn't work), you could use the same concept above but have Task 2 On Exception run Task 4. This might leave Runtime Resource 1 in an logged in state at the end, but it may be more important to ensure the automation tries again than it is to ensure the machine logs out.

What your client is asking for is 'strictly speaking' not possible within Blue Prism. While you can put a Login and Logout call inside the process, you really have to think it through before doing this. In my opinion, it's a terrible idea to put those inside the process, though I have seen this done. The only one that might make sense is the Logout action inside the process. I could see it being useful in certain situations.

For the functionality of the automation being able to restart the machine itself and then continue working after that... That would be pretty cool if it could do that, but again I'd say we're back to needing an enhanced Scheduler or you could make a controller app for this. It's possible that Thoughtonomy has something like this, so maybe what they bring to the table will eventually get implemented in the on-prem version of BP. But I wouldn't hold my breath.

Edit: I forgot to explain the thing about that we let Task 2 run even if login fails. The reason we do this is that we use an internal API service that sends emails, and we also use SMTP as a backup as well. Because neither of these require the machine to be logged in, our automations can send us notifications of failures if they try to run while the machine is logged out. The other way to handle this would be to put a send email action inside the Login process, but we just haven't done that (yet). This of course doesn't help for anyone who isn't allowed to use SMTP and doesn't have any other method of sending emails that doesn't rely on the desktop installation of Outlook (such as MAPIEx and the MS Outlook Email VBO). There are other options such as Agilify's EWS object and GRAPH API (but I haven't tried those from a logged out state).

------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------
Dave Morris 3Ci at Southern Company Atlanta, GA

View answer in original post

3 REPLIES 3

Walter.Koller
Level 11
Hi,

I was trying to put the login into the process itself but terminated after the login. I assume it is because the whole process definition is sent to LoginAgent which is shutdown during login and the process  is lost, not available for the started robot instance. 

What is possible is the restart of the runtime resource (workplace). Either via VB/C# code or executing shutdown command with existing environment VBO. 
However, any logic spanning across the logged-on / logged-off states between LoginAgent and robot, have to be implemented outside of Blue Prism or in task dependencies in Schedule.

This is an interesting topic and I am eager to hear other comments

------------------------------
Walter Koller
Solution Manager
Erste Group IT International GmbH
Europe/Vienna
------------------------------

DaveMorris
Level 14
It is as Walter describes. It's not possible for Blue Prism instructions that are sent to the Login Agent Runtime Resource to survive after it shuts down and the Blue Prism Runtime Resource starts up. I'm referring to the 'hand off' that would have to occur as the machine is logging in. The only way for this to work would be for either (1) an enhancement to the Blue Prism Scheduler or (2) an outside controller app is used as a replacement for Scheduler. The first way I think is unlikely to happen. In the last 3 years, I think the only enhancement I've seen to Scheduler was the post-completion delay. I could be wrong. Maybe there were other things, but it certainly isn't a focus for improvement in the tool. The second way is possible but only if your organization has someone with the technical ability to build a controller app. Ami Barrett has mentioned he's done at his organization and it works well for them. I'm pretty sure eventually I'll do this as well because Scheduler just doesn't offer the flexibility needed for truly build-it-and-forget-about-it back office software robots.

Now, that doesn't mean you can't achieve what you're looking for to some small degree.

Here's how we use Scheduler/Login Agent for most automations...
It's very similar to what you and Walter described. Assuming we have only one process for the automation:
  • Task 1: Login on the RR
    • Post-Completion Delay: 120 seconds
    • On Complete: Task 2
    • On Exception: Task 2 (sometimes we have it Abort here but if we allow it to run Task 2 then the main process can email us if it fails because it's not logged in --more on this later)
  • Task 2: Run the automation's main process
    • On Complete: Task 3
    • On Exception: Task 3
  • Task 3: Logout

Now, if we have an automation that we really need to ensure that it runs right away if possible and we're concerned about the primary RR being offline or busy, then sometimes we'll use extra tasks for use on a different Runtime Resource that will only run if the primary tasks fail. Here's an example:
  • Task 1: Login on RR1 (Runtime Resource 1)
    • Post-Completion Delay: 120 seconds
    • On Complete: Task 2
    • On Exception: Task 4
  • Task 2: Run the automation's main process on RR1
    • On Complete: Task 3
    • On Exception: Task 3
  • Task 3: Logout on RR1
    • On Complete: Stop
    • On Exception: Abort
  • Task 4: Login on RR2 (Runtime Resource 2)
    • Post-Completion Delay: 120 seconds
    • On Complete: Task 5
    • On Exception: Task 5
  • Task 5: Run the automation's main process on RR2
    • On Complete: Task 6
    • On Exception: Task 6
  • Task 6: Logout on RR2
    • On Complete: Stop
    • On Exception: Abort

I hope that isn't confusing. The main point is that if Runtime Resource 1 is busy or offline then it'll automatically run on Runtime Resource 2 and we're happy. Also, though technically your Login process has to be running as Foreground or Exclusive mode probably for this to work (ours currently runs as background so it wouldn't work), you could use the same concept above but have Task 2 On Exception run Task 4. This might leave Runtime Resource 1 in an logged in state at the end, but it may be more important to ensure the automation tries again than it is to ensure the machine logs out.

What your client is asking for is 'strictly speaking' not possible within Blue Prism. While you can put a Login and Logout call inside the process, you really have to think it through before doing this. In my opinion, it's a terrible idea to put those inside the process, though I have seen this done. The only one that might make sense is the Logout action inside the process. I could see it being useful in certain situations.

For the functionality of the automation being able to restart the machine itself and then continue working after that... That would be pretty cool if it could do that, but again I'd say we're back to needing an enhanced Scheduler or you could make a controller app for this. It's possible that Thoughtonomy has something like this, so maybe what they bring to the table will eventually get implemented in the on-prem version of BP. But I wouldn't hold my breath.

Edit: I forgot to explain the thing about that we let Task 2 run even if login fails. The reason we do this is that we use an internal API service that sends emails, and we also use SMTP as a backup as well. Because neither of these require the machine to be logged in, our automations can send us notifications of failures if they try to run while the machine is logged out. The other way to handle this would be to put a send email action inside the Login process, but we just haven't done that (yet). This of course doesn't help for anyone who isn't allowed to use SMTP and doesn't have any other method of sending emails that doesn't rely on the desktop installation of Outlook (such as MAPIEx and the MS Outlook Email VBO). There are other options such as Agilify's EWS object and GRAPH API (but I haven't tried those from a logged out state).

------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------
Dave Morris 3Ci at Southern Company Atlanta, GA

Daniel_Sanhueza
Level 8
Thank's for your help!

You could imagine my poker face when the client said "we want a robot that will be capable of restart itself".
Dave, wasn't confusing at all 🙂 

Thank you Walter and Dave!

------------------------------
Daniel Sanhueza
Analyst
Deloitte
America/Santiago
------------------------------
Daniel Sanhueza
RPA Professional Developer
Deloitte