Examples of TaskFormData


Examples of org.activiti.engine.form.TaskFormData

        List<Task> tasks = taskService.createTaskQuery().processInstanceId(user.getWorkflowId()).list();
        if (tasks.isEmpty() || tasks.size() > 1) {
            LOG.warn("While checking if form task: unexpected task number ({})", tasks.size());
        } else {
            try {
                TaskFormData formData = formService.getTaskFormData(tasks.get(0).getId());
                if (formData != null && !formData.getFormProperties().isEmpty()) {
                    result = tasks.get(0).getId();
                }
            } catch (ActivitiException e) {
                LOG.warn("Could not get task form data", e);
            }
View Full Code Here

Examples of org.activiti.engine.form.TaskFormData

    public List<WorkflowFormTO> getForms() {
        List<WorkflowFormTO> forms = new ArrayList<WorkflowFormTO>();

        for (Task task : taskService.createTaskQuery().taskVariableValueEquals(TASK_IS_FORM, Boolean.TRUE).list()) {
            try {
                TaskFormData formData = formService.getTaskFormData(task.getId());
                if (formData != null && !formData.getFormProperties().isEmpty()) {
                    forms.add(getFormTO(task, formData));
                }
            } catch (ActivitiException e) {
                LOG.debug("No form found for task {}", task.getId(), e);
            }
View Full Code Here

Examples of org.activiti.engine.form.TaskFormData

            task = taskService.createTaskQuery().processInstanceId(workflowId).singleResult();
        } catch (ActivitiException e) {
            throw new WorkflowException("While reading form for workflow instance " + workflowId, e);
        }

        TaskFormData formData;
        try {
            formData = formService.getTaskFormData(task.getId());
        } catch (ActivitiException e) {
            LOG.debug("No form found for task {}", task.getId(), e);
            formData = null;
        }

        WorkflowFormTO result = null;
        if (formData != null && !formData.getFormProperties().isEmpty()) {
            result = getFormTO(task, formData);
        }

        return result;
    }
View Full Code Here

Examples of org.activiti.engine.form.TaskFormData

            task = taskService.createTaskQuery().taskId(taskId).singleResult();
        } catch (ActivitiException e) {
            throw new NotFoundException("Activiti Task " + taskId, e);
        }

        TaskFormData formData;
        try {
            formData = formService.getTaskFormData(task.getId());
        } catch (ActivitiException e) {
            throw new NotFoundException("Form for Activiti Task " + taskId, e);
        }
View Full Code Here

Examples of org.activiti.engine.form.TaskFormData

        List<Task> tasks = taskService.createTaskQuery().processInstanceId(user.getWorkflowId()).list();
        if (tasks.isEmpty() || tasks.size() > 1) {
            LOG.warn("While checking if form task: unexpected task number ({})", tasks.size());
        } else {
            try {
                TaskFormData formData = formService.getTaskFormData(tasks.get(0).getId());
                result = formData != null && !formData.getFormProperties().isEmpty();
            } catch (ActivitiException e) {
                LOG.warn("Could not get task form data", e);
            }
        }
View Full Code Here

Examples of org.activiti.engine.form.TaskFormData

    @Override
    public List<WorkflowFormTO> getForms() {
        List<WorkflowFormTO> forms = new ArrayList<WorkflowFormTO>();

        TaskFormData formData;
        for (Task task : taskService.createTaskQuery().list()) {
            try {
                formData = formService.getTaskFormData(task.getId());
            } catch (ActivitiException e) {
                LOG.debug("No form found for task {}", task.getId(), e);
                formData = null;
            }

            if (formData != null && !formData.getFormProperties().isEmpty()) {
                forms.add(getFormTO(task, formData));
            }
        }

        return forms;
View Full Code Here

Examples of org.activiti.engine.form.TaskFormData

            task = taskService.createTaskQuery().processInstanceId(workflowId).singleResult();
        } catch (ActivitiException e) {
            throw new WorkflowException(e);
        }

        TaskFormData formData;
        try {
            formData = formService.getTaskFormData(task.getId());
        } catch (ActivitiException e) {
            LOG.debug("No form found for task {}", task.getId(), e);
            formData = null;
        }

        WorkflowFormTO result = null;
        if (formData != null && !formData.getFormProperties().isEmpty()) {
            result = getFormTO(task, formData);
        }

        return result;
    }
View Full Code Here

Examples of org.activiti.engine.form.TaskFormData

            task = taskService.createTaskQuery().taskId(taskId).singleResult();
        } catch (ActivitiException e) {
            throw new NotFoundException("Activiti Task " + taskId, e);
        }

        TaskFormData formData;
        try {
            formData = formService.getTaskFormData(task.getId());
        } catch (ActivitiException e) {
            throw new NotFoundException("Form for Activiti Task " + taskId, e);
        }
View Full Code Here

Examples of org.activiti.engine.form.TaskFormData

 
  /**
   * 渲染表单
   */
  public String render( ){
    TaskFormData data = (TaskFormData)request.getAttribute("task_form_data");
    if( data == null )
      return ERROR;
   
    List<HistoricDetail> historicTasks  = workflowManager.listHistoricDetail(taskId);
    if( historicTasks != null ){
View Full Code Here

Examples of org.activiti.engine.form.TaskFormData

 
  /**
   * 提交表单数据
   */
  public String submit( ){
    TaskFormData data = workflowManager.getTaskFormData(taskId);
   
    if( data != null && data.getFormProperties() != null ){
      Map<String,String> properties = new HashMap<String,String>();
      for(FormProperty item: data.getFormProperties() )
        properties.put(item.getId(),request.getParameter(item.getId()));
     
      //workflowManager.submitFormData(taskId,properties);
    }
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.