Jump to content

Testing if resource is seized before releasing it


PierreUL
 Share

Recommended Posts

Hi everybody!

I have a server where 3 workers or less are seized at te same time to complete the processing. In the "After_processing" process logic I would like to verify if a resource is indeed seized or not before to try to release it. I tried to use State variables which I give specific values at some strategical steps but I still have failures that occurs once in a while. I have no clue on how to do else. Could someone help me to find a "clean"way to do it ?

Thank's in advance!

Pierre

Link to comment
Share on other sites

Remembering that the entity in the processing station is the Owner of the Resources i.e. the server;  and all three workers, if you place a watch on the entity and drill into "functions" of the entity in the watch window, you will find the variables for your conditional logic which you seek (see attached).

Server.Processing.Contents.FirstItem.ModelEntity.SeizedResources.xxxx 

should suffice....

 

 

image.thumb.png.d4623f2b639061edc48776dc658b06da.pngimage.png.fe32c8256133ac3eff0b79f580af817f.png

Edited by MEagar
Update
Link to comment
Share on other sites

With a decide step just before the release step in my process logic, I was able to test if the worker is seized. The condition I used is : ServerName.Processing.Contents.FirstItem.SeizedResources.Contains(WorkerName[1]).

So thanks a lot! It's exactly what I needed! :)

Edited by PierreUL
Link to comment
Share on other sites

On 7/8/2018 at 6:21 AM, PierreUL said:

With a decide step just before the release step in my process logic, I was able to test if the worker is seized. The condition I used is : ServerName.Processing.Contents.FirstItem.SeizedResources.Contains(WorkerName[1]).

So thanks a lot! It's exactly what I needed! :)

Glad this helps !!

Link to comment
Share on other sites

×
×
  • Create New...