4 Replies Latest reply on Nov 12, 2014 5:33 AM by zmor

    Task deadlines

    zmor

      Hi,

      My goal is to implement automatic deadlines on task.

      Scenario is as follows:

      I have database table, which consists of two fields: task_name, deadline_in_days.

      Now when task is created I need to check whether this task has a record in this table and set proper task deadline.

       

      I was thinking of creating custom task and implement WorkItemHandler to return proper deadline to next task, so deadline will be set on this next task.

      Problem is that I don't know how to implement someting when the task is created - work item handlers defines only execute and abort actions.

       

      Can someone help me with this?

       

      Thanks,

      KM

        • 1. Re: Task deadlines
          dosten

          One solution might be to use listeners.  Check out the docs: Chapter 5. Core Engine API.

          Also, could you use timers in the process?

          1 of 1 people found this helpful
          • 2. Re: Task deadlines
            swiderski.maciej

            see this article for details on how to use deadline in user tasks.

             

            HTH

            1 of 1 people found this helpful
            • 3. Re: Task deadlines
              zmor

              Thanks for the answers.

              I think TaskLifeCycleEventListener interface is exactly what i need.

               

              Regards,

              KM

              • 4. Re: Task deadlines
                zmor

                Hello again,

                I've succesfully managed to set deadlines on tasks via implementation of TaskLifeCycleEventListener.

                Now i have another question - I noticed that, task deadlines are removed after particular operations - eg. end deadlines are being removed after task is complete.

                This is done via CancelDeadlineCommand with parameters (taskId (taskId), true (removeStart) , true (removeEnd)))

                I need to always have this deadline, for future reports.

                 

                Is there a way to make these deadlines always stored in database?