Hello! I'm curious whether or not the amount of data we pass in and out of an Expression Rule has any impact on performance.
Consider the following scenario.
I have a pv!recordType process variable, with three fields: recordType.field1, recordType.field2, recordType.field3.
I want to use two of those fields in an Expression Rule to obtain an Output to use later in the Process Model.
When configuring rule inputs for the Expression Rule, I am facing two options:
1. Pass the whole pv!recordType into the Expression and access the fields within the expression, resulting in one rule input "recordType".
2. Create two separate rule inputs, "field1" and "field2", and access the process variable fields when passing data into the Expression Rule.
Now my question is basically this: is there a real difference between these two approaches, or is it a matter of convention?
Discussion posts and replies are publicly visible
I do not see any difference in performance, but in possible bugs.
When I have a rule input of a record type, I expect to get a fully populated record structure. When people try to optimise their code by selecting only specific fields, this can lead to interesting situations.
So you're suggesting that the first approach is safer? I agree, it also seems easier for a person who will be reusing this rule.
Is it the same with Process Models? I think I read somewhere in the Docs that it is a good practice to minimize the amount of data passed between Processes, but I'm not sure.