如何删除PM中的案例?

时间:2017-04-03 08:15:24

标签: processmaker

我正在尝试删除PM中的案例,但我无法使用API​​

http://wiki.processmaker.com/3.1/REST_API_Cases#Delete_Case:DELETE.2Fcases.2F.7Bapp_uid.7D

我已经尝试过这个API,但它给我一个错误,如:

[GuzzleHttp\Exception\ClientException]                                                                                                                  
  Client error: `DELETE http://processmaker.app:32768/api/1.0/workflow/cases/50492041658e1dfca544ad3002222462` resulted in a `400 Bad Request` response:  
  {"error":{"code":400,"message":"Bad Request: You can't delete the case because it's not in Draft status and was already  (truncated...)  

是的,我甚至尝试取消案件,但仍然是同样的错误

1 个答案:

答案 0 :(得分:0)

您收到的错误是因为一旦案件离开DRAFT状态就无法删除。这意味着,一旦案件提交到下一个任务,它将被视为TODO状态。

因此,一旦案件转换为TODO状态,您只能取消案件,而不是删除案件。

您可以在此处找到与此相关的更多信息:http://wiki.processmaker.com/3.1/user_guide#Cancel

不要忘记确保您正在进行其余API呼叫的用户具有正确的权限,以便能够取消/删除案例。

要通过其余的api取消案例,请查看以下链接:http://wiki.processmaker.com/3.1/REST_API_Cases#Cancel_Case:PUT.2Fcases.2F.7Bapp_uid.7D.2Fcancel

我希望有所帮助!

相关问题