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.
<userTask id="AlertQueueTask" name="AlertQueue"> <extensionElements> <activiti:formProperty id="AlertName" name="AlertName" type="string"></activiti:formProperty> <activiti:formProperty id="Carrier" name="Carrier" type="string"></activiti:formProperty> <activiti:formProperty id="DepDate" name="DepDate" type="date"></activiti:formProperty> </userTask>
<br>ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();//requires activiti.cfg.xml <br>ProcessEngineConfiguration processEngineConfiguration = processEngine.getProcessEngineConfiguration();<br><br>CommandExecutor commandExecutor = ((ProcessEngineConfigurationImpl) processEngineConfiguration).getCommandExecutor();<br>ProcessDefinitionEntity processDefinitionEntity = commandExecutor.execute(new Command<ProcessDefinitionEntity>() {<br> public ProcessDefinitionEntity execute(CommandContext commandContext) {<br> return Context.getProcessEngineConfiguration()<br> .getDeploymentManager()<br> .findDeployedLatestProcessDefinitionByKey("MultipleQueue");<br> }<br>});<br><br> <br>TaskDefinition taskDefinition = processDefinitionEntity.getTaskDefinitions().get("AlertQueueTask");<br><br>System.out.println(taskDefinition.getTaskFormHandler().createTaskForm(new TaskEntity()).getFormProperties());<br>List<FormProperty> formProperties = taskDefinition.getTaskFormHandler().createTaskForm(new TaskEntity()).getFormProperties();<br>for (FormProperty formProp : formProperties) {<br> System.out.println("form prop:"+ formProp.getId() +" type:"+ formProp.getType()+" default value:"+formProp.getValue());<br>}<br>