It was far from ideal.
So I set out to make it better. Instead of using the built-in save pipeline and restore pipeline (added in WM8) I went back to the old-school flow services. I added a debug variable (parallel to my published document variable) and then added a Branch statement on that variable. If not set (or really anything but "true") then I would save the pipeline, but I added the key data to the file name from my published document, so I could keep them all separate. So for my interface I added the form number and data. So my file was handlePOSLog-1000789-2013-05-23.xml.
Now to debug, I just set debug to true and fill in those 2 bits of information in my published document. When debug was true, the branch statement would do a restore pipeline and load the file that had been run before.
This ended up working out great. As we were running a test cycle and a bug would come up, I could start my debugger and trace through it while the others were still running test cases. Many times I could fix the bug right away and we could retest that one and move on. I also then had a history of all the runs and could reprocess them if needed to check the behavior was still the same.
So it looked like this:
Branch on /debug:
- true: pub.flow.restorePipelineFromFile
- $default: pub.flow.savePipelineToFile
Line stopping also known as stopple with a hot tap, hot tap has been completed, then another machine.
ReplyDelete
ReplyDelete#CloudGen is a proud Platinum Sponsor for #DigitalBusinessDays 2016 - Join us on 3-4 Oct,16 at The W NewYork
https://www.linkedin.com/groups/2090488/2090488-6173917281454678018
System.out.println("######## Start Download: ");
ReplyDeleteFacesContext facesContext = FacesContext.getCurrentInstance();
HttpServletResponse response =(HttpServletResponse) facesContext.getExternalContext().getResponse();
System.out.println("######## Start HTTPServletresponse: ");
response.reset();
response.setHeader("Content-Type", "application/octet-stream");
response.setHeader("Content-Disposition", "attachment;filename=SalesRegister.pdf");
System.out.println("######## start getting outputstream from response: "+response);
OutputStream responseOutputStream = response.getOutputStream();
System.out.println("######## end getting outputstream from response: "+response);
responseOutputStream.write(content.getBytes(), 0, content.getBytes().length);
System.out.println("######## END writing reponse: ");
responseOutputStream.close();
System.out.println("######## END closing reponse: ");
facesContext.responseComplete();
System.out.println("######## END: ");