/*
 * [y] hybris Platform
 *
 * Copyright (c) 2000-2015 hybris AG
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of hybris
 * ("Confidential Information"). You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the
 * license agreement you entered into with hybris.
 *
 *
 */
package com.braintree.test.actions.consignmentfulfilment;

import de.hybris.platform.processengine.model.BusinessProcessModel;
import com.braintree.constants.BraintreefulfilmentprocessConstants;
import com.braintree.test.actions.TestActionTemp;

import org.apache.log4j.Logger;


/**
 *
 */
public abstract class AbstractTestConsActionTemp extends TestActionTemp {

    private static final Logger LOG = Logger.getLogger(AbstractTestConsActionTemp.class);

    @Override
    public String execute(final BusinessProcessModel process) throws Exception //NOPMD
    {
        LOG.info(getResult());
        return getResult();
    }


    public BusinessProcessModel getParentProcess(final BusinessProcessModel process) {
        final String parentCode = (String) getProcessParameterValue(process,
            BraintreefulfilmentprocessConstants.PARENT_PROCESS);
        return getBusinessProcessService().getProcess(parentCode);
    }
}
