class ConditionChainChoiceStrategy implements IChainChoiceStrategy {

    @Override
    public Object chooseChain(final IMessageProcessor messageProcessor) throws ChainChoiceException {
        try {
            if ((Boolean) messageProcessor.getMessage().getValue(chainConditionFN)) {
                Object name = messageProcessor.getSequence().getCurrentReceiverArguments().getValue(trueChainFN);
                return IOC.resolve(Keys.getOrAdd("chain_id_from_map_name"), name);
            }

            Object name = messageProcessor.getSequence().getCurrentReceiverArguments().getValue(falseChainFN);
            return IOC.resolve(Keys.getOrAdd("chain_id_from_map_name"), name);
        } catch (Exception e) {
            throw new ChainChoiceException("Could not execute condition chain choice strategy.");
        }
    }

    public  ConditionChainChoiceStrategy();

}