Question
Dell
BR
Last activity: 16 Oct 2018 12:03 EDT
How to create Temporary Cases through the Pega API?
Hello,
I'm trying to create temporary cases using the Pega API but am not being able to. I'm sending as parameter the following structure:
{ "caseTypeID": "COMP-ORG-Work-MyApp", "processID": "pyStartCase" }
note that the pyStartCase from the COMP-ORG-Work-MyApp class has the Temporary object checkbox selected.
Other approach I tried was to add the following code inside the structure:
"content": { "pyTemporaryObject": "true" }
Either way, the created case is still a permanent one. Anyone knows how to do it?
Thanks in advance.
***Edited by Moderator: Marissa to add SR Details***
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
IN
Hello,
On reviewing the SR, we see that it was resolved. Please refer to this Support Article in case you have the same question: The Pega API won't create temporary cases
Thank you.
BUPA
AU
Hi
Can you pls explain how are you calling the API to create the case? Is there any commit or persist operation happening inside? Pls share your configuration details. Are you using any agent or listener for this purpose?
Dell
BR
Hi, thanks for your reply.
At the moment I am simply using the default Pega 7.2.2 API page (Resources -> Pega API -> Create new case -> Try it Out!) for testing purposes.
No commit or persist operations are being done in any of the case's flows.
BUPA
AU
Hi,
Service method pzCreateCase is called when the create case REST API is invoked. If you open this activity then you will see that standard PRPC API - pzCreateCaseInternal is called. If you look at step 6 of this activity then the content you have added as service parameter is merged into workpage and kept in page type property content. Hence pyTemporaryObject value which you are sending is being set. But from this activity svcAddWorkObject activity is called which is again calling CreateWorkPage, AddWork and CommitWithErrorHandling activities. CommitWithErrorHandling activity does the DB commit and creates a permanent instance.
Hope this explains the problem.
Dell
BR
Hi, thanks for your reply again.
So, after checking those activities it seems to me like the API wasn't designed to work with temporary cases. There's even a error message being set if the case ID is not valid (and temporary cases doesn't even have case IDs).
I wonder if those scenarios were not thought by Pega, or if there is any other way I'm not seeing.
Pegasystems Inc.
US
Hello Igor,
I have updated your post here with your SR information. I will update the SR with this post as well.
Thanks,
Pegasystems
US
Hello,
I would like to try your example, but I'm confused about this part:
>>> At the moment I am simply using the default Pega 7.2.2 API page (Resources -> Pega API ->
>>> Create new case -> Try it Out!) for testing purposes.
I assume "Resources > Pega API . . ." is some sort of menu navigation, but on what screen or portal do I find that "Resources" menu item to get going on this?
Thanks. /Eric
Pegasystems Inc.
IN
Hi,
Thank you for posting your query in the PSC. This looks like an inactive post and hence, we suggest you create a new post for your query. Click on the Write a Post button that’s available on the top right pane of this page. Once created, please reply back here with the URL of the new post.
You may also refer this discussion link as a reference in the new thread.
Accepted Solution
Pegasystems Inc.
IN
Hello,
On reviewing the SR, we see that it was resolved. Please refer to this Support Article in case you have the same question: The Pega API won't create temporary cases
Thank you.