AnsweredAssumed Answered

Mapping a start event form property to a java bean

Question asked by rainerv on Jan 19, 2011
Latest reply on Jan 20, 2011 by rainerv
Hi,

How would it be possible to assign values from Java beans to start event form properties?

It seems that mapping form properties to Java beans doesn't work in start events (it works with user tasks, though). If a start event has form properties which are mapped to a Java bean properties, then the bean values are not assigned to the form properties by the Activiti Engine.

Here is an example from the Activiti User Guide which describes mapping a form property street to a Java bean property address.street in a user task using the expression attribute:

<activiti:formProperty id="street" expression="#{address.street}" />

This works perfectly well in user tasks but not in start events, which might be a bug in the Engine.

But if it's indeed an intended "feature", then how would it be possible to assign values from Java beans to start event form properties?

My other concern is similarly related to built-in form rendering: how would it be possible to access Java beans in forms as in the following example (where address would be a Java bean):

<input type="text" name="street" value="${address.street}" />


Accessing Java beans in a start event's form properties and forms would allow more dynamic workflows where some information could be accessed from a system and shown to a user when the user is starting a new process by submitting a form (properties).

I would appreciate any thoughts and guidelines in this.

Thanks!

Outcomes