public void nodeEnter() { registerNotification(Event.EVENTTYPE_NODE_ENTER); }
public static void waitForEvent(String event) { waitForEvent(event, DEFAULT_TIMEOUT); }
public void afterCompletion(int status) { if (status == Status.STATUS_COMMITTED) { if (log.isDebugEnabled()) log.debug("sending '" + event + "' notification"); Semaphore eventSemaphore = getEventSemaphore(event); eventSemaphore.release(); } } };
public void afterCompletion(int status) { if (status == Status.STATUS_COMMITTED) { if (log.isDebugEnabled()) log.debug("sending '" + event + "' notification"); Semaphore eventSemaphore = getEventSemaphore(event); eventSemaphore.release(); } } };
public void taskEnd() { registerNotification(Event.EVENTTYPE_TASK_END); }
public static void waitForEvent(String event, long timeout) { waitForEvent(1, event, timeout); }
public static void waitForEvent(int occurrences, String event, long timeout) { boolean debug = log.isDebugEnabled(); if (debug) log.debug("waiting for " + event); Semaphore eventSemaphore = getEventSemaphore(event); try { if (!eventSemaphore.tryAcquire(occurrences, timeout)) { throw new JbpmException("event '" + event + "' did not occur within " + timeout + " ms"); } if (debug) log.debug("received '" + event + "' notification"); } catch (InterruptedException e) { throw new JbpmException("wait for event '" + event + "' was interrupted", e); } }
public void processStart() { registerNotification(Event.EVENTTYPE_PROCESS_START); }
public static void waitForEvent(int occurrences, String event) { waitForEvent(occurrences, event, DEFAULT_TIMEOUT); }
public static void waitForEvent(int occurrences, String event, long timeout) { boolean debug = log.isDebugEnabled(); if (debug) log.debug("waiting for " + event); Semaphore eventSemaphore = getEventSemaphore(event); try { if (!eventSemaphore.tryAcquire(occurrences, timeout)) { throw new JbpmException("event '" + event + "' did not occur within " + timeout + " ms"); } if (debug) log.debug("received '" + event + "' notification"); } catch (InterruptedException e) { throw new JbpmException("wait for event '" + event + "' was interrupted", e); } }
public void taskEnd() { registerNotification(Event.EVENTTYPE_TASK_END); }
public static void waitForEvent(String event) { waitForEvent(event, DEFAULT_TIMEOUT); }
public void processEnd() { registerNotification(Event.EVENTTYPE_PROCESS_END); }
public static void waitForEvent(String event, long timeout) { waitForEvent(1, event, timeout); }
public void timerCreate() { registerNotification(Event.EVENTTYPE_TIMER_CREATE); }
public static void waitForEvent(int occurrences, String event) { waitForEvent(occurrences, event, DEFAULT_TIMEOUT); }
public void processStart() { registerNotification(Event.EVENTTYPE_PROCESS_START); }
public void timerCreate() { registerNotification(Event.EVENTTYPE_TIMER_CREATE); }
public void processEnd() { registerNotification(Event.EVENTTYPE_PROCESS_END); }
public void nodeLeave() { registerNotification(Event.EVENTTYPE_NODE_LEAVE); }