1 package org.onap.so.bpmn.infrastructure.flowspecific.tasks;
3 import org.onap.so.bpmn.common.BuildingBlockExecution;
4 import org.onap.so.client.exception.ExceptionBuilder;
5 import org.slf4j.Logger;
6 import org.slf4j.LoggerFactory;
7 import org.springframework.beans.factory.annotation.Autowired;
8 import org.springframework.core.env.Environment;
9 import org.springframework.stereotype.Component;
12 public class ActivateVfModule {
14 private static final Logger logger = LoggerFactory.getLogger(ActivateVfModule.class);
16 protected static final String VF_MODULE_TIMER_DURATION_PATH = "mso.workflow.vfModuleActivate.timer.duration";
17 protected static final String DEFAULT_TIMER_DURATION = "PT180S";
20 private ExceptionBuilder exceptionUtil;
23 private Environment environment;
26 public void setTimerDuration(BuildingBlockExecution execution) {
28 String waitDuration = this.environment.getProperty(VF_MODULE_TIMER_DURATION_PATH, DEFAULT_TIMER_DURATION);
29 logger.debug("Sleeping before proceeding with SDNC activate. Timer duration: {}", waitDuration);
30 execution.setVariable("vfModuleActivateTimerDuration", waitDuration);
31 } catch (Exception e) {
32 exceptionUtil.buildAndThrowWorkflowException(execution, 7000, e);