Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
import org.flowable.job.service.impl.persistence.entity.TimerJobEntity;
import org.flowable.job.service.impl.persistence.entity.TimerJobEntityManager;
import org.joda.time.DateTime;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* {@link CmmnActivityBehavior} implementation for the CMMN Timer Event Listener.
Expand All @@ -59,6 +61,8 @@
*/
public class TimerEventListenerActivityBehaviour extends CoreCmmnActivityBehavior implements PlanItemActivityBehavior {

private static final Logger LOGGER = LoggerFactory.getLogger(TimerEventListenerActivityBehaviour.class);

protected TimerEventListener timerEventListener;

public TimerEventListenerActivityBehaviour(TimerEventListener timerEventListener) {
Expand Down Expand Up @@ -130,14 +134,18 @@ protected void handleCreateTransition(CommandContext commandContext, PlanItemIns
// Try to parse as ISO8601 first
try {
timerDueDate = DateUtil.parseDate(timerString);
} catch (Exception e) { }
} catch (Exception e) {
LOGGER.debug("Failed to parse timer expression '{}' as ISO8601 date", timerString, e);
}

// Try to parse as cron expression
try {
timerDueDate = businessCalendarManager.getBusinessCalendar(CycleBusinessCalendar.NAME).resolveDuedate(timerString);
isRepeating = true;

} catch (Exception pe) { }
} catch (Exception pe) {
LOGGER.debug("Failed to parse timer expression '{}' as cron expression", timerString, pe);
}

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import org.flowable.common.engine.impl.javax.el.ELContext;
import org.flowable.common.engine.impl.javax.el.ELException;
import org.flowable.common.engine.impl.javax.el.ExpressionFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Expression factory implementation.
Expand Down Expand Up @@ -75,6 +77,8 @@
* @author Christoph Beck
*/
public class ExpressionFactoryImpl extends ExpressionFactory {

private static final Logger LOGGER = LoggerFactory.getLogger(ExpressionFactoryImpl.class);
/**
* A profile provides a default set of language features that will define the builder's
* behavior. A profile can be adjusted using the <code>javax.el.methodInvocations</code>,
Expand Down Expand Up @@ -266,15 +270,15 @@ private Properties loadDefaultProperties() {
try {
input.close();
} catch (IOException e) {
// ignore...
LOGGER.debug("Failed to close stream while loading default properties", e);
}
}
if (getClass().getName().equals(properties.getProperty("javax.el.ExpressionFactory"))) {
return properties;
}
}
} catch (SecurityException e) {
// ignore...
LOGGER.debug("SecurityException while loading default properties", e);
}
if (getClass().getName().equals(System.getProperty("javax.el.ExpressionFactory"))) {
return System.getProperties();
Expand Down
Loading