9 Replies Latest reply on Jan 27, 2016 8:40 PM by Sasank Vemana

    Application-level PeopleCode?

    Danny Y.

      Hi, is there any mechanism for application-wide PeopleCode?

       

      Not global vars (which are variables accessible from any component) but rather logic that fires every time something happens?

       

      An example would be like Component Prebuild but instead of putting code in every component just put it in one place that fires everytime.

       

      Simple application of this would be an application level firewall or an extension of the security model.

       

      Thanks!

        • 1. Re: Application-level PeopleCode?
          Sasank Vemana

          Good question. There is no delivered way to universally fire PeopleCode (at least up to 8.54). I heard that in 8.55, there are ways to use related content to inject app classes at various events during the component processing. I have not tried it yet and even if that works I am not sure if it would help for application-wide PeopleCode injection.

           

          That said, you can inject javascript universally and from the javascript call an IScript which gives you access to PeopleCode.

          If you are on 8.54, then you can use the following page to inject javascript across the application.

          PeopleTools > Portal > Branding > Branding System Options

           

          If you are on pre 8.54, then you will need to customize one of the delivered javascript objects just as PT_PAGESCRIPT, etc. to include your custom javascript code.
          .

          I have done both universal javascript injection and universal IScript injection so I know those can be done. Hope this gives you some ideas.

          1 person found this helpful
          • 2. Re: Application-level PeopleCode?
            Sasank Vemana

            Just thought about another option. You could hack into the PT_BRANDING app package or the PTBR_BRANDING app package, find an appropriate method and inject your peoplecode there. These app packages get fired on every page and take care of the branding header. Thanks!

            • 3. Re: Application-level PeopleCode?
              Jim.Marion-Oracle

              Sasank, does PT_BRANDING fire on fluid pages? Does it fire at the component level (/psc/ URLs) or just /psp/ URLs?

              • 4. Re: Application-level PeopleCode?
                Sasank Vemana

                Jim - Good point. I completely forgot about Fluid. You are right,  PT_BRANDING/PTBR_BRANDING only works for PSP so that suggestion will not work for Fluid. I take back that comment!


                That said, for Fluid and 8.55 which uses Fluid navigation standards, we could just use PT_HEADERPAGE Page Activate PeopleCode to inject the custom peoplecode. I found that this header page is used universally on all fluid pages by default.

                 

                It is a hack but could work. Thoughts?

                 

                1 person found this helpful
                • 5. Re: Application-level PeopleCode?
                  Danny Y.

                  So both PT*BRANDING and PT_HEADERPAGE would be useful basically to control global routing or even messaging; i.e. system outage notifications (although I suppose the new Push Notification framework takes care of that). Preventing logins during maintenance for example, forcing a user to acknowledge a notification upon login (although perhaps sign-on PCode could do that), etc.


                  Interesting.


                  One really "way out there" idea is to create a little tool that can inject one or two lines of PeopleCode into every single Component Pre-Build (via PSPCMPROG and fiddling with the binary PeopleCode program). If I can't hook into the page generation globally maybe then next best thing is to make it easy to fake it. Such injection would be easily reversible and not flag the object as a customization.


                  At this point I'm just trying different things as PoC so it's just wacky ideas.


                  Thanks to both of you. BTW Jim your MAP book just arrived today.

                  • 6. Re: Application-level PeopleCode?
                    Sasank Vemana

                    I would be interested to hear what approach you end up taking. Tampering with the PSPCMPROG does seem a little extreme but if it works for your requirement then let us know!

                    • 7. Re: Application-level PeopleCode?
                      Jim.Marion-Oracle

                      For system-wide notifications I would use the new push framework. It uses WebSockets for real time notifications. This would be a combination of PeopleCode (to publish) and a JavaScript subscription.

                       

                      To prevent logins during outages, I would have a "maintenance" reverse proxy (that pretty much everyone runs in front of PeopleSoft) that displays a maintenance page.

                       

                      The login notification one is a little trickier, although I think a lot of people have handled this using the branding framework.

                      • 8. Re: Application-level PeopleCode?
                        stephane.365

                        application level firewall ? why don't you add that level on the Web server and filter components call ?

                        what do you want to control exactly ?

                        • 9. Re: Application-level PeopleCode?
                          Sasank Vemana

                          Jim - Good point. I completely forgot about Fluid. You are right,  PT_BRANDING/PTBR_BRANDING only works for PSP so that suggestion will not work for Fluid. I take back that comment!

                           

                          That said, for Fluid and 8.55 which uses Fluid navigation standards, we could just use PT_HEADERPAGE Page Activate PeopleCode to inject the custom peoplecode. I found that this header page is used universally on all fluid pages by default.

                           

                          It is a hack but could work. Thoughts?