I just graduated from the University of Cincinnati with a Bachelor's in Chemical Engineering and a Pre-Medicine Certificate in May 2020 (one month ago). I worked as an intern at BASF (the world's largest chemical company) for about a year and a half. In my time there, I sat in on a lot of Process Hazard Analysis meetings. Basically, a Process Hazard Analysis is a document which identifies all possible risks inherent to a generic industrial chemical process and outlines how the company will minimize these risks. The word "meeting" is rather loose for these gatherings... they were a full 40 hours long -- a full work week, sometimes longer. Not only that, but the best and brightest were in attendance. Because the safety of humans was involved, all of the most experienced chemical engineers were usually present. Food was often catered to deal with tedious and dull details relating to the process in terms of safety -- even down to counting the threads on screws to be used. Contributing to these meetings was an arduous odyssey, and especially costly -- but it had to be done to ensure the safety of the workers, consumers, and residents nearby the plant. It's not only BASF that does this -- it's a necessary endeavor for every process on any chemical plant, and any given chemical plant usually has around 10+ processes, with more being added and updated frequently -- which means multiple Process Hazard Analysis meetings a year.
What it does
One of the most challenging parts of creating a Process Hazard Analysis is thinking of all the possible sources of risk. Another taxing duty when completing a Process Hazard Analysis is then thinking of realistic recommendations to address the possible sources of risk to minimize danger. Both of these tasks are facilitated using my application created in Pega. The user is prompted with relevant possible sources of risk by asking them questions, such as “What if a compressor overspeeds?” if the user has indicated that their process will use a compressor. Then the user can answer appropriately for their specific process. The app also prompts the user with respective recommendations to make their process safer, depending on which questions they answer. Finally, based on the answers that the user enters, a calculation is performed which rates each specific hazard with an Action Priority Status. The Action Priority Status can either be "A", "B", or "C", with "A" indicating a very high-risk hazard and "C" indicating a relatively low-risk hazard. After the user sees their current Action Priority Status, they can use the prompted recommendations to think of safeguards to prevent that hazard from happening. After inputting a safeguard and how well that safeguard protects the process, the Action Priority Status is re-calculated, taking the safeguard protection factor into account. The goal is to minimize the number of "A" Action Priority Statuses by implementing robust safeguards. Finally, the user can review their answers, safeguards, etc. and print all of their data as a PDF, which is the final and complete Process Hazard Analysis. The app cuts down on personnel and labor hours necessary to perform a sufficient Process Hazard Analysis by prompting the user with potential risk questions and relevant respective recommendations. Now instead of 10+ engineers working 40 hours to make it, my app requires only about 2 engineers working 8 hours. This will save the company significant money even after only a single use.
How I built it
I first began by compiling an extensive list of potential hazards inherent for different apparatus used in industrial chemical processes. For instance, "What if a valve leaks?", "What if a valve experiences corrosion internally?", "What if a valve experiences corrosion externally?", etc. The list has 398 records in it. However, if the user can think of any hazards that aren't already listed, they can add them. They can also remove questions which aren't applicable to their process. I also compiled a list of materials (chemicals) frequently used in industrial chemical processes and included their respective HMIS ratings for Health, Flammability, and Physical Hazards. Lastly, I compiled a list of recommendations to remedy certain hazards. For example, if the user indicates that "What if a valve leaks?" is an applicable risk to their process, the respective recommendation suggested to the user to minimize this risk would be "Consider implementing dike walls to the surrounding area, installing LEL sensors, selecting high-quality thick insulation, and performing regular preventative maintenance". The user can choose to copy this recommendation as their safeguard, or they can formulate their own. Next, I created an Activity to iterate every question for as many times as the user utilizes a particular apparatus. For example, if the user indicates that they have 3 compressors, then they will be prompted with each question about compressor risks 3 separate times. This is because different compressors may be handling/exposed to different chemicals, so the corresponding risks may be different for each individual compressors, even though they perform similar functions. Then I created a decision tree to interpret user input and use the data in a formula to calculate the respective Action Priority Status rating. I also used a skin to assign a red highlighted background to an "A" rating, a yellow highlighted background to a "B" rating, and a green highlighted background to a "C" rating. Subsequent input also factors into the equation, which allows the user to implement more robust protections to lower the Action Priority Status rating.
Challenges I ran into
The biggest challenge I ran into was that the declare expression associated with my decision tree caused an error when I tried to create a PDF with said data. Pega said that the heap size was exceeded. Specifically: "java.lang.OutOfMemoryError: GC overhead limit exceeded". To remedy this, I made a "Review" page after the page which referenced the decision tree which contained almost all of the same data (except for the decision tree), and used that section in the "create PDF" feature.
Accomplishments that I'm proud of
I'm really proud of what I could accomplish considering I worked alone and just started using Pega in April of this year (2020), and balanced schoolwork on top of this submission. I asked questions to some people at my company, and they all told me how ambitious it was.
What I learned
I learned SO MUCH about Pega in these 6 weeks. How to use a declare expression, a decision tree, how to import and export records, how to configure different views, how to trick the java into letting me use base-ten logarithms, how to make and use a skin, how to use embedded sections, how to create a PDF from existing data, how to create a guided tour, how to make activities, how to create a custom function and a library... and much more than I can't even remember. I was a total newbie before starting this app... so it's my baby. It's my blood, sweat, and tears.
What's next for Process Hazard Analysis
I could definitely make it a lot more user-friendly. It's pretty clunky. It still does the job, it's just not very visually pleasing. In the future, I'd like to include the Action Priority Status in the created PDF, and to make the PDF oriented to a landscape instead of portrait mode. To do this, I might instead try using a Word Document, but there wasn't time for that this time around.