Adding fields to the method flow
The method flow Input and Output steps contain the metadata of the fields that the data consumer and data source send to each other. Therefore, when composing a contract's data flow, you must specify field metadata for each step.
Add fields to an Input or Output step
To add files to an input or output step perform the following:
-
Click an Input or an Output step on the method flow.
-
Add fields to the input and output step in one of three ways:
- Add fields manually
- copy fields from an asset
- add fields from a spec file
Add fields manually
You can add fields to the input and output elements by defining them from scratch one by one.
-
Click an Input or an Output step on the method flow.
-
Select
Start adding fields.
-
Type the Field Name, select its Type, and click Save.
-
To add another field, click
, select
Add Field and repeat the steps above.
-
To add a property field to a structure-type field, click the
button adjacent to the field
name and selectAdd Lead Field.
Add fields from a JSON file.
You can add fields to the flow step by uploading a JSON file that describes the input or output fields.
- Prepare a JSON file describing the input or output fields.
[
{
"fullName": "John Dao",
"age": 30,
"smoking": false,
"policy": {
"polNum": "89526",
"startDate": "2022-10-31 00:00:00"
}
},
{
"fullName": "Joann Doe",
"age": 20,
"smoking": true,
"policy": {
"polNum": "99256",
"startDate": "2022-12-31 00:00:00"
}
}
]
- Select
Upload JSON file and upload the file.
- Review the created field hierarchy.
Copy fields from an asset
You can copy fields to the Input and Output flow steps by copying them from one of the assets attached to your project.
To copy fields from an asset, perform the following:
-
Click an Input or an Output step on the method flow.
-
Select
Copy from Asset. The modules assigned to your projects are displayed.
-
Select the module that contains the asset from which to copy fields and click Next.
-
Select the asset from which to copy fields and click Select Asset.
-
Select whether to copy the asset input or output fields and click Copy Asset Model.
Updated 4 months ago