# Create a case on a specific task

**URL:** https://community.ofelia.com/t/create-a-case-on-a-specific-task/8484
**Category:** Q&A
**Created:** [17 May 2017 11:44 UTC](https://community.ofelia.com/t/create-a-case-on-a-specific-task/8484 "2017-05-17T11:44:44Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![diana.bento](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@diana.bento](https://community.ofelia.com/u/diana.bento)
#### Post date: [17 May 2017 11:44 UTC](https://community.ofelia.com/t/create-a-case-on-a-specific-task/8484/1 "2017-05-17T11:44:44Z")

</div>

Hi all,

I was using the REST API and done the create case examples using the information on this link:  
[http://documentation.bonitasoft.com/6.x-7.2/bpm-api-1#task](http://documentation.bonitasoft.com/6.x-7.2/bpm-api-1#task)

Example 1 created the case.  
Example 2 created the case with variables.

I then created a simple workflow with two tasks.  
“Step 1” and “Step 2”

And thought that maybe there is a way to create a case starting on a specific task?  
How’s the syntax?

Thanks in advance,  
Diana

---

<div class="post-metadata">

### Author: ![Sean\_McP](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/sean_mcp/32/932_2.png) [@Sean\_McP](https://community.ofelia.com/u/Sean_McP)
#### Post date: [21 May 2017 03:51 UTC](https://community.ofelia.com/t/create-a-case-on-a-specific-task/8484/2 "2017-05-21T03:51:18Z")

</div>

OK, apologies I was travelling for a couple of days.

I see what you mean now, what you actually mean is you want to _restart a failed case_. Starting at a particular task is something completely different and implies a non-failed process.

Is it possible to restart a failed case - in Subscription Yes and it comes as an existing function in the software. In Community it is not available as a default function, however you could write your own restart mechanism using the appropriate API functionality

```
retryTask(long) - Method in interface org.bonitasoft.engine.api.ProcessRuntimeAPI
Reset the state of a failed FlowNodeInstance to its previous state and then execute it.

```

As you can see the correct terminology is to _Retry a failed Task_ - when in a case you shouldn’t actually bypass it you should always try to retry it.

As for REST - no you would have to create your own to call the API to retry,

Hope this helps

regards  
Seán

_PS: As this reply offers an answer your question, and if you like it, please Mark UP and/or as Resolved._

---

<div class="post-metadata">

### Author: ![Sean\_McP](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/sean_mcp/32/932_2.png) [@Sean\_McP](https://community.ofelia.com/u/Sean_McP)
#### Post date: [17 May 2017 21:10 UTC](https://community.ofelia.com/t/create-a-case-on-a-specific-task/8484/3 "2017-05-17T21:10:10Z")

</div>

On what basis would you start at a specific task? What decision would have to be satisfied to do this?

---

<div class="post-metadata">

### Author: ![diana.bento](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@diana.bento](https://community.ofelia.com/u/diana.bento)
#### Post date: [18 May 2017 10:49 UTC](https://community.ofelia.com/t/create-a-case-on-a-specific-task/8484/4 "2017-05-18T10:49:52Z")

</div>

Hi, thanks for the reply.

“On what basis would you start at a specific task?”

I forsee the ocasion where the need to fix a mistake or react to an error that breaks the workflow.

“What decision would have to be satisfied to do this?”

I would limit the functionality to start at a specific task to an user that has administrator permissions.

I don’t know if i’m interpreting “decision” as you are.  
You mean “decision” as a decision made on the workflow?

Best regards,

---

<div class="post-metadata">

### Author: ![diana.bento](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@diana.bento](https://community.ofelia.com/u/diana.bento)
#### Post date: [22 May 2017 09:33 UTC](https://community.ofelia.com/t/create-a-case-on-a-specific-task/8484/5 "2017-05-22T09:33:49Z")

</div>

Hi Sean,

Thank you for your very detailed answer.

So it’s only possible to retry a task.  
A complete bypass to another task of the process is completely unavailable, right?

Is there something that I could consult to see what API is only available for Subscription and above?

Regards,  
Diana
