The case type settings allow the case to be created as temporary and saved later if 'Persist' shape is reached.
However, there is no setting that can conditionally create the temporary case only if this case type is not initiated as child case.
Consider a case 'B' can be created as top-level case or as a child case of another case, say 'A'.
If case B is set as 'Temporary case', then this configuration will work great as long as this case is created as top level case. When a parent case A created the child case B, then the child case B will not show up in anyone's worklist/workqueue because it is defined as a temporary case and not persisted.
Expected: In the App Studio, In the case type Settings -> General -> Behavior, the checkbox "Create temporary case that is not saved until a 'Persist case' step is reached", when checked, should have an additional option like "Create temporary case only if not a child case".
Workaround: For a case type that is defined as a temporary case, what is the woraround to create this case as a non-temporary case if created as a child case?
***Edited by Moderator: Pooja Gadige to change category from General to Product, added product details tag***
In the data transform pyDefault , I tried to change the OTB value (behind the checkbox "Create temporary case that is not saved until a 'Persist case' step is reached") depending on if this case type is a child case or a top level case. The problem is, the pyDefault runs even before the data is propagated from the parent case, so there is no easy way to check.
Circumstancing the case type rule pyStartCase did not work either because the cirumstanced property was based on data propagated value from parent, and this case type rule runs even before any data is propagated, so the behavior is the same regardless of a child case of a top level case.
Based on your suggestion, in the first stage, we can add a step that will persist the case if a child case. By the time the first stage runs, the child case is fully instantiated and hence should know if a parent case exists or not. It would be nice if there's a much cleaner workaround, to avoid modifying stage steps for conditional temporary case creation.
Thanks Mike for your suggestion.
Posted: 2 years ago
Posted: 19 Nov 2020 20:45 EST
Guilherme Valino (GuiValino1984)
Lead System Architect
This last solution path you indicated, seems interesting, however, I identified that there are situations in which it works and others do not. There is some kind of queue that I'm not remembering right now that may be impacting this creation. There are moments that you create correctly in others you get lost. Do you have any indication of what can be assessed?
Posted: 2 years ago
Posted: 4 Sep 2020 8:40 EDT
Srinivas Yelamanchili (yelas1)
Senior System Architect
I identified a path with my colleagues that was the parent case, at the time of propagating the data, indicating that the pyTemporaryObject property is equal to "False". This makes the child case that despite being configured as temporary, generates the ID and with that the child case can be created without any kind of problem.