Hello,
I am trying to create a timer in a business process, and save it to the
scheduler. I get no errors when creating or saving the timer. However, it does
not appear that anything is getting saved to the database. The JBPM_TIMER table
is empty. Here is the code I am executing inside of my business process
ActionHandler's execute method:
public void execute(ExecutionContext executionContext) throws Exception {
log.debug("[execute]: Enter.");
try {
log.debug("[execute]: Getting context variables.");
String transactionId = (String) executionContext
.getVariable(NetworkNode.PVAR_transactionId);
log.debug("[execute]: Creating solicit timer: "
+ executionContext.getTaskInstance());
Timer timer = new Timer(executionContext.getToken());
timer.setName("Solicit: " + transactionId);
BusinessCalendar businessCalendar = new
BusinessCalendar();
Date dueDate = businessCalendar.findStartOfNextDay(new
Date());
timer.setDueDate(dueDate);
timer.setTransitionName("solicitQuery");
timer.setGraphElement(executionContext.getEventSource());
timer.setTaskInstance(executionContext.getTaskInstance());
SchedulerService schedulerService = (SchedulerService)
Services
.getCurrentService(Services.SERVICENAME_SCHEDULER);
schedulerService.createTimer(timer);
log.info("[execute]: Solicit timer created: " + timer);
} catch (Exception ex) {
if (ex instanceof NodeException) {
throw ex;
}
log.error("[execute]: Error creating solicit timer: " +
ex.getMessage());
throw new NodeException("Error creating solicit timer:
" + ex.getMessage(),
ex, IErrorCode.Code.E_UNKNOWN_ERROR);
} finally {
executionContext.leaveNode();
log.debug("[execute]: Exit.");
}
}
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3962229#3962229
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3962229
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user