Search in sources :

Example 1 with StringListConverter

use of org.camunda.bpm.engine.rest.dto.converter.StringListConverter in project camunda-bpm-platform by camunda.

the class ProcessDefinitionResourceImpl method getFormVariables.

public Map<String, VariableValueDto> getFormVariables(String variableNames, boolean deserializeValues) {
    final FormService formService = engine.getFormService();
    List<String> formVariables = null;
    if (variableNames != null) {
        StringListConverter stringListConverter = new StringListConverter();
        formVariables = stringListConverter.convertQueryParameterToType(variableNames);
    }
    VariableMap startFormVariables = formService.getStartFormVariables(processDefinitionId, formVariables, deserializeValues);
    return VariableValueDto.fromVariableMap(startFormVariables);
}
Also used : StringListConverter(org.camunda.bpm.engine.rest.dto.converter.StringListConverter) VariableMap(org.camunda.bpm.engine.variable.VariableMap) FormService(org.camunda.bpm.engine.FormService)

Example 2 with StringListConverter

use of org.camunda.bpm.engine.rest.dto.converter.StringListConverter in project camunda-bpm-platform by camunda.

the class TaskResourceImpl method getFormVariables.

public Map<String, VariableValueDto> getFormVariables(String variableNames, boolean deserializeValues) {
    final FormService formService = engine.getFormService();
    List<String> formVariables = null;
    if (variableNames != null) {
        StringListConverter stringListConverter = new StringListConverter();
        formVariables = stringListConverter.convertQueryParameterToType(variableNames);
    }
    VariableMap startFormVariables = formService.getTaskFormVariables(taskId, formVariables, deserializeValues);
    return VariableValueDto.fromVariableMap(startFormVariables);
}
Also used : StringListConverter(org.camunda.bpm.engine.rest.dto.converter.StringListConverter) VariableMap(org.camunda.bpm.engine.variable.VariableMap) FormService(org.camunda.bpm.engine.FormService)

Aggregations

FormService (org.camunda.bpm.engine.FormService)2 StringListConverter (org.camunda.bpm.engine.rest.dto.converter.StringListConverter)2 VariableMap (org.camunda.bpm.engine.variable.VariableMap)2