I'm looking to create a custom activity (using the ProcessFlow module SDK) that can acquire multiple types of Resources simultaneously. No Resource should be acquired until all can be acquired, and ideally requests for multiple Resources will track on all of the requested resources Request Content and Request Staytime (even if some of the resources are available).
I can easily check if a resource is available, so that solves one problem:
getstat(theresource, "ResourceAvailable", STAT_CURRENT)
However, I can't figure out how the methods in the Acquire class works. This is my understanding so far:
- Token Enters
- Acquire::onBlockingStart is called.
- I am assuming this is where most of the logic is. My best guess is that this does something along the lines of grab the reference to the resource and call Resource::acquireResource, but I can't figure out what half of the parameters for this function are.
- If max wait timer is triggered, Acquire::releaseToken
- Acquire::onBlockingFinish (token is automatically released)
So, I am looking to understand:
- The order of operations starting with when a token enters an Acquire block
- How I can acquire a resource (the parameters to Resource::acquireResource are challenging to figure out without seeing under the hood)
- If it would be possible to have a request, that can be fulfilled, not be fulfilled until something else allows it to (might have to create a custom Resource block as well?)
Thank you