Model reference
Reference Figure: Operation Inputs and Outputs
Every operation declares its inputs and outputs. This figure shows the tab where those declarations are made and how they reach the generated method.
An operation is only useful when its inputs and outputs are declared. The inputs and outputs tab records the parameter names, their types and the single return type. Generation reads those declarations directly, so a clear signature in the model produces a clear signature in Java.
Declaring inputs
- Name. Use the same name as the model attribute it carries.
- Type. Choose a model type or a simple type such as text, number or date.
- Required flag. Mark inputs that must be present.
- Direction. Input, output or both for values that flow in and out.
Declaring outputs
An operation returns one type. When a method needs to return more than one value, define a small result type rather than adding several output parameters. A named result type reads better in the generated code and in the views that consume it.
The tab also shows a preview of the generated method signature. Use it to confirm that the declaration reads the way you expect before you run generation.