public CaseDefinitionEntity getPreviousDefinition() {
    CaseDefinitionEntity previousCaseDefinition = null;

    String previousCaseDefinitionId = getPreviousCaseDefinitionId();
    if (previousCaseDefinitionId != null) {

      previousCaseDefinition = loadCaseDefinition(previousCaseDefinitionId);

      if (previousCaseDefinition == null) {
        resetPreviousCaseDefinitionId();
        previousCaseDefinitionId = getPreviousCaseDefinitionId();

        if (previousCaseDefinitionId != null) {
          previousCaseDefinition = loadCaseDefinition(previousCaseDefinitionId);
        }
      }
    }

    return previousCaseDefinition;
  }
public CaseDefinitionEntity getPreviousDefinition ( ) { CaseDefinitionEntity previousCaseDefinition = null ; String previousCaseDefinitionId = getPreviousCaseDefinitionId ( ) ; if ( previousCaseDefinitionId != null ) { previousCaseDefinition = loadCaseDefinition ( previousCaseDefinitionId ) ; if ( previousCaseDefinition == null ) { resetPreviousCaseDefinitionId ( ) ; previousCaseDefinitionId = getPreviousCaseDefinitionId ( ) ; if ( previousCaseDefinitionId != null ) { previousCaseDefinition = loadCaseDefinition ( previousCaseDefinitionId ) ; } } } return previousCaseDefinition ; }
previous case definition //////////////////////////////////////////////