[jbpm-commits] JBoss JBPM SVN: r5375 - in jbpm4/trunk/modules: enterprise/src/test/java/org/jbpm/enterprise/internal/ejb and 2 other directories.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Jul 29 09:46:11 EDT 2009


Author: koen.aers at jboss.com
Date: 2009-07-29 09:46:11 -0400 (Wed, 29 Jul 2009)
New Revision: 5375

Modified:
   jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/job/Job.java
   jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/ejb/TimerTest.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/JobImpl.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java
   jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ScopeInstanceImpl.java
Log:
JBPM-2419: change Job.dueDate in Job.duedate

Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/job/Job.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/job/Job.java	2009-07-29 13:06:25 UTC (rev 5374)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/job/Job.java	2009-07-29 13:46:11 UTC (rev 5375)
@@ -38,9 +38,14 @@
   String getLockOwner();
 
   /** in case this is a timer, it is the time that the timer should fire, in case this 
-   * is a message, it is null. */
+   * is a message, it is null. 
+   * @deprecated */
   Date getDueDate();
 
+  /** in case this is a timer, it is the time that the timer should fire, in case this 
+   * is a message, it is null. */
+  Date getDuedate();
+
   /** exception that occurred during the last execution of this job.  The transaction 
    * of the job execution is rolled back.  A synchronization is used to create 
    * a separate transaction to update the exception and decrement the retries. */

Modified: jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/ejb/TimerTest.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/ejb/TimerTest.java	2009-07-29 13:06:25 UTC (rev 5374)
+++ jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/ejb/TimerTest.java	2009-07-29 13:46:11 UTC (rev 5375)
@@ -30,7 +30,6 @@
 
 import org.jbpm.api.Execution;
 import org.jbpm.api.ExecutionService;
-import org.jbpm.api.RepositoryService;
 import org.jbpm.enterprise.internal.custom.HappyListener;
 import org.jbpm.enterprise.internal.custom.NoisyListener;
 import org.jbpm.enterprise.internal.custom.WaitState;
@@ -141,7 +140,7 @@
 
     TimerImpl timer = new TimerImpl();
     timer.setEventName("timeout");
-    timer.setDueDate(dueDate);
+    timer.setDuedate(dueDate);
     timer.setExecution((ExecutionImpl) execution);
     environment.get(CommandService.class).execute(new CreateTimerCmd(timer));
 
@@ -187,7 +186,7 @@
 
     TimerImpl timer = new TimerImpl();
     timer.setEventName("timeout");
-    timer.setDueDate(dueDate);
+    timer.setDuedate(dueDate);
     timer.setExecution(execution);
     CommandService commandService = environment.get(CommandService.class);
     commandService.execute(new CreateTimerCmd(timer));
@@ -239,7 +238,7 @@
 
     TimerImpl timer = new TimerImpl();
     timer.setEventName("timeout");
-    timer.setDueDate(dueDate);
+    timer.setDuedate(dueDate);
     timer.setRepeat(REPEAT + " milliseconds");
     timer.setExecution(execution);
     CommandService commandService = environment.get(CommandService.class);

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/JobImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/JobImpl.java	2009-07-29 13:06:25 UTC (rev 5374)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/JobImpl.java	2009-07-29 13:46:11 UTC (rev 5375)
@@ -29,7 +29,7 @@
 
   /** date until which the command should not be executed
    * for async messages, this duedate should be set to null. */
-  protected Date dueDate = null;
+  protected Date duedate = null;
   
   /** job state. */
   protected String state = STATE_WAITING;
@@ -148,12 +148,16 @@
   public String getLockOwner() {
     return lockOwner;
   }
+  /** @deprecated */
   public Date getDueDate() {
-    return dueDate;
+    return duedate;
   }
-  public void setDueDate(Date dueDate) {
-    this.dueDate = dueDate;
+  public Date getDuedate() {
+    return duedate;
   }
+  public void setDuedate(Date duedate) {
+    this.duedate = duedate;
+  }
   public String getException() {
     return exception;
   }

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java	2009-07-29 13:06:25 UTC (rev 5374)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java	2009-07-29 13:46:11 UTC (rev 5375)
@@ -74,7 +74,7 @@
     dueDateDescription = (String) scriptManager.evaluateExpression(dueDateDescription, null);
     Date now = Clock.getCurrentTime();
     BusinessCalendar businessCalendar = Environment.getFromCurrent(BusinessCalendar.class);
-    dueDate = businessCalendar.add(now, dueDateDescription);
+    duedate = businessCalendar.add(now, dueDateDescription);
   }
 
   public Boolean execute(Environment environment) throws Exception {
@@ -112,9 +112,9 @@
       // then the repeat action duedate could already have passed
       do {
         setDueDateDescription(repeat);
-      } while (dueDate.getTime() <= Clock.getCurrentTime().getTime());
+      } while (duedate.getTime() <= Clock.getCurrentTime().getTime());
 
-      if (log.isDebugEnabled()) log.debug("rescheduled "+this+" for "+formatDueDate(dueDate));
+      if (log.isDebugEnabled()) log.debug("rescheduled "+this+" for "+formatDueDate(duedate));
       
       // release the lock on the timer
       release();
@@ -138,9 +138,9 @@
     StringBuilder text = new StringBuilder();
     text.append("timer[");
     text.append(dbid);
-    if (dueDate!=null) {
+    if (duedate!=null) {
       text.append("|");
-      text.append(formatDueDate(dueDate));
+      text.append(formatDueDate(duedate));
     }
     if (signalName!=null) {
       text.append("|");

Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ScopeInstanceImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ScopeInstanceImpl.java	2009-07-29 13:06:25 UTC (rev 5374)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ScopeInstanceImpl.java	2009-07-29 13:46:11 UTC (rev 5375)
@@ -290,7 +290,7 @@
     if (timerDefinition!=null) {
       timer.setEventName(timerDefinition.getEventName());
       timer.setSignalName(timerDefinition.getSignalName());
-      timer.setDueDate(timerDefinition.getDueDate());
+      timer.setDuedate(timerDefinition.getDueDate());
       timer.setDueDateDescription(timerDefinition.getDueDateDescription());
       Boolean isExclusive = timerDefinition.isExclusive();
       if (isExclusive!=null) {



More information about the jbpm-commits mailing list