Open topic with navigation

TIBCO GridServer® 7.1.0

# Cancellation

A request can be canceled for a number of reasons. The Admin API or Administration Tool can directly cancel requests. Canceling a Service Session cancels a request. If the `killCancelledTasks` option is true for this Service, the Engine process exits and the Engine restarts. (By default, the `killCancelledTasks` option is true, except for .NET Services, where it is false by default.) However, in many cases, it is not necessary to do so, and you would prefer to interrupt the calculation so that the Engine becomes immediately available.

In this case, set the `killCancelledTasks` option to false, implement a `cancelMethod`, and register it on the Service type. This method must interrupt any Service method that is in process. It is also possible to call `cancelMethod` after the Service method finishes processing, so the implementer must take this into account.

Note | Use the `cancelMethod` to interrupt the task execution only. Do not use `cancelMethod` for cleanup of any sort. Use the `destroyMethod` for cleanup.

A typical use case is a calculation that periodically checks a cancel flag. The cancel method would set that flag, interrupting the calculation.

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO GridServer®

Copyright © 2001-2022. TIBCO Software Inc. All Rights Reserved.