Hi,
I have the following concern, depending on an option selected in the graphical interface by the user I must update only one of the two business variables represented in the attached image and not both variables at the same time.
When representing this case in a conditional structure it would look something like this:
if (condition) {
// update businessVarA
} else {
// update businessVarB
}
So, is there any way to update only one of those two business variables so that the other variable is not stored with all its null attributes in the database?
Hi,
You could evaluate the condition using a BPMN Gateway and sequence flows with 2 automatic activities (one for businessVarA
update and another for businessVarB
)
HTH
Romain
Thanks for the answer, and in the case of adding more than two business variables is it advisable to use a BPMN gateway or is there some other way to update only one of those business variables?
If the variable update is conditional, yes, I recommend using a specific activity and BPMN gateways for condition evaluation.
I think it is a good practice to use the BPMN visual language as much as possible and avoid hidding the process logic in operation scripts.