cancel
Showing results for 
Search instead for 
Did you mean: 

Template problem:can't see custom properties

raptus
Champ in-the-making
Champ in-the-making
Hi,
I have problems getting a custom-workflow property by a Freemarker template (html-based web script).

I have done an advanced workflow with a custom property called "my:note" -type:string. The workflow is similar to the classic "review-approve" and the note is similar to the default bpm:comment property but how can I get this property?

Here is my template:


    <table cellspacing=0 cellpadding=2>
       <tr>
          <th>ID</th>
          <th>Type</th>
          <th>Name</th>
          <th>Description</th>
          <th>Created Date</th>
          <th>Start Date</th>
          <th>Due Date</th>
          <th>Priority</th>
          <th>% Complete</th>
          <th>Status</th>
          <th>Completed</th>
       <tr>
       <#list workflow.assignedTasks as t>
          <tr>
             <td>${t.id}</td>
             <td>${t.type}</td>
             <td>${t.name}</td>
             <td>${t.description}</td>
             <td>${t.properties["cm:created"]?datetime}</td>
             <td><#if t.properties["bpm:startDate"]?exists>${t.properties["bpm:startDate"]?datetime}<#else><i>None</i></#if></td>
             <td><#if t.properties["bpm:dueDate"]?exists>${t.properties["bpm:dueDate"]?datetime}<#else><i>None</i></#if></td>
             <td>${t.properties["bpm:priority"]}</td>
             <td>${t.properties["bpm:percentComplete"]}</td>
             <td>${t.properties["bpm:status"]}</td>
             <td>${t.isCompleted?string("Yes", "No")}</td>
       <td>${t.properties["my:note"]?string}  </td>                          
          </tr>
       </#list>

      <#list workflow.pooledTasks as t>
          <tr>
             <td>${t.id}</td>
             <td>${t.type}</td>
             <td>${t.name}</td>
             <td>${t.description}</td>
             <td>${t.properties["cm:created"]?datetime}</td>
             <td><#if t.properties["bpm:startDate"]?exists>${t.properties["bpm:startDate"]?datetime}<#else><i>None</i></#if></td>
             <td><#if t.properties["bpm:dueDate"]?exists>${t.properties["bpm:dueDate"]?datetime}<#else><i>None</i></#if></td>
             <td>${t.properties["bpm:priority"]}</td>
             <td>${t.properties["bpm:percentComplete"]}</td>
             <td>${t.properties["bpm:status"]}</td>
              <td>${t.isCompleted?string("Yes", "No")}</td>

          </tr>

    <div class="task-transitions">
          <#list t.transitions as transition>
                <span class="${t.id} ${transition.id}"><a href="#" class="task-transition theme-color-1">${transition.label?html}</a></span>
             <#if transition_has_next><span class="separator">|</span></#if>
          </#list>
             </div>
       </#list>
    </table>



This returns "operation t.properties["my:note"]?string is undefined……. Why???
Without <td>${t.properties["my:note"]?string} </td> works well.

Thanks in advance,

raptus
1 REPLY 1

msvoren
Champ in-the-making
Champ in-the-making
It could be this wasn't implemented yet, so only default properties from bpm data-model are accessible.
Or there is some other way of accessing these..