use of org.kie.workbench.common.forms.jbpm.model.authoring.process.BusinessProcessFormModel in project kie-wb-common by kiegroup.
the class JBPMFormModelCreationPresenterTest method initFormModels.
protected void initFormModels() {
List<ModelProperty> processVariables = new ArrayList<>();
processVariables.add(new ModelPropertyImpl("name", new TypeInfoImpl(String.class.getName())));
processVariables.add(new ModelPropertyImpl("age", new TypeInfoImpl(Integer.class.getName())));
processVariables.add(new ModelPropertyImpl("twitter", new TypeInfoImpl(String.class.getName())));
processVariables.add(new ModelPropertyImpl("offering", new TypeInfoImpl(Integer.class.getName())));
processVariables.add(new ModelPropertyImpl("skills", new TypeInfoImpl(String.class.getName())));
processVariables.add(new ModelPropertyImpl("mail", new TypeInfoImpl(String.class.getName())));
processVariables.add(new ModelPropertyImpl("hr_score", new TypeInfoImpl(Integer.class.getName())));
processVariables.add(new ModelPropertyImpl("tech_score", new TypeInfoImpl(Integer.class.getName())));
processVariables.add(new ModelPropertyImpl("signed", new TypeInfoImpl(Boolean.class.getName())));
BusinessProcessFormModel processFormModel = new BusinessProcessFormModel("hiring", "hiring", processVariables);
TaskFormModel taskFormModel;
List<TaskFormModel> processTasks = new ArrayList<>();
List<ModelProperty> taskVariables = new ArrayList<>();
taskVariables.add(new ModelPropertyImpl("name", new TypeInfoImpl(String.class.getName())));
taskVariables.add(new ModelPropertyImpl("age", new TypeInfoImpl(Integer.class.getName())));
taskVariables.add(new ModelPropertyImpl("mail", new TypeInfoImpl(String.class.getName())));
taskVariables.add(new ModelPropertyImpl("hr_score", new TypeInfoImpl(String.class.getName())));
taskFormModel = new TaskFormModel("hiring", "HRInterview", taskVariables);
processTasks.add(taskFormModel);
taskVariables = new ArrayList<>();
taskVariables.add(new ModelPropertyImpl("name", new TypeInfoImpl(String.class.getName())));
taskVariables.add(new ModelPropertyImpl("age", new TypeInfoImpl(Integer.class.getName())));
taskVariables.add(new ModelPropertyImpl("mail", new TypeInfoImpl(String.class.getName())));
taskVariables.add(new ModelPropertyImpl("skills", new TypeInfoImpl(String.class.getName())));
taskVariables.add(new ModelPropertyImpl("tech_score", new TypeInfoImpl(Integer.class.getName())));
taskVariables.add(new ModelPropertyImpl("twitter", new TypeInfoImpl(String.class.getName())));
taskFormModel = new TaskFormModel("hiring", "TechInterview", taskVariables);
processTasks.add(taskFormModel);
JBPMProcessModel model = new JBPMProcessModel(processFormModel, processTasks);
formModels.add(model);
}
Aggregations