# Set of shared resources

**URL:** <https://www.finalbuilder.com/forums/t/set-of-shared-resources/5582>\
**Category:** Discussion\
**Created:** [August 9, 2017, 1:33am UTC](https://www.finalbuilder.com/forums/t/set-of-shared-resources/5582 "2017-08-09T01:33:56Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![rynardald](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/r/a88e57/32.png) [@rynardald](https://www.finalbuilder.com/forums/u/rynardald)\
**Post date:** [August 9, 2017, 1:33am UTC](https://www.finalbuilder.com/forums/t/set-of-shared-resources/5582/1 "2017-08-09T01:33:56Z")

</div>

Hi Support-Team,  
can I somehow create a set of shared resources so that a build needs to take one but its not specified which one?  
  
Scenario:  
I have multiple shared resources and each of them represents a directory. When a build starts I want that the build aquires/locks one of these resources (directories). If there is no resource available he should wait until he can aquire one. During the build I want know which resource/directory was aquired and want to work on/with it.  
  
Albrecht

---

<div class="post-metadata">

**Author:** ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)\
**Post date:** [August 10, 2017, 7:32am UTC](https://www.finalbuilder.com/forums/t/set-of-shared-resources/5582/2 "2017-08-10T07:32:30Z")

</div>

Hi Albrecht,  
  
You can achieve the first part of your question using a [Quota List shared resource](http://wiki.finalbuilder.com/display/continua/Types+of+Shared+Resource). This can have multiple labels (one for each of your directories). When you define the shared resource lock for a configuration or stage, you can choose Acquire Any to pick any one to the quota list labels.   
  
Unfortunately, we don’t have any expression defined as yet to query which shared resource label(s) were acquired by your build. We have however been looking into this today and we hope to be able to implement a $Build.SharedResourceLabels$ expression for the next version&nbsp;in the next day or two.&nbsp;

---

<div class="post-metadata">

**Author:** ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)\
**Post date:** [August 17, 2017, 7:36am UTC](https://www.finalbuilder.com/forums/t/set-of-shared-resources/5582/3 "2017-08-17T07:36:07Z")

</div>

Hi&nbsp;Albrecht,  
  
We just uploaded a [new version 1.8.1.579](https://www.finalbuilder.com/downloads/continuaci/continuaci-version-history-v1.8.1)&nbsp;which includes new&nbsp;Shared Resources expression objects you can use to know which label(s) were acquired.

---

<div class="post-metadata">

**Author:** ![rynardald](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/r/a88e57/32.png) [@rynardald](https://www.finalbuilder.com/forums/u/rynardald)\
**Post date:** [August 18, 2017, 10:24am UTC](https://www.finalbuilder.com/forums/t/set-of-shared-resources/5582/4 "2017-08-18T10:24:14Z")

</div>

Thanks Dave, I will test it soon.

---

<div class="post-metadata">

**Author:** ![rynardald](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/r/a88e57/32.png) [@rynardald](https://www.finalbuilder.com/forums/u/rynardald)\
**Post date:** [October 16, 2017, 1:33am UTC](https://www.finalbuilder.com/forums/t/set-of-shared-resources/5582/5 "2017-10-16T01:33:56Z")

</div>

Hi Dave,  
i tested it now. But with the current version I have one problem. I the previous version I had the possibility to get the labels of a specific shared resource ($Build.SharedResourceLabels.SharedResourceName$). And on this object I was able to get some additional informations (get all, the first or the last label …). In the current Version 1.8.1.630 I couldn’t find this object anymore. Is it removed completly or only moved to another place?

---

<div class="post-metadata">

**Author:** ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)\
**Post date:** [October 17, 2017, 5:37am UTC](https://www.finalbuilder.com/forums/t/set-of-shared-resources/5582/6 "2017-10-17T05:37:45Z")

</div>

Hi Albrecht,  
  
The object you are looking for is $Build.SharedResources._FullSharedResourcePath_$&nbsp;  
  
e.g. $Build.SharedResources.Server.Namespace.SR1.Labels$&nbsp;

---

<div class="post-metadata">

**Author:** ![rynardald](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/r/a88e57/32.png) [@rynardald](https://www.finalbuilder.com/forums/u/rynardald)\
**Post date:** [October 17, 2017, 6:46am UTC](https://www.finalbuilder.com/forums/t/set-of-shared-resources/5582/7 "2017-10-17T06:46:54Z")

</div>

Hi Dave,  
thanks for help. I found that the ‘Agent’-object is not displayed as popup when i have inserted $Build.SharedResources. So I had to type it manually and it was not clear for me that this object is available. Will it be readded in the next version? And i would be great if you can update [Expression-Objects-help](http://wiki.finalbuilder.com/display/continua/Expression+Objects) with the new objects.

---

<div class="post-metadata">

**Author:** ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)\
**Post date:** [October 17, 2017, 7:17am UTC](https://www.finalbuilder.com/forums/t/set-of-shared-resources/5582/8 "2017-10-17T07:17:27Z")

</div>

Hi Albrecht,  
  
The Agent object is available in expressions only if an agent shared resource lock is associated with the stage. Ensure that it has been added to the Shared Resource Locks tab in the Stage Options dialog and the stage has been saved.  
  
We’ll get on to updating the documentation soon - we all prefer coded so it often gets left behind.

---

<div class="post-metadata">

**Author:** ![rynardald](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/r/a88e57/32.png) [@rynardald](https://www.finalbuilder.com/forums/u/rynardald)\
**Post date:** [October 17, 2017, 11:23am UTC](https://www.finalbuilder.com/forums/t/set-of-shared-resources/5582/9 "2017-10-17T11:23:02Z")

</div>

Hi Dave,  
I checked that the shared-resource-locks are assigned to the current stage. But it did not work. I tested it with a older configuration and there it works only for shared-resource-locks which where assigned some time ago (before i made the last update).  
It seems that either with the shared-resource-locks itself or with the assignment of shared-resource-locks to stages went something wrong in the last update.

---

<div class="post-metadata">

**Author:** ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)\
**Post date:** [October 18, 2017, 12:37pm UTC](https://www.finalbuilder.com/forums/t/set-of-shared-resources/5582/10 "2017-10-18T12:37:19Z")

</div>

Hi Albrecht,  
  
Did you save all changes to the stage editor e.g. by clicking on the Save All button before testing this? The auto-completion for expressions is calculated server-side so you need to save the stages before it knows about any changes. Clicking on Save in the dialog&nbsp;does not save changes to the server, the changes are stored client-side until one of the Save buttons is clicked on the main page. We are going to change this to an OK button to avoid confusion.  
  
After clicking Save All, all the associated shared resources are available to expressions in our tests. Nothing has changed in the code to do this between the last two versions.

---

<div class="post-metadata">

**Author:** ![rynardald](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/r/a88e57/32.png) [@rynardald](https://www.finalbuilder.com/forums/u/rynardald)\
**Post date:** [October 23, 2017, 6:55am UTC](https://www.finalbuilder.com/forums/t/set-of-shared-resources/5582/11 "2017-10-23T06:55:44Z")

</div>

Hi Dave,  
I tested it. I changed the aquired Shared-resource-locks pressed Save-All-Stages and edited a existing Log-Action. After $Build.SharedResources.$ there was no popup. I had in this stage some already existing aquired locks and a new one. I tested it also with a new Log-Action. Also with no success.   
But anyway it is only the popup, if i type it manually the expression is evaluated.  
Thanks for help.
