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?
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.
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.
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.