I know this can be a basic question. But, I couldn't find a answer till now even after browsing through discussions in mesh (I might have missed some). So, here it is
I have to read in an xml on the screen pasted in a text area and on submit, I have to create a work object based on the case type mentioned in the xml and replace the current work object. I was not sure how to do that. So, what I did is create a new start-up process for the FW class which creates a temporary work object and it has a screen it. I will read the xml in it and trying to create the work object in a utility called after the flow action. But, I am not able to open the created work object and replace the current temporary object.
Any idea how I can achieve this? I am open to other ways if any, to achieve this.
This is more like a solution suggestion question, rather than a support question. Let me give a try, simply launch a harness rather than going for a temporary work object / flow. Let the user give the XML and on submit you can create the work object using the Process APIs. The Portal should be having Dynamic Container without tabs, this would make the current tab to be replaced. If, you are on a multi-tab dynamic container then probably you can close the harness using the actions as you created the new work object. I have not tried it in Pega 7, but in previous versions i tried something similar and it did work for me.
The reason why I went for the temporary work object is, I want it as another option to create the case. So, when we click on the OOTB Create menu in the case manager portal, this flow will be shown and will be started when selected. I can use my own harness when initiating the flow and instead of pega OOTB buttons, i can put my own button for submit which opens the new work object after finishing this.
Without all this hastle, cant we do this simply within an activity?