chore: rough implementation of Domain Process Bindings LogicalInverse__c #99
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Simple implementation of the
DomainProcessBinding__mdt.LogicalInverse__c
in the Domain Process Coordinator in O(n²).There are no tests added or updated as it seems almost impossible to create a test class for the Domain Process Coordinator. At least until the Custom Metadata Type queries are added to Force DI and then maybe something could be mocked up. Instead, I've done some simple manual tests with some basic Criteria and Action classes.
This can then be tested by simply inserting Leads. With the following Anonymous Apex script:
With
LogicalInverse__c == False
we get:With
LogicalInverse__c == True
we get:Why a O(n²) algorithm for this?
I originally wanted to write a simple solution like this:
This, however, would not work because it has the side-effect of eliminating all copies of records with an identical HashCode (i.e. all identical records). If I run the script above with this code, I get back:
To me this seemed like an unacceptable side-effect and thus I've opted for the approach in this Pull Request.
This change is