Package org.activiti.engine.history

Examples of org.activiti.engine.history.HistoricFormProperty


        .formProperties().orderByVariableName().asc().list();

    // assert that the historic data corresponds to the form data that we've
    // entered
    assertThat(historicFormProps.size(), equalTo(4));
    HistoricFormProperty historicSummary = (HistoricFormProperty) historicFormProps
        .get(0);
    assertThat(historicSummary.getPropertyId(), equalTo(DESCRIPTION_KEY));
    assertThat(historicSummary.getPropertyValue(),
        equalTo(DESCRIPTION_VALUE));
    assertThat(historicSummary.getTime(), greaterThan(startDate));

    // assert that the bad-words filter has filtered one bad word and
    // replaced it with 'xxx'
    assertThat(
        (String) activitiRule.getRuntimeService()
View Full Code Here


    if (StringUtils.isNotEmpty(detail.getTaskId())) {
      result.setTaskUrl(formatUrl(serverRootUrl, RestUrls.URL_HISTORIC_TASK_INSTANCE, detail.getTaskId()));
    }
    result.setTime(detail.getTime());
    if (detail instanceof HistoricFormProperty) {
      HistoricFormProperty formProperty = (HistoricFormProperty) detail;
      result.setDetailType(HistoricDetailResponse.FORM_PROPERTY);
      result.setPropertyId(formProperty.getPropertyId());
      result.setPropertyValue(formProperty.getPropertyValue());
    } else if (detail instanceof HistoricVariableUpdate) {
      HistoricVariableUpdate variableUpdate = (HistoricVariableUpdate) detail;
      result.setDetailType(HistoricDetailResponse.VARIABLE_UPDATE);
      result.setRevision(variableUpdate.getRevision());
      result.setVariable(createRestVariable(variableUpdate.getVariableName(), variableUpdate.getValue(),
View Full Code Here

      .formProperties()
      .processInstanceId(processInstance.getId())
      .orderByFormPropertyId().asc()
      .list();
   
    HistoricFormProperty historicProperty1 = (HistoricFormProperty) props.get(0);
    assertEquals("formProp1", historicProperty1.getPropertyId());
    assertEquals("Activiti rocks", historicProperty1.getPropertyValue());
    assertEquals(startedDate, historicProperty1.getTime());
    assertEquals(processInstance.getId(), historicProperty1.getProcessInstanceId());
    assertNull(historicProperty1.getTaskId());
   
    assertNotNull(historicProperty1.getActivityInstanceId());
    HistoricActivityInstance historicActivityInstance = historyService.createHistoricActivityInstanceQuery().activityInstanceId(historicProperty1.getActivityInstanceId()).singleResult();
    assertNotNull(historicActivityInstance);
    assertEquals("start", historicActivityInstance.getActivityId());
   
    HistoricFormProperty historicProperty2 = (HistoricFormProperty) props.get(1);
    assertEquals("formProp2", historicProperty2.getPropertyId());
    assertEquals("12345", historicProperty2.getPropertyValue());
    assertEquals(startedDate, historicProperty2.getTime());
    assertEquals(processInstance.getId(), historicProperty2.getProcessInstanceId());
    assertNull(historicProperty2.getTaskId());
   
    assertNotNull(historicProperty2.getActivityInstanceId());
    historicActivityInstance = historyService.createHistoricActivityInstanceQuery().activityInstanceId(historicProperty2.getActivityInstanceId()).singleResult();
    assertNotNull(historicActivityInstance);
    assertEquals("start", historicActivityInstance.getActivityId());
   
    HistoricFormProperty historicProperty3 = (HistoricFormProperty) props.get(2);
    assertEquals("formProp3", historicProperty3.getPropertyId());
    assertEquals("Activiti still rocks!!!", historicProperty3.getPropertyValue());
    assertEquals(startedDate, historicProperty3.getTime());
    assertEquals(processInstance.getId(), historicProperty3.getProcessInstanceId());
    String activityInstanceId = historicProperty3.getActivityInstanceId();
    historicActivityInstance = historyService.createHistoricActivityInstanceQuery().activityInstanceId(activityInstanceId).singleResult();
    assertNotNull(historicActivityInstance);
    assertEquals(taskActivityId, historicActivityInstance.getActivityId());
    assertNotNull(historicProperty3.getTaskId());
   
    HistoricFormProperty historicProperty4 = (HistoricFormProperty) props.get(3);
    assertEquals("formProp4", historicProperty4.getPropertyId());
    assertEquals("54321", historicProperty4.getPropertyValue());
    assertEquals(startedDate, historicProperty4.getTime());
    assertEquals(processInstance.getId(), historicProperty4.getProcessInstanceId());
    activityInstanceId = historicProperty4.getActivityInstanceId();
    historicActivityInstance = historyService.createHistoricActivityInstanceQuery().activityInstanceId(activityInstanceId).singleResult();
    assertNotNull(historicActivityInstance);
    assertEquals(taskActivityId, historicActivityInstance.getActivityId());
    assertNotNull(historicProperty4.getTaskId());

    assertEquals(4, props.size());
  }
View Full Code Here

      .list();
  
    assertEquals(4, details.size());
   
    assertTrue(details.get(0) instanceof HistoricFormProperty);
    HistoricFormProperty formProp1 = (HistoricFormProperty) details.get(0);
    assertEquals("formProp1", formProp1.getPropertyId());
    assertEquals("activiti rocks!", formProp1.getPropertyValue());
   
    assertTrue(details.get(1) instanceof HistoricFormProperty);
    HistoricFormProperty formProp2 = (HistoricFormProperty) details.get(1);
    assertEquals("formProp2", formProp2.getPropertyId());
    assertEquals("12345", formProp2.getPropertyValue());
   
   
    assertTrue(details.get(2) instanceof HistoricVariableUpdate);
    HistoricVariableUpdate varUpdate1 = (HistoricVariableUpdate) details.get(2);
    assertEquals("variable1", varUpdate1.getVariableName());
View Full Code Here

            String theValue = variableRendererManager.getStringRepresentation(variable.getValue());
            variableItem.getItemProperty("value").setValue(theValue);
            variableItem.getItemProperty("type").setValue("variable");
          }
        } else {
          HistoricFormProperty form = (HistoricFormProperty) detail;
          if(variableNames.contains(form.getPropertyId()) == false) {
            variableNames.add(form.getPropertyId());
            Item variableItem = variablesTable.addItem(form.getPropertyId());
            variableItem.getItemProperty("name").setValue(form.getPropertyId());
            variableItem.getItemProperty("value").setValue(form.getPropertyValue());
            variableItem.getItemProperty("type").setValue("form property");
          }
        }
      }
     
View Full Code Here

            String theValue = variableRendererManager.getStringRepresentation(variable.getValue());
            variableItem.getItemProperty("value").setValue(theValue);
            variableItem.getItemProperty("type").setValue("variable");
          }
        } else {
          HistoricFormProperty form = (HistoricFormProperty) detail;
          if(variableNames.contains(form.getPropertyId()) == false) {
            variableNames.add(form.getPropertyId());
            Item variableItem = variablesTable.addItem(form.getPropertyId());
            variableItem.getItemProperty("name").setValue(form.getPropertyId());
            variableItem.getItemProperty("value").setValue(form.getPropertyValue());
            variableItem.getItemProperty("type").setValue("form property");
          }
        }
      }
     
View Full Code Here

      .formProperties()
      .processInstanceId(processInstance.getId())
      .orderByFormPropertyId().asc()
      .list();
   
    HistoricFormProperty historicProperty1 = (HistoricFormProperty) props.get(0);
    assertEquals("formProp1", historicProperty1.getPropertyId());
    assertEquals("Activiti rocks", historicProperty1.getPropertyValue());
    assertEquals(startedDate, historicProperty1.getTime());
    assertEquals(processInstance.getId(), historicProperty1.getProcessInstanceId());
    assertNull(historicProperty1.getTaskId());
   
    assertNotNull(historicProperty1.getActivityInstanceId());
    HistoricActivityInstance historicActivityInstance = historyService.createHistoricActivityInstanceQuery().activityInstanceId(historicProperty1.getActivityInstanceId()).singleResult();
    assertNotNull(historicActivityInstance);
    assertEquals("start", historicActivityInstance.getActivityId());
   
    HistoricFormProperty historicProperty2 = (HistoricFormProperty) props.get(1);
    assertEquals("formProp2", historicProperty2.getPropertyId());
    assertEquals("12345", historicProperty2.getPropertyValue());
    assertEquals(startedDate, historicProperty2.getTime());
    assertEquals(processInstance.getId(), historicProperty2.getProcessInstanceId());
    assertNull(historicProperty2.getTaskId());
   
    assertNotNull(historicProperty2.getActivityInstanceId());
    historicActivityInstance = historyService.createHistoricActivityInstanceQuery().activityInstanceId(historicProperty2.getActivityInstanceId()).singleResult();
    assertNotNull(historicActivityInstance);
    assertEquals("start", historicActivityInstance.getActivityId());
   
    HistoricFormProperty historicProperty3 = (HistoricFormProperty) props.get(2);
    assertEquals("formProp3", historicProperty3.getPropertyId());
    assertEquals("Activiti still rocks!!!", historicProperty3.getPropertyValue());
    assertEquals(startedDate, historicProperty3.getTime());
    assertEquals(processInstance.getId(), historicProperty3.getProcessInstanceId());
    String activityInstanceId = historicProperty3.getActivityInstanceId();
    historicActivityInstance = historyService.createHistoricActivityInstanceQuery().activityInstanceId(activityInstanceId).singleResult();
    assertNotNull(historicActivityInstance);
    assertEquals(taskActivityId, historicActivityInstance.getActivityId());
    assertNotNull(historicProperty3.getTaskId());
   
    HistoricFormProperty historicProperty4 = (HistoricFormProperty) props.get(3);
    assertEquals("formProp4", historicProperty4.getPropertyId());
    assertEquals("54321", historicProperty4.getPropertyValue());
    assertEquals(startedDate, historicProperty4.getTime());
    assertEquals(processInstance.getId(), historicProperty4.getProcessInstanceId());
    activityInstanceId = historicProperty4.getActivityInstanceId();
    historicActivityInstance = historyService.createHistoricActivityInstanceQuery().activityInstanceId(activityInstanceId).singleResult();
    assertNotNull(historicActivityInstance);
    assertEquals(taskActivityId, historicActivityInstance.getActivityId());
    assertNotNull(historicProperty4.getTaskId());

    assertEquals(4, props.size());
  }
View Full Code Here

      .list();
  
    assertEquals(4, details.size());
   
    assertTrue(details.get(0) instanceof HistoricFormProperty);
    HistoricFormProperty formProp1 = (HistoricFormProperty) details.get(0);
    assertEquals("formProp1", formProp1.getPropertyId());
    assertEquals("activiti rocks!", formProp1.getPropertyValue());
   
    assertTrue(details.get(1) instanceof HistoricFormProperty);
    HistoricFormProperty formProp2 = (HistoricFormProperty) details.get(1);
    assertEquals("formProp2", formProp2.getPropertyId());
    assertEquals("12345", formProp2.getPropertyValue());
   
   
    assertTrue(details.get(2) instanceof HistoricVariableUpdate);
    HistoricVariableUpdate varUpdate1 = (HistoricVariableUpdate) details.get(2);
    assertEquals("variable1", varUpdate1.getVariableName());
View Full Code Here

TOP

Related Classes of org.activiti.engine.history.HistoricFormProperty

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.