Symptoms
NULL values can be specified as input parameters for 'List' methods, but they do not alter the result (NULL values can not be filtered).
Diagnoses
This is by design and the way the service broker works. When you do not specify a filter and use SCNULL for input on a SmartObject and execute the GetList (you can test this on any Smart Box SmartObject) we return all the values.
In some specific cases you may want to use SCNULL as a filter value. In current versions List methods do not work with input properties as create, read, update, execute and delete methods in K2. We support SCNULL in input properties for create, read, update, execute and delete methods in K2. There is an existing feature request to add support for filtering with SCNULL parameters on list and read methods but there is no ETA for implementation for this feature request at the moment.
As potential workaround you can consider the following:
1) Adding check inside of the stored procedure:
IF @Param = 'SCNULL', SET @Param = NULL
2) Behavior described above is only true for parameters in the stored procedures. If you change the key of your ServiceInstance ? Use parameters for stored procedures to false, then the parameters become properties. You will have to remap everything in the SmO definition as a result, but in this case NULL values are transferred as NULL (Empty) to the database.
Resolution
See details above.