<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Environment Locking real time use case in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/111012#M50010</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/58907"&gt;@DipinDevP&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Yes, your understanding is correct that&amp;nbsp;&lt;SPAN&gt;we can design the process in a way to decide whether process needs to wait for the lock release or skip the particular part of the workflow without waiting for the lock.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The locking mechanism by design is built to handle scenarios where multiple runtime resources access the same flow at the same time itself even though there are instances when let say if one resources responded slowly it can acquire lock by the time other resource released the same in it's own session.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Such discrepancies should be handled as part of the solution design itself. For instance, as a best practice, whenever we deal with addition of items to queues, we use environment locks but at the same time we also use additional logic to check if each of the queue items are already added with the same Item Key or not so that addition of duplicate items can be avoided.&lt;/P&gt;&lt;P&gt;Also, one other method that I have seen people using is putting the Release Lock action near the end of the entire process. In such cases, they use Acquire Lock at the beginning but use Release Lock towards the very end of the process which ensures that for a specific action even if we are using environment locks, they shall be released only towards the very end of the current session ensuring the other parallel process session does not picks it up during any time the first session is actively running. However, I don't recommend this as it becomes tough to locate the release actions from a readability perspective during audits and code reviews and potentially one can miss to have this added properly while working on the exception handling part.&lt;/P&gt;&lt;P&gt;For scenarios, where let say you need to send out an email based on the completed or failed queue items, we generally keep such reporting logics in a separate process itself and we ensure that only one runtime resource is running that automation on the scheduler level itself. So multi-bot architecture itself won't be applicable for such reporting-based processes.&lt;/P&gt;&lt;P&gt;In my other projects, we also have used session specific files or process specific database tables where we can read and update flag values from our runtime resources to action upon items as an extra check to control a set of actions from getting executed on top of Environment Locking.&lt;/P&gt;&lt;P&gt;Again, while designing the solution, each of the situation needs to be considered and just having Environment Locks by itself can't help.&lt;/P&gt;</description>
    <pubDate>Thu, 30 May 2024 11:18:48 GMT</pubDate>
    <dc:creator>devneetmohanty07</dc:creator>
    <dc:date>2024-05-30T11:18:48Z</dc:date>
    <item>
      <title>Real-time Environment Locking - what are the use cases?</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/110993#M49999</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;Thanks for addressing my question!&lt;/P&gt;
&lt;P&gt;Kindly anyone share a real time scenario were environment locking concept needs to be used. Everywhere we can see environment locking concept is explaining with Load Queue process. It would be great, if anyone can explain any other process in detail.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Dipin Dev P&lt;BR /&gt;RPA Professional&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Apr 2025 09:52:57 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/110993#M49999</guid>
      <dc:creator>DipinDevP</dc:creator>
      <dc:date>2025-04-15T09:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Locking real time use case</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/111004#M50002</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/58907"&gt;@DipinDevP&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By concept we use Environment Locking in case of Multi Bot architecture in order to avoid more than bots performing the same set of actions if they are run at the same time. This concept is used when let say you have a workflow and you want to add queue items from a file or some data source. Now, potentially if you don’t use environment locks here, then when you trigger more than one bots and let’s say both of them come to this stage then they can accidentally add duplicate data since one bot won’t know what the other bot is doing now. Another example can be let say, you have an excel file which needs to be read or written. Now with excel files, we know that if one user has already opened it then the other cannot open the same, in such a case to avoid multiple robots accessing the same file you can have an environment lock applied so that once one robot acquires the lock only it can be the one to read or write on that file while the other can skip this part of the workflow.&lt;/P&gt;&lt;P&gt;Also, if there are session based applications such as SAP for example where let say only one user profile can login into the application from one machine and you have multiple robots having the same username but they are running on different machine. In such &amp;nbsp;cases, you would want to avoid both the robots accessing the application at the same time. You can use environment locks here so that while one robot performs all the action within the application, the other can simply keep on waiting at the start of the flow till the other bot logs out of the application or you can make it go to some other part of the workflow and skip the application part altogether.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Usage of environment locks and how you want to use it for controlling multiple robots completely lies on how you design your workflow. Mainly this is used to avoids multiple robots performing the same set of actions and they can be used in ways to make those robots get utilised the best as per your requirements.&lt;/P&gt;&lt;P&gt;Please also feel free to read this thread where I posted a detailed explanation quite a while back too:&amp;nbsp;&lt;A href="https://community.blueprism.com/t5/Product-Forum/Acquire-Lock-environment-locking/m-p/47389#M3148" target="_blank" rel="noopener"&gt;Acquire Lock - Environment Locking&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 07:36:07 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/111004#M50002</guid>
      <dc:creator>devneetmohanty07</dc:creator>
      <dc:date>2024-05-30T07:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Locking real time use case</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/111005#M50003</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/58907"&gt;@DipinDevP&lt;/a&gt;&lt;BR /&gt;A sample scenario.&amp;nbsp;&lt;/P&gt;&lt;H4&gt;Scenario:&lt;/H4&gt;&lt;P&gt;HR department uses multiple automated processes to handle various aspects of employee onboarding, including document verification, account setup, and training scheduling. These tasks often need to be performed in a specific sequence to ensure completeness and accuracy.&lt;/P&gt;&lt;H4&gt;Challenge:&lt;/H4&gt;&lt;P&gt;Without proper coordination, these processes might try to access and update the same employee's information simultaneously, leading to issues such as incomplete records, duplicate efforts, or missed steps in the onboarding process. For example, if account setup begins before document verification is complete, it might result in creating accounts for ineligible candidates.&lt;/P&gt;&lt;H4&gt;Use Case:&lt;/H4&gt;&lt;P&gt;Environment locking can ensure that while one process is verifying an employee's documents, no other process can proceed with account setup or training scheduling until verification is complete. This ensures a smooth and orderly onboarding process.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Steps:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1. Start Document Verification Process&lt;BR /&gt;2. Acquire Lock "OnboardingLock" (Employee ID as parameter)&lt;BR /&gt;3. If Lock Acquired:&lt;BR /&gt;&amp;nbsp; &amp;nbsp;3.1 Verify Employee Documents&lt;BR /&gt;&amp;nbsp; &amp;nbsp;3.2 Release Lock "OnboardingLock"&lt;BR /&gt;4. End Document Verification Process&lt;/P&gt;&lt;P&gt;5. Start Account Setup Process&lt;BR /&gt;6. Acquire Lock "OnboardingLock" (Employee ID as parameter)&lt;BR /&gt;7. If Lock Acquired:&lt;BR /&gt;&amp;nbsp; &amp;nbsp;7.1 Setup Employee Account&lt;BR /&gt;&amp;nbsp; &amp;nbsp;7.2 Release Lock "OnboardingLock"&lt;BR /&gt;8. End Account Setup Process&lt;/P&gt;&lt;P&gt;9. Start Training Scheduling Process&lt;BR /&gt;10. Acquire Lock "OnboardingLock" (Employee ID as parameter)&lt;BR /&gt;11. If Lock Acquired:&lt;BR /&gt;&amp;nbsp; &amp;nbsp;11.1 Schedule Training Sessions&lt;BR /&gt;&amp;nbsp; &amp;nbsp;11.2 Release Lock "OnboardingLock"&lt;BR /&gt;12. End Training Scheduling Process&lt;BR /&gt;&lt;BR /&gt;The more detailed flow to build you can follow&amp;nbsp;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/1843"&gt;@devneetmohanty07&lt;/a&gt;&amp;nbsp;steps.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 08:19:51 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/111005#M50003</guid>
      <dc:creator>Chakkravarthi_PR</dc:creator>
      <dc:date>2024-05-30T08:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Locking real time use case</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/111009#M50007</link>
      <description>&lt;P&gt;Thank you for the detailed scenario! It is really helpful.&lt;BR /&gt;I may be less knowledgeable in this concept, so I have few doubts.&lt;/P&gt;&lt;P&gt;1) Is this scenario requires multipart processing?&lt;BR /&gt;2) Is locks are environment specific or process specific?&lt;BR /&gt;&lt;BR /&gt;It would be great if you can explain, how environment lock concept works in this scenario, if we have 10 employees details in the Work Queue.&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 10:18:46 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/111009#M50007</guid>
      <dc:creator>DipinDevP</dc:creator>
      <dc:date>2024-05-30T10:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Locking real time use case</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/111010#M50008</link>
      <description>&lt;P&gt;Thank you very much&amp;nbsp;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/1843"&gt;@devneetmohanty07&lt;/a&gt;&amp;nbsp;for the detailed explanation! Your excellent knowledge in the concept appreciated.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;From the reads, I understand we can design the process in a way to decide whether process needs to wait for the lock release or skip the particular part of the workflow without waiting for the lock. Please correct me if I am wrong.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I have a question - Suppose we designed a process - if one instance of the process acquired the lock, other instance can skip that part of the workflow. First instance acquired the lock and entered the workflow, but somehow second instance processing slowly (due to some technical issues) and didn't reach the part of acquire lock stage even after first instance completed the workflow part and released the lock. In this case, I think second instance also will get the chance to enter the workflow which is against the expected design. Please correct me, If I am wrong, or else do we need to handle this situation in the design itself?&lt;/P&gt;&lt;P&gt;Please ignore if it explained already.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 10:40:16 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/111010#M50008</guid>
      <dc:creator>DipinDevP</dc:creator>
      <dc:date>2024-05-30T10:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Locking real time use case</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/111011#M50009</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Is this scenario requires multipart processing?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Yes, this scenario involves multipart processing. Multipart processing means that the onboarding tasks are divided into separate processes (document verification, account setup, and training scheduling). These tasks are executed in a specific sequence to ensure that all steps are completed correctly and no conflicts arise.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Are locks environment-specific or process-specific?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Locks in BP are &lt;STRONG&gt;environment-specific&lt;/STRONG&gt;. This means that the locks are available across the entire BP environment and are not confined to a single process. When a lock is acquired, it affects all processes running in that environment, ensuring that no other process can access the locked resource until the lock is released.&lt;BR /&gt;&lt;BR /&gt;I will give you a rough overview of steps:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Work Queue Initialization:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The Work Queue contains items representing the onboarding tasks for 10 employees, each identified by a unique Employee ID.&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Document Verification Process:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Start Document Verification Process&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Acquire Lock "OnboardingLock" (Employee ID as parameter)&lt;/STRONG&gt;&lt;UL&gt;&lt;LI&gt;The process attempts to acquire a lock specific to the current employee's ID, e.g., OnboardingLock_EmployeeID1.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;If Lock Acquired:&lt;/STRONG&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Verify Employee Documents&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Release Lock "OnboardingLock"&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;End Document Verification Process&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Account Setup Process:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Start Account Setup Process&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Acquire Lock "OnboardingLock" (Employee ID as parameter)&lt;/STRONG&gt;&lt;UL&gt;&lt;LI&gt;The process attempts to acquire a lock specific to the same employee's ID.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;If Lock Acquired:&lt;/STRONG&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Setup Employee Account&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Release Lock "OnboardingLock"&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;End Account Setup Process&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Training Scheduling Process:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Start Training Scheduling Process&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Acquire Lock "OnboardingLock" (Employee ID as parameter)&lt;/STRONG&gt;&lt;UL&gt;&lt;LI&gt;The process attempts to acquire a lock specific to the same employee's ID.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;If Lock Acquired:&lt;/STRONG&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Schedule Training Sessions&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Release Lock "OnboardingLock"&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;End Training Scheduling Process&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;Now with&amp;nbsp;10 employees in the Work Queue:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Processing Each Employee:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;For each employee in the Work Queue, the three processes (Document Verification, Account Setup, Training Scheduling) will run sequentially.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;EmployeeID1:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Document Verification Process acquires OnboardingLock_EmployeeID1, completes the verification, and releases the lock.&lt;/LI&gt;&lt;LI&gt;Account Setup Process acquires OnboardingLock_EmployeeID1, completes the setup, and releases the lock.&lt;/LI&gt;&lt;LI&gt;Training Scheduling Process acquires OnboardingLock_EmployeeID1, schedules training, and releases the lock.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;EmployeeID2:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The same steps are repeated for EmployeeID2, and so on.&lt;BR /&gt;&lt;H3&gt;Detailed Example for One Employee&lt;/H3&gt;&lt;H4&gt;EmployeeID1:&lt;/H4&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Document Verification Process:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Start Process&lt;/LI&gt;&lt;LI&gt;Acquire Lock OnboardingLock_EmployeeID1&lt;/LI&gt;&lt;LI&gt;If Lock Acquired:&lt;UL&gt;&lt;LI&gt;Verify Employee Documents&lt;/LI&gt;&lt;LI&gt;Release Lock OnboardingLock_EmployeeID1&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;End Process&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Account Setup Process:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Start Process&lt;/LI&gt;&lt;LI&gt;Acquire Lock OnboardingLock_EmployeeID1&lt;/LI&gt;&lt;LI&gt;If Lock Acquired:&lt;UL&gt;&lt;LI&gt;Setup Employee Account&lt;/LI&gt;&lt;LI&gt;Release Lock OnboardingLock_EmployeeID1&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;End Process&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Training Scheduling Process:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Start Process&lt;/LI&gt;&lt;LI&gt;Acquire Lock OnboardingLock_EmployeeID1&lt;/LI&gt;&lt;LI&gt;If Lock Acquired:&lt;UL&gt;&lt;LI&gt;Schedule Training Sessions&lt;/LI&gt;&lt;LI&gt;Release Lock OnboardingLock_EmployeeID1&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;End Process&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;Environment-Specific Locks:&lt;/STRONG&gt; Locks are environment-specific, meaning they are accessible across all processes within the Blue Prism environment.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 11:11:04 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/111011#M50009</guid>
      <dc:creator>Chakkravarthi_PR</dc:creator>
      <dc:date>2024-05-30T11:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Locking real time use case</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/111012#M50010</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/58907"&gt;@DipinDevP&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Yes, your understanding is correct that&amp;nbsp;&lt;SPAN&gt;we can design the process in a way to decide whether process needs to wait for the lock release or skip the particular part of the workflow without waiting for the lock.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The locking mechanism by design is built to handle scenarios where multiple runtime resources access the same flow at the same time itself even though there are instances when let say if one resources responded slowly it can acquire lock by the time other resource released the same in it's own session.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Such discrepancies should be handled as part of the solution design itself. For instance, as a best practice, whenever we deal with addition of items to queues, we use environment locks but at the same time we also use additional logic to check if each of the queue items are already added with the same Item Key or not so that addition of duplicate items can be avoided.&lt;/P&gt;&lt;P&gt;Also, one other method that I have seen people using is putting the Release Lock action near the end of the entire process. In such cases, they use Acquire Lock at the beginning but use Release Lock towards the very end of the process which ensures that for a specific action even if we are using environment locks, they shall be released only towards the very end of the current session ensuring the other parallel process session does not picks it up during any time the first session is actively running. However, I don't recommend this as it becomes tough to locate the release actions from a readability perspective during audits and code reviews and potentially one can miss to have this added properly while working on the exception handling part.&lt;/P&gt;&lt;P&gt;For scenarios, where let say you need to send out an email based on the completed or failed queue items, we generally keep such reporting logics in a separate process itself and we ensure that only one runtime resource is running that automation on the scheduler level itself. So multi-bot architecture itself won't be applicable for such reporting-based processes.&lt;/P&gt;&lt;P&gt;In my other projects, we also have used session specific files or process specific database tables where we can read and update flag values from our runtime resources to action upon items as an extra check to control a set of actions from getting executed on top of Environment Locking.&lt;/P&gt;&lt;P&gt;Again, while designing the solution, each of the situation needs to be considered and just having Environment Locks by itself can't help.&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 11:18:48 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/111012#M50010</guid>
      <dc:creator>devneetmohanty07</dc:creator>
      <dc:date>2024-05-30T11:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Locking real time use case</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/111045#M50029</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/56759"&gt;@Chakkravarthi_PR&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/1843"&gt;@devneetmohanty07&lt;/a&gt;&amp;nbsp;for the detailed explanation. Much appreciated!&lt;BR /&gt;I may have more queries on this topic and other topics. Expecting continuous support from everyone.&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2024 03:49:51 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/111045#M50029</guid>
      <dc:creator>DipinDevP</dc:creator>
      <dc:date>2024-05-31T03:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Locking real time use case</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/119817#M53060</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thank you for these posts, thanks to I know more about Environment Locks.&lt;/P&gt;&lt;P&gt;However, do I understand correctly that if I run a process on several resources and let's say each resource is different (e.g. slower or faster) if the process on resource 1 executes the last element from the queue three times faster than it will on resource 2 and moves on to the final steps faster, e.g. starts removing processed elements from the queue (see template 2 - advanced scenario), then the environment lock makes no sense, because de facto it is difficult to determine the time for which this lock should be set, to avoid situation when the process from another resource will finish last element and will go to the same steps, means starts removing processed elements from the queue.&lt;/P&gt;&lt;P&gt;Additionally, if the process is working on 2 or 3 resources and after an hour or two of work it turns out that I should run the process on the next resource to complete the elements according to the SLA or faster before the deadline, do I understand correctly that here too the environment lock that we have when adding elements to the queue makes no sense (here we have to add an additional check whether the same element exists in the queue).&lt;/P&gt;&lt;P&gt;Please let me know if my understanding is correct.&lt;/P&gt;&lt;P&gt;Please also provide the methods you use to ensure that selected process steps are executed only once, regardless of the number of resources the process is running on and their execution time (apart from locking the environment).&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2025 21:18:26 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/119817#M53060</guid>
      <dc:creator>Ernest1</dc:creator>
      <dc:date>2025-04-08T21:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Locking real time use case</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/119886#M53075</link>
      <description>&lt;P&gt;Great answers on this thread!&amp;nbsp; As mentioned,&amp;nbsp; the main use of environment locks is to build logic into automations that allow multi-robot solutions to have parts of a processes logic that only one robot can do at a time.&amp;nbsp; That might be logic related to setting a system password or more often logic related to loading the work queue.&lt;BR /&gt;&lt;BR /&gt;You might be wondering why they were called Environmental Locks?&amp;nbsp; Environmental locks were originally created many years ago as a mechanism to help multiple background task automations running at the same time in the same VDI environment when there was some part or parts of the automation that did require foreground interactions.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;So, as an example,&amp;nbsp; you have 10 robots all running in the same windows environment and 99% of the time they are interaction with a mainframe application using background objects.&amp;nbsp; This allows concurrent robots to work in the same environment.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;However...&amp;nbsp; the mainframe emulator has a problem where in just one area/keystroke/function the standard hllapi api interface does not work for some reason.&amp;nbsp; For that one component you need to do a foreground global send keys of a keystroke.&lt;BR /&gt;All the robots running in the same environment cannot all do this foreground function at the same time,&amp;nbsp; so that is what environment locks were originally designed for.&amp;nbsp; It was a method to lock the environment so that only one of the several robots running in the same environment can do the function(s) requiring foreground interactions.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Apr 2025 10:05:56 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/119886#M53075</guid>
      <dc:creator>Denis__Dennehy</dc:creator>
      <dc:date>2025-04-12T10:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Locking real time use case</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/119900#M53079</link>
      <description>&lt;P&gt;I understand that, but do you have any methods that you use to make sure that only selected process steps are executed only once, regardless of the number of resources on which the process is launched. I would like something that will block selected process steps once they have been executed and that steps will not be longer available to execute for the process on the rest resources.&lt;/P&gt;&lt;P&gt;For example, you launch process X has that steps:&lt;BR /&gt;1. Step A (duration 8 min)&lt;BR /&gt;2. Step B (duration 8 min)&lt;BR /&gt;3. Step C (duration 8 min)&lt;BR /&gt;4. Step D (duration 25 min)&lt;/P&gt;&lt;P&gt;in the following order:&lt;BR /&gt;on Resource 1 - 9:00 AM (process performed Step A, B, C and go to step D)&lt;BR /&gt;on Resource 2 - 9:30 AM (process on resource 1 still working and I would that this process avoid steps A, B, C and perform step D)&lt;BR /&gt;on Resource 3 - 10:00 AM (processes on resource 1 and 2 still working and I would that this process avoid steps A, B, C and perform step D)&lt;BR /&gt;on Resource 4 - 10:30 AM (processes on resource 1, 2 and 3 still working and I would that this process avoid steps A, B, C and perform step D)&lt;/P&gt;&lt;P&gt;Of course I have a solution (eg. I use env variable to store flags if some steps was done), but I would like to know others tips.&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;M&lt;/P&gt;</description>
      <pubDate>Mon, 14 Apr 2025 17:15:05 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/119900#M53079</guid>
      <dc:creator>Ernest1</dc:creator>
      <dc:date>2025-04-14T17:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Real-time Environment Locking - what are the use cases?</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/119904#M53081</link>
      <description>&lt;P&gt;Hey everyone, just dropping to say that this is a really interesting discussion with lots of fantastic, practical advice - so I'm going to feature it on our homepage banner.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/58907"&gt;@DipinDevP&lt;/a&gt;&amp;nbsp;for kicking this off, thanks&amp;nbsp;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/16677"&gt;@Denis__Dennehy&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/1843"&gt;@devneetmohanty07&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/56759"&gt;@Chakkravarthi_PR&lt;/a&gt;&amp;nbsp;for excellent input and thank you&amp;nbsp;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/27860"&gt;@Ernest1&lt;/a&gt;&amp;nbsp;for asking even more interesting questions!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Apr 2025 09:51:42 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/119904#M53081</guid>
      <dc:creator>Michael_S</dc:creator>
      <dc:date>2025-04-15T09:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: Environment Locking real time use case</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/119910#M53082</link>
      <description>&lt;P&gt;Hi Ernest1, Another way to design your solution solution where different steps can only be done once and you want different resources to be able to do the work if they have capacity would be to have a separate work queue for each step.&amp;nbsp; Your process is created with the logic to work 4 queues instead of 1 depending on the priorities of the separate queues and the work search logic you build within your process.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Apr 2025 14:48:44 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/119910#M53082</guid>
      <dc:creator>Denis__Dennehy</dc:creator>
      <dc:date>2025-04-15T14:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Real-time Environment Locking - what are the use cases?</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/119911#M53083</link>
      <description>&lt;P&gt;Hi Dipin&lt;BR /&gt;The Blue Prism developer training has exercises related to adding items to work queues that use environment locks.&lt;BR /&gt;The flow is:&lt;BR /&gt;Robot Resource 1, running Process A:&amp;nbsp; Gets Environment Lock called "My Work Queue Loading Lock"&lt;BR /&gt;Robot Resource 1, running Process A: Runs logic to load work into my Work Queue.&lt;BR /&gt;Robot Resource 2, also running Process A:&amp;nbsp; Tries to get Environment Lock called "My Work Queue Loading Lock" but cannot,&amp;nbsp; so it cannot load work at the same time as Robot 1.&amp;nbsp; Being prevented from loading work means 2 robots cannot load work at the same time which might duplicate work incorrectly.&amp;nbsp; Instead it either goes on to do work in the queue or into waiting logic that waits for work to be in the queue.&lt;BR /&gt;Robot Resource 1, running Process A:&amp;nbsp; Releases Environment Lock called "My Work Queue Loading Lock"&lt;/P&gt;&lt;P&gt;My previous example with 10 robots all working in the same windows desktop environment would be like this:&lt;BR /&gt;Robot Resource 1, running Process A:&amp;nbsp; Gets lock called "Foreground Interface Lock - Process A"&lt;BR /&gt;Robot Resource 1, running Process A:&amp;nbsp; Then performs an action that requires the windows foreground.&amp;nbsp; For example activating a window and sending a global keystroke.&lt;BR /&gt;Robot Resource 1, running Process A:&amp;nbsp;Gets lock called "Foreground Interface Lock - Process A"&lt;BR /&gt;Robot Resources 2 to 10, all also running Process A:&amp;nbsp; If any of the other robots running in the same environment needs to use the foreground they will also try to get the lock but fail.&amp;nbsp; they will go into a loop that tries to get the lock again every few seconds.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Apr 2025 14:46:49 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/119911#M53083</guid>
      <dc:creator>Denis__Dennehy</dc:creator>
      <dc:date>2025-04-15T14:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: Real-time Environment Locking - what are the use cases?</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/119929#M53087</link>
      <description>&lt;P&gt;Hi Denis,&amp;nbsp;my process from example was created and is running on one queue (two in total: Parent and Child) and I can run that process on different resources/users on the same time/or different time and they work on the same queues and then not duplicate any works/items.&lt;/P&gt;&lt;P&gt;I have prepared logic that does not repeat steps at the beginning of the process (especially for Populate Queue) and at the end (especially for creating reports and moving files to arch).&lt;BR /&gt;I used various available options: environmental locks, checking if there is any element in the queue, before adding an element to the queue if there will be a duplicate, etc.). However, I would still like to know if it is possible to execute a &lt;U&gt;fragment of the process only once&lt;/U&gt; if this process is running in parallel on other resources in given time or range time (e.g. once on given day) and how to do this? Any more tips?&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 14:17:36 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/119929#M53087</guid>
      <dc:creator>Ernest1</dc:creator>
      <dc:date>2025-04-16T14:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: Real-time Environment Locking - what are the use cases?</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/119931#M53088</link>
      <description>&lt;P&gt;It should be possible Earnest,&amp;nbsp; can you simply get an environment lock at the start of a process sub-page and if it is already use exit the process sub-page immediately instead of of going through the actions in that page.&amp;nbsp; If you only want each page to be run once per day have a work queue item just for recording when the page is worked so that the last timestamp on that could also be checked.&lt;BR /&gt;However, it very much seems the solution we are talking about makes set and fast decisions within the process about how and when the work is worked.&amp;nbsp; Maybe think about a solution where those decisions about how many robots can do the work and on which machines is something the controllers can make at run time,&amp;nbsp; and change their mind depending on business need.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 16:58:14 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/119931#M53088</guid>
      <dc:creator>Denis__Dennehy</dc:creator>
      <dc:date>2025-04-16T16:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Real-time Environment Locking - what are the use cases?</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/119932#M53089</link>
      <description>&lt;P&gt;Thanks Denis, timestamp I think it might be a good solution, alternatively I also considered using properties values (from Credentials) ​​and when a sub-page is executed by one process it inserts a flag or something like status into the properties value (like Sub-Page Status = Worked / Not Worked) and then all robots check this flag every time when they call to the Sub-page.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 14:15:01 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Real-time-Environment-Locking-what-are-the-use-cases/m-p/119932#M53089</guid>
      <dc:creator>Ernest1</dc:creator>
      <dc:date>2025-04-17T14:15:01Z</dc:date>
    </item>
  </channel>
</rss>

