AnsweredAssumed Answered

Activiti form: String - Enum - Switch Case

Question asked by enricochirico on Jul 20, 2015
Latest reply on Jul 20, 2015 by vasile.dirla
I would like to submit you my issue:
i want to create a form where you can choose a type of user's data (id, surname, name…), then you submit that data and a script in groovy manages the result.

I wrote it like this:

<startEvent id="start" activiti:initiator="eventA" >
         <activiti:formProperty id="choice" name="Data Type" type="enum">
            <activiti:value id="a" name="User Logon Name" />   
                                <activiti:value id="b" name="User Surname" />

                   <activiti:formProperty id="value"
                            name="Insert a value"
                              type="string" />
      <sequenceFlow sourceRef="start" targetRef="scripttask1"/>
      <scriptTask id="scripttask1" scriptFormat="groovy">
      def choicemade = "" + choice
         case "a":
                   //my db search      
                  case "b":
                  //my db search
      <sequenceFlow sourceRef="scripttask1" targetRef="end"/>
        <endEvent id="end"/>

But i get: Internal Server Error….can someone help me to understand what i'm doing wrong? Thanks!!!