Compose: is a lightweight action which can be used to store a value or the result of an expression temporarily. Itโs ideal when:
- You need to store a value temporarily.
- You donโt need to update the value
- You donโt need to provide its data type
Initialize Variable creates a named variable with a defined type (String, Integer, Boolean, Array, Object). Itโs useful when:
- You need to update the value later.
- You want to reference it across various steps
- You are working with loops or conditional logic
Comparison between Compose and Initialize Variable
| Feature | Compose | Initialize Variable |
| Naming Required | โ No | โ Yes |
| Can Update Value | โ No | โ Yes |
| Type Specification | โ No | โ Yes (String, Integer, etc.) |
| Ideal For | One-time use, expressions | Reusable, updatable data |
| Performance Impact | โ Lightweight | โ ๏ธ Slightly heavier |
| Example | Used to store a one-time value or expression result, like price * 0.1 for calculating a discount. | Used to create a named value that can be updated later, like TotalAmount to accumulate order totals in a loop. |


