コード例 #1
0
  @Test
  public void successfulTaskCreation() throws DaoRepositoryException {
    createDefinition();

    TaskDefinition taskDef = taskDefRepository.getTasksDefinition().get(0);

    TaskInstance theTask = new TaskInstance();
    theTask.setPriority(3);
    theTask.setTaskDef(taskDef);
    theTask.setTitle(taskDef.getName());
    String taskId = taskInstRepository.createTask(theTask, "ianache");
    Assert.assertNotNull(taskId);
  }
コード例 #2
0
 private void createDefinition() throws DaoRepositoryException {
   TaskDefinition taskDef = new TaskDefinition();
   taskDef.setName("Emitir factura");
   taskDef.setActualOwnerRequired(1);
   taskDef.setDefaultLanguage("ES");
   taskDef.setOperationName("op1");
   taskDef.setOutcomePartQuery("");
   taskDef.setOutcomePartQueryLanguage("");
   taskDef.setOutcomes("ACEPTAR,CANCELAR");
   taskDef.setPortType("PortType");
   taskDef.setPriority(3);
   taskDef.setResponseOperationName("");
   taskDef.setResponsePortType("");
   taskDef.setSubTasksCompositionType("M");
   taskDef.setSubTasksCreationPattern("P");
   String taskId = repository.createTaskDefinition(taskDef);
   Assert.assertNotNull(taskId);
 }