As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
public void notify(DelegateExecution execution) throws Exception { […] String taskId = execution.getId(); List<FormProperty> formProperties = ProcessEngines.getDefaultProcessEngine().getFormService() .getTaskFormData(taskId).getFormProperties(); […] }
execution.getId() will return the execution Id "not task id"
public class PerDiemButtonFiller implements TaskListener{<br> <br> public PerDiemButtonFiller(){<br> super();<br> }<br> <br> public void notify(DelegateTask delegateTask) {<br> ActivitiUserPerDiem activitiUserPerDiem = (ActivitiUserPerDiem) <br> delegateTask.getVariable("activitiUserPerDiem");<br> ActivitiNationalPerDiem activitiNationalPerDiem = (ActivitiNationalPerDiem) <br> delegateTask.getVariable("activitiNationalPerDiem");<br> ActivitiForeignPerDiem activitiForeignPerDiem = (ActivitiForeignPerDiem) <br> delegateTask.getVariable("activitiForeignPerDiem");<br> ActivitiLocomotion activitiLocomotion = (ActivitiLocomotion) <br> delegateTask.getVariable("activitiLocomotion");<br> <br> String taskId = delegateTask.getId();<br><br> List<FormProperty> formProperties = ProcessEngines.getDefaultProcessEngine().getFormService()<br> .getTaskFormData(taskId).getFormProperties();<br> Iterator<FormProperty> it = formProperties.iterator();<br> while(it.hasNext()){<br> FormProperty formP = it.next();<br> if(formP.getId() == "id_button"){<br> PerDiemButtonFormPropertyRenderer obj = (PerDiemButtonFormPropertyRenderer) formP;<br> obj.setUserPerDiemVariable(activitiUserPerDiem);<br> obj.setNationalPerDiemVariable(activitiNationalPerDiem);<br> obj.setForeignPerDiemVariable(activitiForeignPerDiem);<br> obj.setLocomotionVariable(activitiLocomotion);<br> }<br> }<br> }<br><br>}