WorkflowSettings extends ModelObject { public DateTime getShortTransitionActivation() { return now().plusMillis(shortTransitionDelay); } WorkflowSettings(Builder builder); DateTime getErrorTransitionActivation(int retryCount); DateTime getShortTransitionActivation(); int getMaxSubsequentStateExecutions(WorkflowState state); boolean deleteWorkflowInstanceHistory(); Short getDefaultPriority(); final int minErrorTransitionDelay; final int maxErrorTransitionDelay; final int shortTransitionDelay; final int immediateTransitionDelay; final int maxRetries; final int maxSubsequentStateExecutions; final Map<WorkflowState, Integer> maxSubsequentStateExecutionsPerState; final ReadablePeriod historyDeletableAfter; final BooleanSupplier deleteHistoryCondition; final short defaultPriority; }
@Test public void verifyConstantDefaultValues() { WorkflowSettings s = new WorkflowSettings.Builder().build(); assertThat(s.immediateTransitionDelay, is(0)); assertThat(s.shortTransitionDelay, is(30000)); long delta = s.getShortTransitionActivation().getMillis() - currentTimeMillis() - 30000; assertThat(delta, greaterThanOrEqualTo(-1000L)); assertThat(delta, lessThanOrEqualTo(0L)); assertThat(s.historyDeletableAfter, is(nullValue())); assertThat(s.defaultPriority, is((short) 0)); }