0 Replies Latest reply on Nov 20, 2013 9:04 PM by Sarah Tsang

    Support looping in Email node body

    Sarah Tsang Newbie

      Dear all,

       

      Based on JBPM5.4, I passed List object which included custom object into process through parameter using Eclipse.

      I would like to display list of information into email content through node body.

      anyone know how to process list object using looping syntax, such as for-each?

      Or email node body only support HTML?

       

      The following code is shown out body content,

       

      List object:

      List<Item> itemList = new ArrayList<Item>();

      itemList .add(item1);

      itemList .add(item2);

       

      Map<String, Object> map = new HashMap<String, Object>();

      map.put("itemList", itemList);

      ksession.startProcess("com.sample.bpmn.email", map);

       

      Email node body:

      <table>

      foreach (item: #{itemList}) {

           <tr><td>#{item.name}</td></tr>

      }

      </table>

       

       

      Thanks a lot.

       

      Regards,

      Sarah