Trigger event when task due date is passed

Hi Guys,

I think my question is discussed already, but still we are hoping if there is any new update , if any trigger /listeners get invoked when a task due date get passed .
Our use case is we have to update task status as OVERDUE in another DB , for ASSIGNMENTS , COMPLETED , we are able to capture details through listeners but due date it’s not possible
Any finally based on OVERDUE status we have to take custom actions.

Regards,
Aarushi

Hi @aarushi.m,

Have a look at below snippet

1 Like

Hi hassang,

Thanks you soo much for help, with this design we would be able to fulfil our requirement,
but one more query here , I used the mentioned above git code in our custom Listeners but I am getting null pointer exception in

Context.getCommandContext.getJobManager.schedule(timerEntity)

here context.getCommandContext I am getting null, what could be any changes am I missing

Hi @aarushi.m,

Maybe below post is of interest to you

JobHandler interface force me override newConfiguration method on Escalation sample

Hi Hassang,

Yes I added the custom job handler in process Engine plugin , but the problem is it is giving null at

Context.getCommandContext and not moving further after

public class UserTaskDueDateProcessEnginePlugin extends AbstractProcessEnginePlugin {

    @Override
    public void postInit(ProcessEngineConfigurationImpl processEngineConfiguration) {
        // Add Job Handler to execute the Jobs
        if (processEngineConfiguration.getJobHandlers()==null) {
            processEngineConfiguration.setJobHandlers(new HashMap<String, JobHandler>());
        }
        processEngineConfiguration.getJobHandlers().put(UserTaskOverdueJobHandler.USER_TASK_ESCALATION_JOB_HANDLER_TYPE, new UserTaskOverdueJobHandler());
    }
}

And finally added in processEngine plugins

  private[processManager] lazy val configuration = {
val configuration = new StandaloneProcessEngineConfiguration()

  .setJobExecutorActivate(true)
  .setJdbcUrl(getCamundaDBUrl)
  .setHistory(ProcessEngineConfiguration.HISTORY_FULL)
  .setJdbcDriver(getHFDBDriver)
  .setDatabaseSchemaUpdate("true")
  .setJdbcUsername(getHFDBUser)
  .setJdbcPassword(getHFDBPassword)
  .setRestrictUserOperationLogToAuthenticatedUsers(false)
configuration.getProcessEnginePlugins.add(CamundaReactor.plugin)
configuration.getProcessEnginePlugins.add(new SpinProcessEnginePlugin)
configuration.getProcessEnginePlugins.add(new UserTaskDueDateProcessEnginePlugin)
configuration.setJobExecutorDeploymentAware(false)
configuration.setAutoStoreScriptVariables(true)
configuration

}

lazy val processEngine: ProcessEngine = {
configuration.buildProcessEngine()
}