[jboss-user] [jBPM Users] - Re: How can we contribute to development?

vchira do-not-reply at jboss.com
Wed Oct 7 05:57:59 EDT 2009


For the timer Problem a quick fix would be to change the Method setDueDateDescription in class TimerImpl like this:


  | public void setDueDateDescription(String dueDateDescription) {
  | 
  |     ScriptManager scriptManager = EnvironmentDefaults.getScriptManager();
  |     Object dueDateEvaluated = scriptManager.evaluateExpression(dueDateDescription, null);
  |     if(dueDateEvaluated instanceof Date)
  |     {
  |     	dueDate =dueDateEvaluated;
  |     	return;
  |     }
  |     dueDateDescription = (String) dueDateEvaluated;
  |     
  |     Duration duration = new Duration(dueDateDescription);
  |     Date now = Clock.getCurrentTime();
  | 
  | ...........................................
  | }
  | 

a better solution would be to add a dueDateTimeDefinition in TimerDefinitionImpl and in JobParser.parseTimerDefinition() just set the definition there. after that in ScopeInstanceImpl.createTimer() evaluate dueDateTimeDefinition and if the evaluation returns a Date just set it in dueDate otherwise pare dueDateTimeDefinition as a date String..like you do now in  JobParser.parseTimerDefinition().


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259093#4259093

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259093



More information about the jboss-user mailing list