Another way would be the possibility to pass in an object instead of loads of single variables. If I understand you correctly (simplified example):
You have 1 Child job, lets call it Child1. This job has no job variables predefined, but can take x number of variables from any parent jobs.
Parent1 calls Child1 with variables a, b and c. These are now defined in Child1 (because you check 'update job variable')
Parent2 later calls Child1 with variables a and b. But since variable c is already defined in Child1 now, it causes problems.
Is that correct?
If so, In my opinion it would be better to be able to pass in an object instead of x number of variables. Because then Child1, Parent1 and Parent2 could all have a parameter called say varObj. This could be a JSON object for example:
Parent1 passes in {a:1, b:2, c:3}
Parent2 passes in {a:2, b:4}
For those that are unfamilliar with JSON, Parent1 has defined an object with properties a, b, and c, with values 1, 2, 3 respectively.
Child1 then checks which sub-variables are defined in the object, and acts accordingly. This would resemble how JavaScript works.
No need to delete variables in Child1, since it always expects one and only object variable anyway.
Edited by user
2017-09-07T12:03:49Z
|
Reason: Not specified