# Suspending a Process Instance using Runtime Service

**URL:** https://forum.flowable.org/t/suspending-a-process-instance-using-runtime-service/6085
**Category:** Flowable Engine
**Created:** [May 25, 2020, 10:09pm UTC](https://forum.flowable.org/t/suspending-a-process-instance-using-runtime-service/6085 "2020-05-25T22:09:30Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![MAGICBEANSS](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/magicbeanss/32/1926_2.png) [@MAGICBEANSS](https://forum.flowable.org/u/MAGICBEANSS)
#### Post date: [May 25, 2020, 10:09pm UTC](https://forum.flowable.org/t/suspending-a-process-instance-using-runtime-service/6085/1 "2020-05-25T22:09:31Z")

</div>

I have a Async Service Task, I got the instance of RunTimeService from the context and tried this

```
RuntimeService runtimeService = Context.getProcessEngineConfiguration().getRuntimeService();
   Boolean isSuspended = runtimeService.createProcessInstanceQuery().processInstanceId(execution.getProcessInstanceId()).singleResult().isSuspended();
   if(!isSuspended) {
 runtimeService.suspendProcessInstanceById(execution.getProcessInstanceId());
   }

```

But the process seems to be continuing to next event/activity in the BPM model.  
How is it possible to achieve actual suspension of a process Instance

---

<div class="post-metadata">

### Author: ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)
#### Post date: [May 26, 2020, 8:39pm UTC](https://forum.flowable.org/t/suspending-a-process-instance-using-runtime-service/6085/2 "2020-05-26T20:39:41Z")

</div>

See [How to Suspend A Process Instance using Service Task](https://forum.flowable.org/t/how-to-suspend-a-process-instance-using-service-task/6082/2)
