class CommonActions extends AbstractCaller {

	@CustomColumns(@CustomColumn(value = WAIT_TILL_TIME_ARG_DATE, required = true))
    @ActionMethod
	public void WaitTillTime(IActionContext actionContext, HashMap<?, ?> inputData) throws InterruptedException {
        Object o = unwrapFilters(inputData.get(WAIT_TILL_TIME_ARG_DATE));
        LocalDateTime date;
        if (o instanceof TemporalAccessor) {
            date = DateTimeUtility.toLocalDateTime((TemporalAccessor) o);
        } else if (o instanceof String) {
            String dateFormat = (String) o;
            date = DateUtil.modifyTemporal(DateTimeUtility.nowLocalDateTime(), dateFormat);
        } else {
            throw new IllegalArgumentException("Field " + WAIT_TILL_TIME_ARG_DATE + " have got value not instance of Date or String");
        }
        long milliseconds = DateUtil.getMilliseconds(date);
        actionContext.getLogger().info("WaitTillTime {}", date);
        if (System.currentTimeMillis() >= milliseconds) {
            String errorDescription = date + " has already passed, now " + DateTimeUtility.nowLocalDateTime();
            throw new EPSCommonException(errorDescription);
        } else {
            Thread.sleep(milliseconds - System.currentTimeMillis());
        }
	}

}