Wednesday, December 01, 2021

Campus Solutions: Which Navigation Collection?

When Campus Solutions built their business process-based navigation, they did something interesting: they wrapped Navigation Collections in the Master/Detail Framework. Rather than hard-code a list of links (like the original HCM Personal Details), Campus Solutions chose Navigation Collections. The flexibility is incredible. This design decision allows you and I to add new links to Campus business processes without modifying delivered code (unlike the original HCM solution).

Personal Details Master/Detail component

That's fantastic! But here is the problem: which navigation collection should you update? Some of them are easy to find because they have the same label as the tile itself. But others don't. Fortunately, the navigation collection name is in the URL:

&scname=CS_SSR_ACADEMIC_RECORDS_FL

Wait... did I say the Navigation Collection name? I apologize. There seems to be some confusion about the "name." When creating a Navigation Collection, the Navigation Collection tool asks for a name. The "name" we supply is actually a label. PeopleSoft dynamically generates the name from our label. Since a Navigation Collection is a Portal Registry folder, the real "name" is the CREF Folder ID. So in the example listed above, the CREF ID is CS_SSR_ACADEMIC_RECORDS_FL, but we don't know the label. To maintain the Navigation Collection, we must know the Content Reference's label. The good news is we can find the label with a simple query. The SQL to find the label for the example above would be:

SELECT PORTAL_LABEL
  FROM PSPRSMDEFN
 WHERE PORTAL_PRNTOBJNAME = 'CO_NAVIGATION_COLLECTIONS'
   AND PORTAL_NAME = 'EMPLOYEE'
   AND PORTAL_OBJNAME = 'CS_SSR_ACADEMIC_RECORDS_FL'

Fluid is PeopleSoft's mobile and modern rendering engine. Through a few simple techniques, we can show you how to build better Fluid solutions faster. Are you interested in learning more? Check out our Fluid course offerings at jsmpros.com.

Tuesday, November 09, 2021

PeopleTools 8.59 new feature: Independent "AddTo" Security

Imagine having a PeopleSoft Favorites feature and no way to add Favorites. After 8.54, many customers found themselves in this situation. Fluid introduced "Add to Homepage" and "Add to Navbar" as fantastic personalization options. Our users love them. For example, I can "pin" my favorite classic components to my homepage for quick and easy access. For power users, this is terrific! And for self-service users? Every component a self-service user visits should already be represented through a Fluid homepage tile. For the casual self-service user, offering an "Add to Homepage" feature often causes more problems than it solves. With that in mind, customers often disable the "AddTo*" feature for self-service users. My friend Simon Chiu explains how in Section Four of his post PeopleTools 8.55 Features: How to Deploy Homepages, Tiles and Branding. From 8.54 to 8.58, disabling Add to Homepage also disables Add to Favorites, which is unfortunate. Favorites are the domain of the user. Nobody questions a user's favorites. Our friend Sasank Vemana shared a solution to "decouple" the AddTo options so we could disable these features independently. Likewise, My Oracle Support published Doc ID 2143709.1, showing how to customize the AddTo* features so customers can remove Add to Homepage while keeping Add to Favorites. Unfortunately, through 8.58, retaining Add to Favorites requires a customization.

What about PeopleTools 8.59? Oracle basically applied this customization to the base PeopleTools code. This feature is now built into PeopleTools. With PeopleTools 8.59, PeopleSoft added the following new roles:

  • DisableAddToFavorites
  • DisableAddToHomepage
  • DisableAddToNavBar

To remove access to Add to Homepage, assign the role DisableAddToHomepage.

Here are a couple of interesting observations of this new feature. First, access seems logically inverted. To remove access, you must assign a role. Normally, we assign roles to grant access. In this case, we assign a role to remove access. Second, we noticed user PS has these roles in the latest HCM PUM, which means out of the box, user PS can no longer add to favorites, homepages, or Navbar.

What are your observations of this new feature? Share your thoughts in the comments. We would love to hear!

Are you interested in learning more about PeopleSoft security or fluid? Check out our latest course offerings at https://www.jsmpros.com/courses/ and events at https://www.jsmpros.com/events/.

Thursday, October 28, 2021

Announcing PeopleSoft Configuration Day 2021!

Announcing PeopleSoft Configuration Day! Join me online Thursday, November 18th for a full day PeopleSoft education experience filled with tips and best practices. Space is limited so register now!

Register Now!

Here are some of the topics we will cover and questions we will answer:

Configuration versus Customization

  • Are Page and Field Configurator changes really configurations?
  • What about Event Mapping or Drop Zones?
  • Why does Oracle call these features "isolating customizations?"

PeopleSoft Test Framework

Without compare reports, how do you know what to test? Learn how to use PTF to regression test configurations.

Security

Can you use characters other than "X" and "*" to mask data? How would you mask without showing the length of a field? Learn how to combine roles with Page and Field Configurator and Event Mapping to conditionally apply Data Masking.

Fluid Approvals Page Composer

Learn how to use Page Composer to alter the approval user experience.

Can Functional Analysts Create Their Own Approvals?

Find out how through Fluid Forms and Approval Builder.

Extending Oracle-delivered page Content

Learn how to use Related Content and Drop Zones to add more content to Oracle-delivered pages. Find out where these features are similar and where they differ. Learn when to use which tool.

Fluid Job Data

HCM's new Fluid Job Data is incredibly flexible and configurable, including configurable search, Drop Zones, etc. But what about those Drop Zone group box labels (Drop Zone 1, Drop Zone 2, Drop Zone 3, etc.)? Can you change them? Can you hide them? Can you automatically expand them?

Activity Guides

What is an Activity Guide and how would you use one? How hard is it to create one? How do you pass contextual data between steps in an Activity Guide?

What's new in 8.59

There are several new configuration features included with 8.59. Join us to see these new features in action!


Register now to find the answers to these and many more questions on Thursday, November 18th.

The cost for this event is $447 per person. If you have a group of 10 or more, contact us at info@jsmpros.com for a quantity discount.

Register Now!

Wednesday, September 15, 2021

Configuring Fluid Job Data Drop Zones

The new Fluid Job Data component is incredibly configurable. I love the four new Drop Zones right in the middle of the page. But there is just one problem: they are labeled Drop Zone 1, Drop Zone 2, Drop Zone 3, and Drop Zone 4. And they are collapsed, so a user would have to expand each one to find out what is inside. Wouldn't it be great if we could use Page and Field Configurator to change the labels or hide unused regions? The Drop Zone labels come from Group Boxes, and today, Page and Field Configurator doesn't support Group Boxes. Since the code is trivial, we believe this is a simple oversite the development team could remedy. If you agree, please up-vote our idea Page and Field Configurator: Add Group Boxes fields list.

The good news is Event Mapping supports any record and field combination. If we can locate the record and field associated with any group box, we can use Event Mapping to hide it or change its label. This brings us to another challenge. At this time, none of the Drop Zone group boxes are associated with fields. We put in an idea for this: Make Drop zone 1-4 on Fluid Job Data Configurable through PFC and/or Event Mapping. If you think this is a good idea, please up-vote it as well.

While we wait for a proper Oracle-delivered configurable solutions, I want to share with you how we used Event Mapping, JavaScript, and CSS to solve this problem:

Thursday, September 09, 2021

The "Unable to get image extents" Error for SVGs

At JSMpros, we love Scalable Vector Graphics! Fluid loves them because they resize (scale) well. We love them because they are just XML documents describing an image. And since they are XML, we can recolor them with browser developer tools or even a simple text editor. In fact, We have videos showing how trivial it is to clone and alter the colors of Oracle-delivered Fluid icons through browser inspector tools (watch online Manipulating SVG Images).

Since we usually just change colors, we prefer to edit Oracle-delivered SVG images through Chrome's inspector and then copy the entire document to a new SVG file. We can then upload the new file through App Designer and use it anywhere. But we discovered an interesting issue. It appears PeopleSoft's internal code doesn't like our new images. When using the Navigation Collections image inspector or uploading a modified SVG through the online branding module, PeopleSoft throws an "Unable to get image extents" error message. What we didn't realize is that copying XML out of Chrome's inspector doesn't copy the XML prolog. All XML documents begin with an XML prolog

<?xml version="1.0" encoding="utf-8"?>

Since SVG is XML, it is required to have a prolog. Browsers are forgiving and will ignore the missing prolog, but PeopleSoft's internal code doesn't.

So what's the solution? We still edit SVG using Chrome's inspector tool, but now we manually insert the XML prolog as the first line. It appears we aren't the only ones to hit this issue. Check out MOS document 2426154.1 for more details.

Are you interested in learning more about PeopleSoft Fluid and Fluid development? Check out our latest live virtual and on-demand offerings.

Tuesday, August 24, 2021

PeopleSoft Fluid Accordion: Default to Open State

The Fluid Accordion is fantastic for organizing information. My favorite place to use it is in the left sidebar (Side Page 1, Master/Detail, and PSL_TWOPANEL). But it has one interesting quirk: it defaults to closed. Wouldn't it be nice to have PeopleSoft default one of the accordion headings to expanded? We haven't found a property or delivered approach, but we do have a workaround. Check out the 10-minute video below for details. Here is our solution in a nutshell:

  1. Add a custom style class to the accordion heading group box you want to be expanded (we named ours jsm_expanded). This CSS style class acts as an identifier or selector.
  2. Add JavaScript to locate the selector and invoke the click action of the chosen heading.

Here is what that JavaScript would look like:

document.querySelector('.jsm_expanded .ps-link').click();

You can use this JavaScript as-is with the AddOnloadScript PeopleCode function but as the video demonstrates, Master/Detail requires a slightly different approach.

I love the flexibility of Fluid. It is so much easier to inject JavaScript and CSS into Fluid. Are you interested in learning more? We cover the Accordion and related challenges and workarounds in our Fluid 2 course. Be sure to check out the details and register for our next offering.

Did enjoy this PeopleTools Sound Byte? There is more where that came from! Check us out on YouTube and be sure to subscribe for more content!

Thursday, July 15, 2021

Announcing Developer Day 2021!

Announcing PeopleSoft Developer Day! Join me online Thursday, August 19th for a full day PeopleTools experience filled with tips and best practices. Space is limited so register now!

Register Now!

Here are some of the topics we will cover and questions we will answer:

Configuration versus Customization

If you use Event Mapping, is that a customization or configuration? If you replace an AWE event handler, is that configuration or customization? Does it matter? Are there lifecycle consequences? How do you confirm a solution still works after applying maintenance?

PeopleSoft Test Framework

Another way to think of a configuration alternative to customization is as a runtime customization with no compare reports or lifecycle management tools. We will show you how to use PTF to regression test configurations.

PeopleCode Application Classes

Application Classes are the foundation for every modern framework including AWE, Integration Broker, and Event Mapping. We will cover the basics of Application Classes, and then use them to override Approval Framework behavior and to implement Event Mapping.

Event Mapping and Drop Zones

We will warm up with some simple Event Mapping and Drop Zone examples to describe them, and then show you some "what's possible" ideas in Fluid Job Data

Fluid

We'll cover Fluid layout techniques, specifically focussed on Drop Zones, and we'll also show how to create Dynamic Tiles, which also require Application Classes.

JavaScript

The PeopleSoft User experience is HTML, JavaScript, and CSS. We will show you some simple ways to combine JavaScript with Event Mapping to improve the user experience.

Integration

REST is the primary modern integration strategy, so we will cover a couple of simple REST examples, and then show how we can use REST with AWE to send text messages to requesters on final AWE approval.

Approval Workflow Engine (AWE)

We want to send notifications as text messages. To do so, we will have to extend AWE. How would you do this and is it a customization? Find out at Developer Day 2021!

Do you have a group of 10 or more? Contact us at info@jsmpros.com for a quantity discount!

Register Now!

Friday, June 18, 2021

PeopleSoft Week Conference

 

PeopleSoft Week Starts Monday, June 21. Have you registered yet? If not, go here now and register for this FREE conference and join us for one week of outstanding PeopleSoft-focused presentations! Here are some details:

When: June 21 - 25
Cost: FREE for Quest members, $49 otherwise
Who: Anyone involved with PeopleSoft
Where: Live online!

The entire schedule is available on Quest's website, but here are a few highlights. Monday, strategy day, kicks off the conference with product strategy sessions led by Paco (PeopleSoft VP), Amira (Financials), Robbin (HCM), and Dave (PeopleTools). This is a fantastic opportunity to hear from product strategy. Tuesday is packed with fantastic community presenters from ERPA, Appsian, Smart ERP, and JSMpros. I close Tuesday with my signature PeopleTools Tips and Techniques session from 3:30 to 4:30 ET. Wednesday and Thursday bring us many more presentations including customer voices such as Jack Henry, AdventHealth, and FSU. The agenda also includes Q&A and panel discussion sessions.


Be sure to register now because PeopleSoft Week starts Monday!

Monday, June 07, 2021

EIS 2021

Join us Thursday, June 10th for a full day of free fantastic live virtual PeopleSoft education sessions led by PeopleSoft community experts from around the world! Check out the agenda. Times are listed in Central Europe, Eastern, and Pacific.

Wednesday, June 02, 2021

App Classes or Function Libraries: Which is Better?

As programmers, we look for patterns. And when we find them, we refactor them into reusable code. Keep it DRY: Don't Repeat Yourself. PeopleCode offers two reusable code containers:

  • Function Libraries
  • Application Classes

And this brings us to the great debate. Which is better? Object-oriented App Classes or procedure-based Function Libraries? I often ask my students this question. And if they prefer one over the other, why? Let's review the benefits of each:

Function Library:

  • Stateless
  • Simple
  • Must be declared

Application Class:

  • Stateful
  • Dynamic execution

There are other differences, but they are irrelevant for this comparison. For example, Application Classes have inheritance (some would say inheritance is NOT a benefit). The value of inheritance is reuse, but then a function can call a function, which is also reuse.

When asking students about their preference, here are a few of my favorite answers:

  • Choose App Classes because they are new.
  • Choose App Classes because they are object-oriented.
  • Choose App Classes because we are supposed to.
  • Choose App Classes because everyone is doing it.
  • Choose Function Libraries because they work!

One of the most valuable features of App Classes is dynamic PeopleCode. Unlike Function Libraries, App Classes do not have to be imported/declared before use. This is how every PeopleTools framework works. As a developer, we create an App Class and register it with the framework. At runtime, the framework reads the metadata and invokes the App Class. A framework such as AWE, for example, knows nothing about my custom App Class. But it invokes my code nevertheless through functions such as CreateObject, ObjectDoMethod, ObjectGetProperty, and ObjectSetProperty.

Which one do I choose? Here are my decision criteria:

  • If I need dynamic PeopleCode, meaning no declaration, then the only solution is an App Class. Another way to think about it is if I'm writing code that invokes another code block and I don't know that code block at design time, but will fetch the name from the database, then I have to use an App Class.
  • If I'm writing code to plug into another framework, such as Event Mapping or Integration Broker, I will use an App Class.
  • If I want testable code to test through PSUnit, I will create an App Class (because PSUnit is a framework that will invoke dynamic code).
  • If I need to maintain state between method invocations, I'll choose an App Class.
  • Otherwise, I choose a Function Library.

Which do you prefer and why? What are other benefits of one over the other? Leave a comment to let us know what you think!

At JSMpros, we recognize the value of Application Classes and offer a two-day course dedicated to teaching object-oriented best practices. In fact, our next session starts on August 9, 2021. Register now!

Tuesday, May 25, 2021

Do You "Regression Test" Your Configurations?

Do you have customzations? Do customizations slow down selective adoption? The answer, of course, is "Yes" to both questions. Our best practice is to move customizations into configurations through Event Mapping, Page and Field Configurator, Drop Zones, etc. Configuration alternatives remove changes from lifecycle management, allowing us to alter the PeopleSoft experience without the impact and overhead of a customization... or do they? It is true; configuration alternatives don't show on compare reports. They move our "customizations" into a separate layer, a runtime injected layer, allowing Oracle to swap the backend code. Another way to think of it is that configuration alternatives automate applying customizations.

Let's review a quick scenario. Let's say there is a field on a page, and you are supposed to remove it. Simple task. The PeopleCode would be record.field.visible = False; If we customized, we would add that code to a design-time event, such as PostBuild. As a configuration, however, we would put that code in an App Class and then use Event Mapping to inject the code at runtime. So the value of configuration is that you don't have to reapply code changes. They are injected at runtime.

So here is a question:

When you re-apply a customization, is design-time code merge (copy/paste) the only thing you do?

Of course not! You also analyze. You investigate. Is the customization still necessary? Is it still relevant? Do you need to refactor around Oracle's changes? You still need to ask all of those questions. Even as a configuration, not a customization, you still must answer the same questions because it is the same code. It is the same solution. It solves the same problem. And, if you customized, you would have a compare report showing you what to review and where. Context. This is proactive. But with configuration? Silence. Without a compare report, how do you know what to review? How do you know what changed? Wait for testers to catch it? Wait for go-live? This is reactive.

Let's continue with the hidden field/Event Mapping example, and you go through a selective adoption or get current cycle. Since you used Event Mapping, your code is still there. But again, should you review it? How do you know what to review? What if Oracle agrees with our "hidden field" assessment and removes that field? Because we used Event Mapping, our code is still there, but it would refer to a field that is no longer in the component buffer, and will fail. What proactive lifecycle management tool is going to help you identify this issue? Without a compare report, how do you know what requires analysis? These are fantastic questions!

One way to locate conflicts is through regression tests. Each time I create a configuration (Drop Zone, Event Mapping, Page and Field Configurator, etc.), I record a test. That test proves my configuration still works. After each get current, I can run my regression test suite and see what fails. Test metadata will point to the change request, etc. so I know what to repair and where. I bet you are already doing regression testing. Everyone does. We usually call it "End User Testing." It might be a formal process but may not include change request documentation, etc. It is more like, "Hey, that thing that used to work is broken again." Alternatively, we recommend PeopleSoft Test Framework (PTF). The PTF metadata (comments, etc.) would contain the change request details. When the test fails, we can easily drill to the supporting documentation. This is proactive.

At this point, you might be saying, "We would LOVE to do that, but we haven't implemented PTF." But here is my question. Do you have to "implement" PTF to use it? Can't you, as a developer, just start recording regression tests against your configurations? That is what we recommend, and that is what we teach in our two-day PTF training course. You already have it. It's just waiting for you to start using it.

Our next PTF course starts in a couple of days, so be sure to register here ASAP! Or, purchase our On-demand PTF training course and get 60-days access to digitally mastered content to learn PTF whenever and wherever.

New to configuration? We regularly offer event mapping, drop zones, and Page and Field Configurator classes. Check out our website to see what we are offering next! Prefer On-demand? Take a look at our new On-demand Drop Zones course and learn on your own time.

Wednesday, March 24, 2021

Announcing PeopleSoft Fluid Day! A one-day Fluid Webinar

Announcing PeopleSoft Integration Day! Are you ready to learn Fluid? Or, do you already know Fluid, but want to learn more? Join us online Thursday, May 20, 2021 for a full day Fluid Development Experience! Space is limited so register now!

Register Now!

Here are some of the topics we will cover and questions we will answer:

Classic versus Fluid

Both Classic and Fluid use App Designer to create solutions. Both support drag and drop page design. So what are the differences? And if you know Classic, what do I need to learn to be proficient with Fluid?

Mobile

Isn't Fluid mobile? If so, why aren't my grids responsive? What mobile-friendly options exist for grids?

Drag and Drop

PeopleSoft homepages allow us to drag and drop tiles. AWE allows us to drag and drop fields. How can I implement Drag and Drop on my own Fluid pages?

Branding

What does it take to create a branding theme for a PeopleSoft instance? How do you brand both Classic and Fluid? Do I have to use Branding Macros with Fluid? Are there alternatives?

Drop Zones

Where can I use Drop Zones? What can I do with them? What if a component doesn't have Drop Zones? Are there limitations with Drop Zones? Since Drop Zones and Event Mapping don't appear in compare reports, how do we know what to review after a system update?

PeopleSoft Test Framework (PTF)

How do you implement PTF? Are there any challenges to using PTF with Fluid? Are there special considerations for PTF with Event Mapping and Drop Zones?

Do you have a group of 10 or more? Contact us at info@jsmpros.com for a quantity discount!

Register Now!

Wednesday, March 17, 2021

Where do you terminate SSL for PeopleSoft?

Most PeopleSoft implementations have some sort of firewall/load balancer appliance in front of PeopleSoft. As an administrator, one question we have to answer is, "Where do we terminate SSL?" And the answer seems so obvious, most don't even ponder the question. What is the obvious answer? Terminate at the load balancer. Why? Because that is why they exist. SSL/TLS is what they do, and they do it well. What's the alternative? Carry SSL all the way to Weblogic, and terminate at the PeopleSoft web server. Weblogic is amazing at what it does, but it isn't a security appliance. And that is why the obvious answer is to terminate at the load balancer. But here is my question:

Are you reencrypting the traffic between the load balancer and PeopleSoft?

Do you encrypt all the way to Weblogic or do you terminate at the load balancer, thereby passing sensitive information in plain text behind the firewall?

Over the last several years I have heard fantastic security presenters recommend SSL termination at the load balancer level (for good reason). But they always end encryption at the load balancer. They don't encrypt behind the firewall. Why not? The most common reason is performance. Encryption isn't free. And if encryption is expensive, why encrypt behind the firewall? Here are two reasons:

  1. Your network might not be as secure as you think it is. A great example is NASA's breach implemented through a Raspberry PI.
  2. PeopleSoft-delivered service operations expect encryption.
As a developer, I defer to the network infrastructure design team. If they say the network is secure, I take their word for it. But take a look at reason #2. There are several PeopleSoft-delivered service operations that verify encryption at the Weblogic level. If I want to use those delivered service operations, I either need to:
  • Carry SSL/TLS all the way to Weblogic or
  • Modify the Service Operation.
Which would you prefer?

Monday, March 01, 2021

PeopleSoft Open Source Projects

Open Source Initiative keyhole

Did you know there is a vibrant PeopleSoft Open Source community? PeopleSoft is the most flexible ERP solution available. If we need additional functionality, we can build it. And that is exactly what several talented developers have done, and they've shared their solutions with us. Check out some of these amazing open-source projects and repositories:

Please note, I have only tested a few of these projects, and make no claims about their state or function. My objective with this post is awareness.

Do you have a solution others could benefit from? Have you thought about sharing it as an Open Source project?

Do you have a project you would like added to the list? let us know in the comments!

Wednesday, February 24, 2021

Setting IB Request Content Type

In our Integration Day 2021 One-day Webinar, we showed how to send SMS from PeopleSoft through Twilio. What makes Twilio interesting is that Twilio expects URL encoded form data. As you may know from using Integration Broker, PeopleSoft is quite happy sending and receiving JSON or XML. But what about other content types, such as application/x-www-form-urlencoded? You may know that you can set most HTTP headers using something like:

&request.IBInfo.IBConnectorInfo.AddConnectorProperties("Content-Type", "application/x-www-form-urlencoded", %Header);

That's a mouth full! But the weirdest thing happens when trying that trick with URL encoded form data. PeopleSoft URL encodes the entire body! Wait, isn't that correct? No, actually. When you and I create the body, we create the proper key=value&key2=value2 pairs. Proper URL encoded form data would look something like this:

key=This+is+some+encoded+data&key2=value2

Keys, ampersands, and equals signs should not be encoded (unless part of the value). But PeopleSoft URL encodes everything as if there were no keys. Here is what that same string above looks like when PeopleSoft finishes with it:

key%3DThis%2Bis%2Bsome%2Bdata%2Bto%2Bencode%26key2%3Dvalue

It is just supposed to URL encode the values. Or better yet, just let us URL encode the values. What's the workaround?

&request.SegmentContentType = "application/x-www-form-urlencoded";

This solution is a little strange because we aren't using a multi-part, segmented message, but it works!

While performing research for this post, I came across MOS Doc ID 2187249.1, which asks for an enhancement to allow additional, hopefully even custom, Content Types, so it appears URL encoded form data isn't the only issue. But lucky for us, we have SegmentContentType as a workaround!

Are you interested in learning more about PeopleSoft Integration Broker and integration strategies? Join one of our live virtual top-rated Integration Tools Update courses!

Friday, February 05, 2021

PeopleCode to Move a File... sort of

You ever need to move a file through PeopleCode? Perhaps an App Engine program that needs to move generated content into the process output directory? I found myself in that position today. Surely there is a PeopleCode function for that... right? If you have one, please share it, because it seems the Internet doesn't know about it. A quick Internet search turned up several examples of using Exec with mv. I'm always weary of Exec. If I have to use the command line, I prefer to control it through the Java Runtime (see Exec Processes while Controlling stdin and stdout). Speaking of Java, can we borrow anything from the JRE? I did find my old ITToolbox response showing how to use java.io.File.renameTo to move files. It is still a great solution, but with multiple mounted file systems... well... it actually might fail. So I got to thinking... what about using java.nio? Here is an example:

Local JavaObject &jSource = CreateJavaObject("java.io.File", "c:\temp\JSM_TEST.log").toPath();
Local JavaObject &jTarget = CreateJavaObject("java.io.File", "c:\temp\JSM_TEST_moved.log").toPath();

Local JavaObject &jFiles = GetJavaClass("java.nio.file.Files");
Local JavaObject &jOptions = CreateJavaObject("java.nio.file.CopyOption[]");

&jFiles.move(&jSource, &jTarget, &jOptions);

And, what if you want to overrwrite the destination? Try it with copy options:

Local JavaObject &jSource = CreateJavaObject("java.io.File", "c:\temp\JSM_TEST.log").toPath();
Local JavaObject &jTarget = CreateJavaObject("java.io.File", "c:\temp\JSM_TEST_moved.log").toPath();

Local JavaObject &jFiles = GetJavaClass("java.nio.file.Files");
Local JavaObject &jStandardCopyOptions = GetJavaClass("java.nio.file.StandardCopyOption");
Local JavaObject &jOptions = CreateJavaObject("java.nio.file.CopyOption[]", &jStandardCopyOptions.REPLACE_EXISTING);

&jFiles.move(&jSource, &jTarget, &jamp;Options);

For more details about copy options, take a look at the Java Docs.

Are you ready to take your PeopleSoft development skills to the next level? Check out our latest course offerings at jsmpros.com. Prefer a custom agenda? Contact us for details.

Thursday, January 21, 2021

Integration Broker OnError Method

Do you know what happens when an Integration Broker handler App Class throws an Exception? REST, SOAP, or plain XML over HTTP all behave mostly the same. By default, PeopleSoft returns the error message to the client. This is great! It means you and I don't have to write error handlers, right? Actually, I hadn't given it much thought until working with REST. With REST, I want to leverage HTTP status codes. For example, if a REST client requests data that doesn't exist, I want to return a 404 status code. But if you throw an exception from an OnRequest REST handler, the default Integration Broker OnError handler returns a 200 (success) status code and an HTML content type. An exception should not return a 200. Fortunately, we can override the REST HTTP response code through the recently documented OnErrorHttpResponseCode and OnErrorContentType properties of the the Request Handler interface (see MOS document 2026747.1 for more details). You set these properties from a handler's OnError method, which is the method Integration Broker invokes when the handler method throws an exception. So here is a snippet from our Integration Tools Update course:

method OnRequest
   ...
   SQLExec(...);
   
   If (%SqlRows = 0) Then
      throw CreateException(0, 0, "Item not found");
   End-If;
   
   ...
end-method;

method OnError
   /+ &request as Message +/
   /+ Returns String +/
   /+ Extends/implements PS_PT:Integration:IRequestHandler.OnError +/
   
   REM Create fault response;
   ...
   
   %This.OnErrorHttpResponseCode = 404;
   %This.OnErrorContentType = "application/json";
   
   Return "<response string goes here>";
end-method;

Notice the code throws an exception when no rows are found. When OnRequest throws an exception, Integration Broker invokes the OnError method, and the OnError method returns a hard-coded 404. So, let's think about this a little more... as you see, the OnError handler ALWAYS returns 404. What if something else goes wrong? Shouldn't I see another status code? Great question! That's a topic we'll save for another post. But let's address a different issue. What happens if your OnError handler throws an exception? PeopleSoft drops the OnError handler and returns the response it would have returned without an OnError handler, meaning a status code of 200 with HTML content type. It's sort of like PeopleSoft invoked your OnError method, which threw an exception and PeopleSoft said, "Oh, just kidding," and reverted to its default behavior.

Now, let's say you are testing your OnError handler, but it seems like Integration Broker is ignoring you. I mean, no matter what status code you set in your OnError method, PeopleSoft returns a 200. First, if this is happening to you, chances are high, your OnError method is throwing an exception. But how can you troubleshoot this? Here is my debugging strategy: Open a file object and print lines. For each line in the OnError handler, I print a line to my log file. I can then open the log file and see when PeopleSoft stopped printing to my log (I'm basically tracing my own code).

OK. Now, let's say you have all of the bugs worked out of your OnError handler, and you are ready to move to production. How can you ensure PeopleSoft will return a 400-level status code if the OnError handler throws a runtime exception? Wrap your code with a try block to catch errors. You then retain control over the HTTP response code and content type.

Are you interested in learning more about Integration Strategies? We believe Integration is one of the most important PeopleTools technologies for today's distributed enterprise. Visit ibupdate.jsmpros.com to see when we are offering our next Integration Course. Have a group of developers to train? Contact us for special group pricing!

Tuesday, January 12, 2021

Is PeopleSoft Fluid Mobile-ready? Grids

Vertical scrolling on mobile is perfectly acceptable. But horizontal scrolling is an absolute no-no! So if Fluid is mobile, why is my Fluid grid so wide? Why doesn't it reflow into a vertical rendering? Great question! A Flex Grid is the Fluid version of the plain-old Classic Grid. The only difference is the Flex Grid stretches to fill its container, whereas a Classic Grid's width is fixed. The Flex Grid is likely the most common Grid type for desktop, but it doesn't fit well on smaller form factors, as you may have experienced. So what can we do? The most common solution is to use PeopleCode to change the grid type. In the post Is PeopleSoft Fluid Mobile-ready? Setting the Browser Viewport, we said that Fluid + PeopleCode = Mobile, which holds true for grids. We can use PeopleCode to transform a Flex Grid into a mobile-friendly type, such as a List Grid, Div Grid, or Data Grid. Here is an example:

If %Request.BrowserDeviceFormFactor = %FormFactor_Small Then
   /* change to LIST grid */
   &grid.Layout = %ListGrid;
End-If;

PeopleCode alternatives include:

  • Stacked Grid Group Boxes,
  • Stacked Grid Group Boxes with Suppress-on attributes, and
  • Custom CSS with breakpoints

With this in mind, let's extend our Fluid development formula to: Fluid + PeopleCode + Style Classes + Attributes = Mobile.

We cover grids in great detail in our Fluid 2 course, including Flex, List, Div, and Data grid types, and how to transform grids using PeopleCode and CSS. Checkout fluid.jsmpros.com to see when we are offering it next. Do you have a group of developers to train? Contact us for special group pricing!

Monday, January 04, 2021

Announcing PeopleSoft Integration Day! February 11, 2021

Announcing PeopleSoft Integration Day! Join me online Thursday, February 11, 2021 for a full day integration experience! Space is limited so register now!

Register Now!

Whether integrating with "The Cloud," Twilio, or Chatbots, odds are high you will use REST and JSON. With that in mind, we are excited to devote an entire day to sharing REST and SOAP integration strategies. Join us February 11, 2021 to learn about:

  • REpresentational State Transfer (REST)
  • JavaScript Object Notation (JSON)
  • The Documents Module
  • Producing and Consuming REST
  • Testing tools, such as SoapUI
  • Security, such as bearer tokens (JWT) and other authorization schemes
  • Producing, consuming, and securing SOAP services

Who should attend this webinar?

  • PeopleSoft Developers
  • Project Managers
  • Team Leads

The cost is $250 per person, which is nearly 70% off our standard daily rate. We are recording the event and are offering 60-days access to registered attendees. This is going to be so much fun! Bring your questions. We'll have time for Q&A. The Q&A panel will be available and monitored all day.

Do you have a group of 10 or more? Contact us at info@jsmpros.com for a quantity discount!

Register Now!

Friday, January 01, 2021

Top Five PeopleTools Technologies to Learn in 2021

Today is the first day of 2021! Have you set training goals? To finish 2020, we sorted courses by enrollment. Based on training interest and enrollment, here were the top five requested courses from 2020:

1. Fluid

It is no surprise that Fluid tops the list of training initiatives. Here are some reasons why

  • Strategy: Fluid is PeopleSoft's strategic direction. All new PeopleSoft development happens in Fluid.
  • Modern and mobile: Unlike Classic, Fluid is awesome on a mobile device.
  • Support: Some Classic components have retired, replaced by their Fluid functional equivalent.

2. Integration Technologies such as REST and JSON

What do Chatbots, Texting (Twilio), Elastic Search, Multi-factor authentication, and Cloud have in common? They are all services outside PeopleSoft that require REST integration. So, just like Fluid, seeing integration at the top of the priority list is no surprise.

3. Application Classes

We've had object-oriented PeopleCode for decades, but without much adoption. I believe today's interest in Application Classes is based on PeopleTools frameworks. Here are a few of the PeopleSoft features that require Application Classes:

  • Integration Broker
  • Approval Workflow Engine
  • Event Mapping
  • Campus Solutions COMMGEN

Add to that nearly every new Fluid page using an Application Class as its PeopleCode container, and we can see why Application Classes are in the top five!

4. PeopleSoft Test Framework (PTF)

One of the primary benefits of Cloud is that Cloud solutions are always current. With Selective Adoption, your on-premise PeopleSoft has the same potential, but only if you can stay current. And end-user testing is a clear barrier to staying current. The more we can automate, the faster we can apply maintenance. There seems to be a direct relationship between currency and automation.

But with that said, I have one reason I think everyone should implement automated testing, and that is Configuration. Event Mapping, Page and Field Configurator, and Drop Zones are fantastic ways to transform customizations into configurations. But here's my problem with configurations: no compare reports. Every customization offers a compare report showing changes. Configurations don't. In fact, that is the point of a configuration. Our whole reason for configuring is to move changes into a layer above Oracle's delivered code. But configuration doesn't eliminate review. For example, configurations may reference fields that no longer exist, and will therefore fail at runtime. This is one of the challenges with configurations: no formal review process. This is a gap that I believe PTF can fill. I believe we should pair every configuration with a PTF test (or several tests). After each maintenance cycle, we can run our battery of tests to prove our configurations are still valid. Test failures immediately show us which configurations require review. Here's a short video showing an example:





5. Configuration

With selective adoption, continuous delivery, cloud pressure, support policies, and a steady stream of amazing new features, it is more important than ever that we stay current. And customizations are the enemy of currency. We can therefore, reduce the cost of getting current by replacing customizations with configurations. Page and Field Configurator, Drop Zones, and Event Mapping are some of the most important recent PeopleTools and Enterprise Components additions. Keep an eye on our online learning portal. We'll be releasing several configuration modules as on-demand recorded training.

6. Learn Something Outside PeopleTools

This is supposed to be a top-five list, but I couldn't stop. And I don't want you to stop either. Don't stop with PeopleTools. Learn something outside the traditional PeopleTools stack. If I could recommend one language to learn, it would be JavaScript. JavaScript is not a traditional PeopleTools technology, but it is the primary language of the PeopleSoft user interface. It is also the primary language of every website and the core of many Oracle PaaS frameworks.

At JSMpros, we teach all of these technologies regularly. Check out our website for our latest course offerings. Do you have a group of developers to train? Contact us for discounted group rates!