Alternate Representation for Resource Allocation - Gnorion/BizVR GitHub Wiki
back to Tutorial Creating Decision Table Functions
Alternate Representation
Most likely there would be a separate function for checking that the resource capabilities meet the task requirements.
This allows you to reveal a little more detail on the high level decision diagram.
NOTES
As soon as a resource is allocated it is marked as unavailable. This means we might not allocate the least expensive option. An alternative approach is to let the rules allocate all suitable resources to all possible tasks in one decision table and then in a second decision table review the assignments and pick the cheapest option.
There's an example of that here: Transportation Scheduling Execution Example
The decision tables are shown here Case Study Transportation Scheduling Approach 4 Pure Functions
By providing an additional input (named method)we can control how the decision table performs the allocation. Either first-come-first-served or assign all possible:
The input json would now look like this:
And now there will be a lot more (potential) assignments in the output:
You can see that task1 has only one possible resource but task2 has three possible resources. truck3 is not suitable for either task.
Its important to remember that if you refer to additional variables in the rules then need to be declared in the input box on the decision diagram. The validation engine will remind you with a message if you forget: