Refer to the exhibits.
What payload and quantity are logged at the end of the main flow?
Refer to the exhibits.
What payload and quantity are logged at the end of the main flow?
The payload processed in the 'For Each' scope does not change outside the scope, hence it remains [1,2,3,4]. The variable 'quantity' starts at 10 and is incremented by 1 during each iteration of the 'For Each' loop. Since the array has four elements, the variable is incremented four times, resulting in a final value of 14. Therefore, the logged payload and quantity are [[1,2,3,4], 14].
C is the correct answer. updated Variable are accessible after for each scope
I tested in Mule4, C is correct Please, why for each are cant change the payload ? [ "a", "b", "c", "d" ], 14 ]
B is correct
C is correct. The variable is updated in the for each.
yes, i have implemented on anypoint studio .
B is not Correct. C is the correct Answer. INFO 2021-05-29 16:38:38,378 [[MuleRuntime].uber.46: [batchprocessingtest].q101-flow.CPU_LITE @5014e812] [processor: q101-flow/processors/4; event: 36b4db91-c06e-11eb-bcd9-40b89a99be08] org.mule.runtime.core.internal.processor.LoggerMessageProcessor: [[1, 2, 3, 4], 14]
variables can be incremented in for each but payload is not affected in it
C is correct , in for each payload is not changed but var can be changed.
C. [[1,2,3,4], 14] - Because for-each scope DOESN'T MODIFY the payload!!!
Answer is C [[1, 2, 3, 4], 14]
Logic of why C is correct: a. For Each does not modify the current payload. The output payload is the same as the input. b. The variable value keeps incrementing per iteration and is available outside the For each scope.
C is the correct
B is correct answer. INFO 2021-08-29 20:48:45,037 [[MuleRuntime].uber.01: [foreach].foreachFlow.CPU_LITE @742deb8f] [processor: foreachFlow/processors/3; event: 1e8b1a20-0902-11ec-b498-a0c589d689a8] org.mule.runtime.core.internal.processor.LoggerMessageProcessor: [[1, 2, 3, 4], 10]