Form data not passed to business variable


Hello All,

My process have a simple business object / variable. I have created a simple script that returns the new instance with the default values for the mandatory fields.

I have created an instantiation form with a simple text field, according to the contract defined for the instantiation step (object.attribute), but the value is never passed to the business variable. It's like the variables is instantiated AFTER the form as been invoked and submitted.

If I take a loot at the database, I see the default data returned in my script.

This problem doesn't happen in other steps of the process. I assume it's because the operations assignations happen at the right time, after data from the form has been returned. But the instantiation form doesn't have this item.

What can I do to pass data from the instantiation form to the business variable?

Thank you.

2 answers



Thank you very much for your clear answer.




You are right, the business variable is instantiated and initialized after the form submission.

Here is the succession of task, let's take an example with a String variable called "Test":

  1. Instantiation form contains one input field mapped to a JS variable called Test
  2. User enter "hey" in the input field and submit the form. The variable Test is sent to the engine.
  3. There is a contract defined on the process with one input called Test
  4. The form submission match with the contract and fill in the contract value Test with the value "Hey"
  5. The business variables are instantiated and initialized by the value returned in their default script.

See the succession of task. You can use the contract value in the default script of the business variable.