Package org.activiti.workflow.simple.definition

Examples of org.activiti.workflow.simple.definition.WorkflowDefinition


 
  @Test
  public void testThreeUserTasksInParallel() throws Exception {
    TaskService taskService = activitiRule.getTaskService();
   
    WorkflowDefinition workflowDefinition = new WorkflowDefinition()
      .name("testWorkflow")
      .description("This is a test workflow")
      .inParallel()
        .inList()
          .addHumanStep("first task", "kermit")
View Full Code Here


 
  @Test
  public void testUserTasksInChoice() throws Exception {
    TaskService taskService = activitiRule.getTaskService();
   
    WorkflowDefinition workflowDefinition = new WorkflowDefinition()
      .name("testWorkflow")
      .description("This is a test workflow")
      .inChoice()
        .inList()
          .addCondition("test", "==", "'hello'")
View Full Code Here

 
  @Test
  public void testMultipleConditionsInChoice() throws Exception {
    TaskService taskService = activitiRule.getTaskService();
   
    WorkflowDefinition workflowDefinition = new WorkflowDefinition()
      .name("testWorkflow")
      .description("This is a test workflow")
      .inChoice()
        .inList()
          .addCondition("test", "==", "'hello'")
View Full Code Here

    assertEquals(0, activitiRule.getRuntimeService().createProcessInstanceQuery().processInstanceId(instance.getId()).count());
  }
 
  @Test
  public void testInitiatorOnHumanStep() {
    WorkflowDefinition workflowDefinition = new WorkflowDefinition()
      .name("testWorkflow")
      .description("This is a test workflow")
      .addHumanStep("step1", "kermit")
      .addHumanStepForWorkflowInitiator("step2");
   
View Full Code Here

    assertEquals(0, taskService.createTaskQuery().taskAssignee("kermit").count());
  }
 
  @Test
  public void testGroupsForHumanStep() {
    WorkflowDefinition workflowDefinition = new WorkflowDefinition()
      .name("testWorkflow")
      .description("This is a test workflow")
      .addHumanStepForGroup("step1", "management", "sales")
      .addHumanStepForGroup("step1", "sales");
    activitiRule.getRuntimeService().startProcessInstanceByKey(convertAndDeploy(workflowDefinition));
View Full Code Here

    assertEquals(1, taskService.createTaskQuery().taskCandidateGroupIn(Arrays.asList("management", "sales")).count());
  }
 
  @Test
  public void testFeedbackStepWithFixedUsersAllFeedbackProvided() {
    WorkflowDefinition workflowDefinition = new WorkflowDefinition()
      .name("testWorkflow")
      .description("This is a test workflow")
      .addFeedbackStep("Test feedback", "kermit", Arrays.asList("gonzo", "mispiggy", "fozzie"));
   
    activitiRule.getRuntimeService().startProcessInstanceByKey(convertAndDeploy(workflowDefinition));
View Full Code Here

    assertEquals(0, activitiRule.getRuntimeService().createProcessInstanceQuery().count());
  }
 
  @Test
  public void testFeedbackStepWithFixedUsersFeedbackHaltedByInitiator() {
    WorkflowDefinition workflowDefinition = new WorkflowDefinition()
      .name("testWorkflow")
      .description("This is a test workflow")
      .addFeedbackStep("Test feedback", "kermit", Arrays.asList("gonzo", "mispiggy", "fozzie"));
   
    activitiRule.getRuntimeService().startProcessInstanceByKey(convertAndDeploy(workflowDefinition));
View Full Code Here

    assertEquals(0, activitiRule.getRuntimeService().createProcessInstanceQuery().count());
  }
 
  @Test
  public void testFeedbackStepWithUserSelectionAtRuntimeAllFeedbackProvided() {
    WorkflowDefinition workflowDefinition = new WorkflowDefinition()
    .name("testWorkflow")
    .description("This is a test workflow")
    .addFeedbackStep("Test feedback", "kermit");
 
    activitiRule.getRuntimeService().startProcessInstanceByKey(convertAndDeploy(workflowDefinition));
View Full Code Here

 
  @RequestMapping(value="/simple-workflow", method = RequestMethod.POST, produces="application/json")
  public SimpleWorkflowSuccessResponse createWorkflow(@RequestBody String json) {
    // Convert json to simple workflow definition
    SimpleWorkflowJsonConverter jsonConverter = new SimpleWorkflowJsonConverter();
    WorkflowDefinition workflowDefinition = jsonConverter.readWorkflowDefinition(json.getBytes());
   
    WorkflowDefinitionConversionFactory conversionFactory = new WorkflowDefinitionConversionFactory();
    WorkflowDefinitionConversion conversion = conversionFactory.createWorkflowDefinitionConversion(workflowDefinition);
    conversion.convert();
   
View Full Code Here

   
    selectEditorComponent.setEditorSelectedListener(new EditorSelectedListener() {
      public void editorSelectionChanged() {
       
        try {
          WorkflowDefinition workflowDefinition = loadWorkflowDefinition();
       
          // When using the modeler, the format must first be converted to the modeler json format
          if (selectEditorComponent.isModelerPreferred()) {
            
            WorkflowDefinitionConversion conversion = ExplorerApp.get()
View Full Code Here

TOP

Related Classes of org.activiti.workflow.simple.definition.WorkflowDefinition

Copyright © 2018 www.massapicom. 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.