use of org.camunda.bpm.engine.repository.DecisionDefinition in project camunda-bpm-platform by camunda.
the class VersionTagTest method testParsingVersionTagDecisionDefinition.
@Deployment(resources = { "org/camunda/bpm/engine/test/api/repository/versionTag.dmn" })
public void testParsingVersionTagDecisionDefinition() {
DecisionDefinition decision = repositoryService.createDecisionDefinitionQuery().orderByDecisionDefinitionVersion().asc().singleResult();
assertEquals("1.0.0", decision.getVersionTag());
}
use of org.camunda.bpm.engine.repository.DecisionDefinition in project camunda-bpm-platform by camunda.
the class RepositoryServiceTest method testDecisionDefinitionUpdateTimeToLive.
@Deployment(resources = { "org/camunda/bpm/engine/test/api/dmn/Example.dmn" })
public void testDecisionDefinitionUpdateTimeToLive() {
// given
DecisionDefinition decisionDefinition = findOnlyDecisionDefinition();
// when
repositoryService.updateDecisionDefinitionHistoryTimeToLive(decisionDefinition.getId(), 6);
// then
decisionDefinition = findOnlyDecisionDefinition();
assertEquals(6, decisionDefinition.getHistoryTimeToLive().intValue());
}
use of org.camunda.bpm.engine.repository.DecisionDefinition in project camunda-bpm-platform by camunda.
the class RepositoryServiceTest method testDecisionDefinitionUpdateTimeToLiveNull.
@Deployment(resources = { "org/camunda/bpm/engine/test/api/dmn/Example.dmn" })
public void testDecisionDefinitionUpdateTimeToLiveNull() {
// given
DecisionDefinition decisionDefinition = findOnlyDecisionDefinition();
// when
repositoryService.updateDecisionDefinitionHistoryTimeToLive(decisionDefinition.getId(), null);
// then
decisionDefinition = (DecisionDefinitionEntity) repositoryService.getDecisionDefinition(decisionDefinition.getId());
assertEquals(null, decisionDefinition.getHistoryTimeToLive());
}
use of org.camunda.bpm.engine.repository.DecisionDefinition in project camunda-bpm-platform by camunda.
the class RepositoryServiceTest method testDecisionDefinitionUpdateTimeToLiveNegative.
@Deployment(resources = { "org/camunda/bpm/engine/test/api/dmn/Example.dmn" })
public void testDecisionDefinitionUpdateTimeToLiveNegative() {
// given
DecisionDefinition decisionDefinition = findOnlyDecisionDefinition();
// when
try {
repositoryService.updateDecisionDefinitionHistoryTimeToLive(decisionDefinition.getId(), -1);
fail("Exception is expected, that negative value is not allowed.");
} catch (BadUserRequestException ex) {
assertTrue(ex.getMessage().contains("greater than"));
}
}
use of org.camunda.bpm.engine.repository.DecisionDefinition in project camunda-bpm-platform by camunda.
the class DecisionDefinitionQueryTest method testQueryByVersionTag.
@Deployment(resources = { "org/camunda/bpm/engine/test/api/repository/versionTag.dmn", "org/camunda/bpm/engine/test/api/repository/versionTagHigher.dmn" })
@Test
public void testQueryByVersionTag() {
DecisionDefinition decisionDefinition = repositoryService.createDecisionDefinitionQuery().versionTag("1.0.0").singleResult();
assertEquals("versionTag", decisionDefinition.getKey());
assertEquals("1.0.0", decisionDefinition.getVersionTag());
}
Aggregations