Currently iDempiere supports list, String and number data type in ASI. We should add support for date as it may be useful to have date kind of ASI.
Also Found that there need for transaction management in saveSelection method to avoid creation of junk ASI.
Regarding your comment, if Attribute is mandatory and value not provided then only ASI should not created. And we need to handle it by transaction management. We are making that fix and add latest fix later. Currently cancel button is misbehaving due to lacking transaction management.
I am wondering about this use case:
1. Setup Not Mandatory Instance Attribute with AttributeType=String (max 40)
2. Create new document line and open Attribute Set Instance Dialog to create new Attribute Set Instance
3. Attribute created in first step leave empty
4. Click OK
5. Check table M_AttributeInstance => New Record Created also for Attribute which was empty (column 'Value' is filled with AttributeInstanceID)
6. Open Attribute Set Instance Dialog Again => field which was empty is now filled with AttributeInstanceID
I consider it as a bug, why should be created new Attribute Instance record when I didn't insert any value for this Attribute in Attribute Set Instance Dialog? And why there should be AttributeInstanceID in 'Value' column?
I attached bug_example.png for better understading what I mean.
Attaching patch with improvement
Ignore other patch and file. Deepak_IDEMPIERE-2319.patch contains all fixes
I am not able to suggest as I see some use case of fake ASI.