# Run Java Code with an Array Generator DPL

# Run Java Code with an Array Generator DPL

Use an Array Generator DPL with Java code only when the test requires generated or transformed data that cannot be handled by simpler DPL configuration. Keep Java logic focused on data preparation and avoid embedding secrets or environment-specific values.

## Before using this pattern

- Confirm the Java version supported by the AIQ execution environment.
- Validate the code with a small, controlled data set.
- Keep credentials, URLs, and tenant-specific values in approved secure configuration locations.
- Document input shape, output shape, and expected failure behavior.

## Validation workflow

1. Run the DPL with a small sample.
2. Confirm generated values map correctly into Scenario Editor steps.
3. Review output for Java exceptions, empty arrays, and malformed values.
4. Scale only after the DPL is repeatable and easy to troubleshoot.

**Last updated:** September 8, 2026