public Attachment execute(CommandContext commandContext) { return commandContext .getDbEntityManager() .selectById(AttachmentEntity.class, attachmentId); }
public void delete() { Context .getCommandContext() .getDbEntityManager() .delete(this); }
public void delete() { Context .getCommandContext() .getDbEntityManager() .delete(this); }
protected ByteArrayEntity getErrorByteArray() { if (errorDetailsByteArrayId != null) { return Context .getCommandContext() .getDbEntityManager() .selectById(ByteArrayEntity.class, errorDetailsByteArrayId); } return null; }
protected void ensureExceptionByteArrayInitialized() { if (exceptionByteArray == null && exceptionByteArrayId != null) { exceptionByteArray = Context .getCommandContext() .getDbEntityManager() .selectById(ByteArrayEntity.class, exceptionByteArrayId); } }
protected HistoricProcessInstanceEventEntity getHistoricRootProcessInstance(String rootProcessInstanceId) { return Context.getCommandContext() .getDbEntityManager() .selectById(HistoricProcessInstanceEventEntity.class, rootProcessInstanceId); }
protected void ensureErrorByteArrayInitialized() { if (errorDetailsByteArray == null && errorDetailsByteArrayId != null) { errorDetailsByteArray = Context .getCommandContext() .getDbEntityManager() .selectById(ByteArrayEntity.class, errorDetailsByteArrayId); } }
public void forceUpdate() { Context.getCommandContext() .getDbEntityManager() .forceUpdate(this); }
protected HistoricProcessInstanceEventEntity getHistoricRootProcessInstance(String rootProcessInstanceId) { return Context.getCommandContext() .getDbEntityManager() .selectById(HistoricProcessInstanceEventEntity.class, rootProcessInstanceId); }
public void delete() { byteArrayField.deleteByteArrayValue(); Context .getCommandContext() .getDbEntityManager() .delete(this); }
@Override public void onCommandContextClose(CommandContext commandContext) { if(commandContext.getDbEntityManager().isDirty(this)) { commandContext.getHistoricTaskInstanceManager().updateHistoricTaskInstance(this); } }
public Void execute(CommandContext commandContext) { // assume assertThat(commandContext.getDbEntityManager().selectById(ByteArrayEntity.class, historicByteArrayId[0]), nullValue()); return null; } });
public void delete() { byteArrayField.deleteByteArrayValue(); Context .getCommandContext() .getDbEntityManager() .delete(this); }
public void delete() { if (!isTransient()) { typedValueField.notifyImplicitValueUpdate(); } // clear value clearValueFields(); if (!isTransient) { // delete variable Context.getCommandContext().getDbEntityManager().delete(this); } }
public Object execute(CommandContext commandContext) { AttachmentEntity updateAttachment = commandContext .getDbEntityManager() .selectById(AttachmentEntity.class, attachment.getId()); updateAttachment.setName(attachment.getName()); updateAttachment.setDescription(attachment.getDescription()); return null; } }
public Void execute(CommandContext commandContext) { HistoricTaskInstanceEntity historicTaskInstanceEntity = (HistoricTaskInstanceEntity) historyService.createHistoricTaskInstanceQuery().singleResult(); commandContext.getDbEntityManager() .delete(historicTaskInstanceEntity); return null; } });
public Void execute(CommandContext commandContext) { HistoricVariableInstanceEntity historicVariableInstanceEntity = (HistoricVariableInstanceEntity) historyService.createHistoricVariableInstanceQuery().singleResult(); commandContext.getDbEntityManager().delete(historicVariableInstanceEntity); return null; } });
public Void execute(CommandContext commandContext) { HistoricVariableInstanceEntity historicVariableInstanceEntity = (HistoricVariableInstanceEntity) historyService.createHistoricVariableInstanceQuery().singleResult(); commandContext.getDbEntityManager().delete(historicVariableInstanceEntity); return null; } });
public Void execute(CommandContext commandContext) { JobEntity timer = commandContext.getDbEntityManager().selectById(JobEntity.class, job.getId()); timer.setRetries(retries); return null; }
private void updateTimeToLive(CommandContext commandContext, String businessKey, int timeToLive) { List<ProcessDefinition> processDefinitions = engineRule.getRepositoryService().createProcessDefinitionQuery().processDefinitionKey(businessKey).list(); assertEquals(1, processDefinitions.size()); ProcessDefinitionEntity processDefinition1 = (ProcessDefinitionEntity) processDefinitions.get(0); processDefinition1.setHistoryTimeToLive(timeToLive); commandContext.getDbEntityManager().merge(processDefinition1); }