Hi all
Could you someone help with one question?
I have created a binding with Rule Action.
When I create rule I can select my action и fill parameters. But one of the parameters is thing which my binding realize.
Select station shoul contain thing created by my binding.
The parameter Select station is genereated by code
final ConfigDescriptionParameter stationParam = ConfigDescriptionParameterBuilder.create(CONFIG_PARAM_NAME_STATION,
ConfigDescriptionParameter.Type.TEXT)
.withRequired(true).withReadOnly(false).withMultiple(false).withLabel(CONFIG_STATION)
.withContext("thing")
.withLimitToOptions(true)
.withDescription(CONFIG_STATION_DESCRIPTION).build();
Input stationInput = new Input(CONFIG_PARAM_NAME_STATION, String.class.getName(),
CONFIG_STATION, CONFIG_STATION_DESCRIPTION, null, true, null, null);
It allows me to select a thing from all available things, but i need filter this list only with my things with
public static final String BINDING_ID = “yandexstation”;
public static final String THING_TYPE_ID = “station”;
I tried this code:
List<FilterCriteria> filter = new ArrayList<>();
FilterCriteria criteria1 = new FilterCriteria("bindingId", BINDING_ID);
FilterCriteria criteria2 = new FilterCriteria("thingTypeId", THING_TYPE_ID);
filter.add(criteria1);
filter.add(criteria2);
...
.withFilterCriteria(filter)
...
This is not works for me, opened window this all things for select one
And when i save the rule and then try edit it I see follow
window has not any parametrs except Thing Selection and it filter and allow me to select one of my things
What do I wrong and it is possible to filter things when create a rule action and show window with all my parameters when I edit rule action?
Thanks in advance. Sorry for my English