Hi,
I actually figured out a way to pass the parameters I needed into my custom form type's FormPropertyRenderer. On the flow immediately preceding the UserTask with my form, I created an ExecutionListener. It sets the parameter I need for the DB call to a variable, using the same id as the form controls.
<code>
public void notify(DelegateExecution delegateExecution) {
delegateExecution.setVariable("formControlID", "queryParameter");
}
<activiti:formProperty id="formControlID" name="Form Control" type="textArea"></activiti:formProperty>
</code>
Then in my custom form type's renderer, I read the parameter using the formProperty, do my database query, build a string to display in the textArea, then set the value.
<code>
public Field getPropertyField(FormProperty formProperty) {
TextArea textArea = new TextArea (getPropertyLabel(formProperty));
String queryParameter = formProperty.getValue();
// Do DB query, build resultString.
textArea.setValue(resultString);
return textArea;
}
}
</code>
As long as the id of the variable matches the id of the form control, I can reuse a handful of custom form properties (TextArea, ComboBox, TwinColSelect, etc) for many form controls simply by setting more variables in the listener and on the form.