* Calculates the next status of the specified contract.
*/
protected ContractStatus getNextContractStatus(Contract contract) {
ContractStatus contractStatus = contract.getStatus();
ContractFlowStep currentContractStep = contractFlowStatesRegistry.getFlowStep(contractStatus);
if(currentContractStep == null) {
throw new BusinessLogicException("Cannot find processor to process contract status '" + contractStatus + "'");
}
return currentContractStep.nextStep(contract);
}