Form properties as Process Variables


I have an StartEvent with one form property:

That I am trying to read in an Script Task:

I thought form properties were saved as process variables behind the scenes but I am getting null values when trying to get them.

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="" xmlns:xsi="" xmlns:xsd="" xmlns:flowable="" xmlns:bpmndi="" xmlns:omgdc="" xmlns:omgdi="" typeLanguage="" expressionLanguage="" targetNamespace="" exporter="Flowable Open Source Modeler" exporterVersion="6.7.2">
  <process id="issuepropform" name="issuepropform" isExecutable="true">
    <startEvent id="initform" flowable:formFieldValidation="true">
        <flowable:formProperty id="new_property_1" name="new_property_1" type="string" variable="new_property_1" default="new_property_1_value"></flowable:formProperty>
    <scriptTask id="sid-08D6C4D1-4CD3-4615-BDC9-8AD5CE9E699A" scriptFormat="JavaScript" flowable:autoStoreVariables="false">
      <script><![CDATA[var prop = execution.getVariable("new_property_1");
print("prop value: "+prop);]]></script>
    <sequenceFlow id="sid-C81FA345-E557-4A98-8CA6-02188D522B25" sourceRef="initform" targetRef="sid-08D6C4D1-4CD3-4615-BDC9-8AD5CE9E699A"></sequenceFlow>
    <endEvent id="sid-E910F978-3019-4787-8B97-3EE8648E3175"></endEvent>
    <sequenceFlow id="sid-71DF85E4-BB60-4689-9374-02B44DAE4FC1" sourceRef="sid-08D6C4D1-4CD3-4615-BDC9-8AD5CE9E699A" targetRef="sid-E910F978-3019-4787-8B97-3EE8648E3175"></sequenceFlow>

Is there a way to retrieve start form properties (new_property_1) on next tasks ? Thanks,


can u see your variable in Flowable Admin module for a process instance?

I had a similar problem and it turns out that the variable wasn’t created…

Also, check a field ID on the form - values entered on a form field should be stored in that ID (that is a name od created variable).

So if u have filed ID, for example, XXX, then in the script try to print out a variable named XXX.

Kind regards,