How to pass process variable to embedded form field?

Hi,
in my application i would like to have a user task that requires selecting a value from list of predefined value. Since values to chose from depend on businessKey i need to load this dropdown dynamically. I have already tried using embedded forms with process variable as source for selection (as per this link) but dropdown is not populated with values.

<form role="form" name="form">
<div class="form-group">
    <label for="invoicedPosition">Position</label>
    <input cam-variable-name="invoicedPosition"
           cam-variable-type="String"
           cam-choices="availablePositions"
           class="form-control" />
</div>
</form>

This is how im setting variable in my process:

 List<String> availablePositions = ...
 delegateExecution.setVariable(AVAILABLE_POSITIONS,
            objectValue(availablePositions)
                    .serializationDataFormat(Variables.SerializationDataFormats.JSON)
                    .create());

I can see that the list is present as process variable and is deserialized properly.

Please advise: how can i populate dropdown in my embedded form?

Nevermind, it was ctrl+c/ctrl+v issue with incorrect tag.
As per: link
correct tag was:
<select required cam-variable-name="invoicedPosition" cam-variable-type="String" cam-choices="availablePositions" />

1 Like