Thank you, that works, however I am unable to properly parse the value from the field ?
Does it return a string or something else ?
Here’s what I have:
...
private static final String PRIVATE_KEY = "Private key";
private static final String PUBLIC_KEY = "Public key";
...
private String privateKey; // This is used to capture the value from the private key property
private String publicKey; // This is used to capture the value from the public key property
Then the defineProperties method:
...
propertyBuilder.describe(PRIVATE_KEY, "Private key")
.required()
.uiRowCount(10)
.add();
propertyBuilder.describe(PUBLIC_KEY, "Public key")
.uiRowCount(10)
.add();
...
Then the configure method:
@Override
public void configure(PropertyValues propertyValues) {
...
privateKey = propertyValues.get(PRIVATE_KEY);
publicKey = propertyValues.get(PUBLIC_KEY);
...
}
This is how the snap looks like with the properties:
![]()
However, when the pipeline is executed with the snap included, it returns the following error:
Snap has the following errors.
Please open the info box and edit the highlighted fields.
* Failure: Private key: asdasd is undefined.
Perhaps you meant: task, Base64, parseFloat, parseInt,
Reason: Snap failed unexpectedly and did not provide any reason,
Resolution: Check the spelling of the variable
Is it because .uiRowCount(int) returns a different type than String, so it is not able to parse it correctly in the configure() method ?