AnsweredAssumed Answered

Mapping form properties to process variables

Question asked by frecklefoot on Nov 21, 2011
Latest reply on Dec 1, 2011 by trademak
I'm having trouble mapping a task's form property to a process variable.

I have a task with a form property, a boolean ("foo"). In the Form properties editor, I "map" the value to a process variable that I pass in ("bar"). So in the Value column for "foo" I have: ${bar}. From what I understand, this is supposed to map the value entered for "foo" (form property) into "bar" (process variable).

I pass "bar" into the process when I begin it with a default value (true or false). I execute the process using the API, not the Activiti Explorer. I set the value of "foo" like this:

      FormService formService = processEngine.getFormService();
      Map<String, String> formProperties = new HashMap<String, String>();
      formProperties.put( "foo", "true" );
      formService.submitTaskFormData( taskId, formProperties );

But whatever I enter for "foo", "bar" always ends up with the default value I pass in with it. It seems like the default value overrides the value I explicitly set. Is there a way to prevent this? I know that I am spelling "foo" correctly and am certain that "bar" is being set to the value I pass in with it.

Any idea what I am doing wrong?

Thanks in advance!