public Object getPersistentState() { List<Object> state = new ArrayList<Object>(8); state.add(getSerializerName()); state.add(textValue); state.add(textValue2); state.add(this.state); state.add(doubleValue); state.add(longValue); state.add(processDefinitionId); state.add(processDefinitionKey); state.add(getByteArrayId()); return state; }
public Object getPersistentState() { List<Object> state = new ArrayList<Object>(8); state.add(getSerializerName()); state.add(textValue); state.add(textValue2); state.add(this.state); state.add(doubleValue); state.add(longValue); state.add(processDefinitionId); state.add(processDefinitionKey); state.add(getByteArrayId()); return state; }
@Override public String toString() { return this.getClass().getSimpleName() + "[id=" + id + ", processDefinitionKey=" + processDefinitionKey + ", processDefinitionId=" + processDefinitionId + ", rootProcessInstanceId=" + rootProcessInstanceId + ", removalTime=" + removalTime + ", processInstanceId=" + processInstanceId + ", taskId=" + taskId + ", executionId=" + executionId + ", tenantId=" + tenantId + ", activityInstanceId=" + activityInstanceId + ", caseDefinitionKey=" + caseDefinitionKey + ", caseDefinitionId=" + caseDefinitionId + ", caseInstanceId=" + caseInstanceId + ", caseExecutionId=" + caseExecutionId + ", name=" + name + ", createTime=" + createTime + ", revision=" + revision + ", serializerName=" + getSerializerName() + ", longValue=" + longValue + ", doubleValue=" + doubleValue + ", textValue=" + textValue + ", textValue2=" + textValue2 + ", state=" + state + ", byteArrayId=" + getByteArrayId() + "]"; }
@Override public String toString() { return this.getClass().getSimpleName() + "[id=" + id + ", processDefinitionKey=" + processDefinitionKey + ", processDefinitionId=" + processDefinitionId + ", rootProcessInstanceId=" + rootProcessInstanceId + ", removalTime=" + removalTime + ", processInstanceId=" + processInstanceId + ", taskId=" + taskId + ", executionId=" + executionId + ", tenantId=" + tenantId + ", activityInstanceId=" + activityInstanceId + ", caseDefinitionKey=" + caseDefinitionKey + ", caseDefinitionId=" + caseDefinitionId + ", caseInstanceId=" + caseInstanceId + ", caseExecutionId=" + caseExecutionId + ", name=" + name + ", createTime=" + createTime + ", revision=" + revision + ", serializerName=" + getSerializerName() + ", longValue=" + longValue + ", doubleValue=" + doubleValue + ", textValue=" + textValue + ", textValue2=" + textValue2 + ", state=" + state + ", byteArrayId=" + getByteArrayId() + "]"; }
@Test public void shouldResolveByteArray_SetVariable() { // given testRule.deploy(CALLING_PROCESS); testRule.deploy(CALLED_PROCESS); ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(CALLING_PROCESS_KEY); // when runtimeService.setVariable(processInstance.getId(), "aVariableName", new ByteArrayInputStream("hello world".getBytes())); HistoricVariableInstanceEntity historicVariableInstance = (HistoricVariableInstanceEntity) historyService.createHistoricVariableInstanceQuery().singleResult(); ByteArrayEntity byteArray = findByteArrayById(historicVariableInstance.getByteArrayId()); // assume assertThat(byteArray, notNullValue()); // then assertThat(byteArray.getRootProcessInstanceId(), is(processInstance.getProcessInstanceId())); }
@Test public void shouldResolveByteArray_SetVariable() { // given ClockUtil.setCurrentTime(START_DATE); testRule.deploy(CALLING_PROCESS); testRule.deploy(CALLED_PROCESS); ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(CALLING_PROCESS_KEY); // when runtimeService.setVariable(processInstance.getId(), "aVariableName", new ByteArrayInputStream("hello world".getBytes())); HistoricVariableInstanceEntity historicVariableInstance = (HistoricVariableInstanceEntity) historyService.createHistoricVariableInstanceQuery().singleResult(); ByteArrayEntity byteArray = findByteArrayById(historicVariableInstance.getByteArrayId()); // assume assertThat(byteArray, notNullValue()); Date removalTime = addDays(START_DATE, 5); // then assertThat(byteArray.getRemovalTime(), is(removalTime)); }
@Test public void shouldResolveByteArray_SetVariable() { // given testRule.deploy(CALLING_PROCESS); testRule.deploy(CALLED_PROCESS); ClockUtil.setCurrentTime(START_DATE); ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(CALLING_PROCESS_KEY); runtimeService.setVariable(processInstance.getId(), "aVariableName", new ByteArrayInputStream("hello world".getBytes())); HistoricVariableInstanceEntity historicVariableInstance = (HistoricVariableInstanceEntity) historyService.createHistoricVariableInstanceQuery().singleResult(); ByteArrayEntity byteArray = findByteArrayById(historicVariableInstance.getByteArrayId()); // assume assertThat(byteArray.getRemovalTime(), nullValue()); String taskId = taskService.createTaskQuery().singleResult().getId(); ClockUtil.setCurrentTime(END_DATE); // when taskService.complete(taskId); byteArray = findByteArrayById(historicVariableInstance.getByteArrayId()); Date removalTime = addDays(END_DATE, 5); // then assertThat(byteArray.getRemovalTime(), is(removalTime)); }
public Object getPersistentState() { List<Object> state = new ArrayList<Object>(8); state.add(getSerializerName()); state.add(textValue); state.add(textValue2); state.add(this.state); state.add(doubleValue); state.add(longValue); state.add(processDefinitionId); state.add(processDefinitionKey); state.add(getByteArrayId()); return state; }
@Override public String toString() { return this.getClass().getSimpleName() + "[id=" + id + ", processDefinitionKey=" + processDefinitionKey + ", processDefinitionId=" + processDefinitionId + ", rootProcessInstanceId=" + rootProcessInstanceId + ", removalTime=" + removalTime + ", processInstanceId=" + processInstanceId + ", taskId=" + taskId + ", executionId=" + executionId + ", tenantId=" + tenantId + ", activityInstanceId=" + activityInstanceId + ", caseDefinitionKey=" + caseDefinitionKey + ", caseDefinitionId=" + caseDefinitionId + ", caseInstanceId=" + caseInstanceId + ", caseExecutionId=" + caseExecutionId + ", name=" + name + ", createTime=" + createTime + ", revision=" + revision + ", serializerName=" + getSerializerName() + ", longValue=" + longValue + ", doubleValue=" + doubleValue + ", textValue=" + textValue + ", textValue2=" + textValue2 + ", state=" + state + ", byteArrayId=" + getByteArrayId() + "]"; }
@Test public void shouldResolveByteArray_SetVariable() { // given testRule.deploy(CALLING_PROCESS); testRule.deploy(CALLED_PROCESS); ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(CALLING_PROCESS_KEY); // when runtimeService.setVariable(processInstance.getId(), "aVariableName", new ByteArrayInputStream("hello world".getBytes())); HistoricVariableInstanceEntity historicVariableInstance = (HistoricVariableInstanceEntity) historyService.createHistoricVariableInstanceQuery().singleResult(); ByteArrayEntity byteArray = findByteArrayById(historicVariableInstance.getByteArrayId()); // assume assertThat(byteArray, notNullValue()); // then assertThat(byteArray.getRootProcessInstanceId(), is(processInstance.getProcessInstanceId())); }
@Test public void shouldResolveByteArray_SetVariable() { // given ClockUtil.setCurrentTime(START_DATE); testRule.deploy(CALLING_PROCESS); testRule.deploy(CALLED_PROCESS); ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(CALLING_PROCESS_KEY); // when runtimeService.setVariable(processInstance.getId(), "aVariableName", new ByteArrayInputStream("hello world".getBytes())); HistoricVariableInstanceEntity historicVariableInstance = (HistoricVariableInstanceEntity) historyService.createHistoricVariableInstanceQuery().singleResult(); ByteArrayEntity byteArray = findByteArrayById(historicVariableInstance.getByteArrayId()); // assume assertThat(byteArray, notNullValue()); Date removalTime = addDays(START_DATE, 5); // then assertThat(byteArray.getRemovalTime(), is(removalTime)); }
@Test public void shouldResolveByteArray_SetVariable() { // given testRule.deploy(CALLING_PROCESS); testRule.deploy(CALLED_PROCESS); ClockUtil.setCurrentTime(START_DATE); ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(CALLING_PROCESS_KEY); runtimeService.setVariable(processInstance.getId(), "aVariableName", new ByteArrayInputStream("hello world".getBytes())); HistoricVariableInstanceEntity historicVariableInstance = (HistoricVariableInstanceEntity) historyService.createHistoricVariableInstanceQuery().singleResult(); ByteArrayEntity byteArray = findByteArrayById(historicVariableInstance.getByteArrayId()); // assume assertThat(byteArray.getRemovalTime(), nullValue()); String taskId = taskService.createTaskQuery().singleResult().getId(); ClockUtil.setCurrentTime(END_DATE); // when taskService.complete(taskId); byteArray = findByteArrayById(historicVariableInstance.getByteArrayId()); Date removalTime = addDays(END_DATE, 5); // then assertThat(byteArray.getRemovalTime(), is(removalTime)); }