3 Replies Latest reply on May 30, 2014 6:13 AM by wdfink

    timeout for service tasks

    meenal

      is there way to specify a timeout for a service task? i want to use timeouts in 2 ways -

      1) abort the process  itself if a service task is running for more than specific time period

      2) abort the task and move to the next task in the flow when the task takes more than specific time to execute.

        • 1. Re: timeout for service tasks
          wdfink

          Could you elaborate what you mean by service task and what you need to interrupt?

          Is the task running but the work take too long?

          Which server version do you use?

          • 2. Re: timeout for service tasks
            meenal

            by service task i mean a domain specific task for which i have written a few custom service task handlers to create different type of domain specific tasks.

             

            my use case is that if the business logic in the task takes more than a fixed amount of time , i want to either abort the process or move to the next task.

            these are 2 separate cases. for some domain specific tasks i want to abort the process if the this timeout is reached while for others i want the process to move ahead in the workflow.

            • 3. Re: timeout for service tasks
              wdfink

              That sounds like a use-case for batches JSR-352 which are available in JavaEE7.

              Other EE components does not have such control, except Transaction timeouts but here is no guarantee that the task is interrupted directly.