Discussion
Pegasystems Inc.
US
Last activity: 23 May 2022 10:48 EDT
Ask the Expert – Pega Platform with Kensho Tsuchihashi
Join @KenshoTsuchihashi in this Ask the Expert session (May 9 – May 22) as he answers your questions on Pega Platform, pertaining to customization, infrastructure, and installation!
Be sure to Favorite and Follow for updates! This session will be open to questions from you on the 9th of May!
Meet your Expert:
Kensho Tsuchihashi is a Project Delivery Lead based in Tokyo, Japan. He joined Pega in 2009 and started his career as a Senior System Architect in the United States. In 2010, he was transferred to Japan to support Japanese business. He has worked for many key clients in all verticals since Pega Japan started, and he has led miscellaneous critical projects to success. His extensive career background includes customer facing project delivery as well as application development with Pega Platform.
Message from your Expert:
Hi there! I am not from a product management team nor specialized in a particular area, but thru many years of customer facing project experiences, I have designed and built many tailor-made applications with Pega Platform. It is always the best practice to leverage out-of-the-box functionality, but in the real world sometimes things are not that simple – you may be asked to go beyond by tough customers. It is also the beauty of Pega Platform that it allows developers to do a certain level of customization for something that product doesn’t provide. In this session, you can ask how to customize to accomplish customers’ requirements, infrastructure, or installation. . Or, I have already posted many tips in Discussion space and you can pick any topics from there to explore further.
-
Likes (4)
Kensho Tsuchihashi Yoke Wei Yip Guangri Liang Guangri Liang Kensho Tsuchihashi and 1 More -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
This session is now open for your questions!
Ask the Expert Rules
- Follow the Pega Collaboration Center's Guidelines
- This is not a Live Chat - @KenshoTsuchihashi will reply to your questions over the course of the 2-week session
- Questions should be clearly and succinctly expressed
- Questions should be of interest to many others in the audience
- Have fun!
-
Kensho Tsuchihashi Guangri Liang
IT Solution Service
SG
I would like to learn how to build SSO with OpenID Connect using Keycloak, but I am new to Keycloak and do not know how to configure it (realm, client, etc). Can you please briefly explain the overview or steps?
Thanks,
-
Kensho Tsuchihashi
Updated: 17 May 2022 13:35 EDT
Pegasystems Inc.
JP
I have created How-To document to set up Keycloak in a separate post. Please go through https://collaborate.pega.com/discussion/how-build-sso-oidc-openid-connect.
Thanks,
-
Kensho Tsuchihashi Marissa Rogers
Pegasystems Inc.
SG
We are currently configuring Authentication service with Keycloak(Open ID Connect ) for a client .
How do we add additional http request headers which are needed during authentication flow by the API gateway that stands between Pega and OIDC Provider .
This is required for methods like /userinfo, /token etc?
I tried checking preauthentication activity doesnt seem to get called for each interactions within the auth flow .
Kindly help on how this can be achieved.
-
Kensho Tsuchihashi
Pegasystems Inc.
JP
Thanks for the call earlier. Here is the summary of what was discussed. Unfortunately, Authentication Service rule does not have features to freely add custom fields in the HTTP request header like REST API. Also, if the information is required for every communication throughout authorization flow by customer's API Gateway, preauthentication activities or postauthentication activities cannot be used because these activities run only once before and after authentication. Here are the workarounds to consider:
- Place a load balancer or proxy server up front and configure it to add necessary information in the HTTP request header.
- Use parameters in Authentication Service instead of HTTP request header. This approach may require some modification for customer's API Gateway.
Thanks,
-
Kensho Tsuchihashi Praveen John Kumar
Updated: 18 May 2022 8:36 EDT
MSJ Software Solutions Ltd
CA
What happens if you import cases from lower environments. This could happen with frameworks like Pega KM as it is expected to be directly used instead of extending and the business wants to create content in the lower environment and move the cases directly to Production.
Does the pylastreservedid gets updated while importing cases?
Branched Information: Originally posted as reply here.
-
Kensho Tsuchihashi
Updated: 18 May 2022 12:27 EDT
Pegasystems Inc.
JP
I do not have KM with me, so I will explain at Pega Platform level in general. Let me outline the steps so we are on the same page. For the simplicity, let's assume we have set the default batch size to 1 as below, so the case ID increment is always one.
1. Let's say, we have two environments - Dev and Prod. One case is created in each environment. At this moment, pyLastReservedID is 1 in both environment.
2. Now, someone created 5 more cases only in Dev. The total number of cases is 6. Therefore, pyLastReservedID in Dev is incremented to 6.
3. Create a R-A-P in Dev and include these 5 cases (P-2 to P-6).
I do not have KM with me, so I will explain at Pega Platform level in general. Let me outline the steps so we are on the same page. For the simplicity, let's assume we have set the default batch size to 1 as below, so the case ID increment is always one.
1. Let's say, we have two environments - Dev and Prod. One case is created in each environment. At this moment, pyLastReservedID is 1 in both environment.
2. Now, someone created 5 more cases only in Dev. The total number of cases is 6. Therefore, pyLastReservedID in Dev is incremented to 6.
3. Create a R-A-P in Dev and include these 5 cases (P-2 to P-6).
4. Import this jar / zip file into Prod. This operation will insert five rows into Work table as below. Be noted, pyLastReservedID still remains 1. Remember, importing jar / zip file is just like inserting / updating rows only in the database, and does not invoke case creation activities.
5. You may wonder, what happens if you create a new case from UI in Prod. P-2 already sits in the database, so probably unique constraint violation exception is thrown? Let's test it.
6. No exception is thrown. A new case is successfully created and its pyID is P-2.
7. At this moment, pyLastReservedID is incremented to 2. P-2 case is overwritten by your operation and now initialized as if it's just created newly. See pxCreateDateTime is updated to the current date time and pyStatusWork is New.
If the next ID already exists in the database, although such situation shouldn't happen, PRPC overwrites the work object just like a new case, instead of throwing a unique constraint violation exception. Personally I have never felt the need to import work objects from non-production environment to production environment, but if that ever happens for any reason (i.e. framework), I would suggest that you manually update pyLastReservedID for data consistency.
Please let me know if you have further questions.
Thanks,
-
Kensho Tsuchihashi Ali Sabry Ashroff
MSJ Software Solutions Ltd
CA
@KenshoTsuchihashi Thanks for taking the time to explain.. Overriding cases isn't correct.
However, I have seen commit errors because a Unique ID exists.
I believe Pega should consider updating the counters in the import process (for both new and old mechanisms) so that the unique table (pc_data_uniqueid) will be untouched.
But anyhow thanks for your time.
-
Kensho Tsuchihashi
Pegasystems Inc.
JP
Which version of Pega Platform are you using? The specification I described in the diagram above is limited to the new mechanism (8.3~). If you are using the old machanism, you will get pyCommitError, as shown below.
- Behavior of old mechanism (~8.2)
1. Let's say currently you have only one work object in the database (P-1).
2. At this point, pyLastReservedID is also 1.
3. INSERT a dummy record with pzInsKey "MYCO-MYAPP-WORK P-2".
4. Try creating a new case from UI. Since P-2 already exists in the database, Pega throws a unique constraint violation exception.
PegaRULES log:
Which version of Pega Platform are you using? The specification I described in the diagram above is limited to the new mechanism (8.3~). If you are using the old machanism, you will get pyCommitError, as shown below.
- Behavior of old mechanism (~8.2)
1. Let's say currently you have only one work object in the database (P-1).
2. At this point, pyLastReservedID is also 1.
3. INSERT a dummy record with pzInsKey "MYCO-MYAPP-WORK P-2".
4. Try creating a new case from UI. Since P-2 already exists in the database, Pega throws a unique constraint violation exception.
PegaRULES log:
ERROR localhost| Proprietary information hidden kensho.tsuchihashi - Error in commit() com.pega.pegarules.pub.database.DuplicateKeyException: Database-Saver-Insertfail DatabaseException caused by prior exception: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "pc_myco_myapp_work_pk" 詳細: Key (pzinskey)=(MYCO-MYAPP-WORK P-2) already exists.
* Be noted, the same operation above works fine with the new mechanism from 8.3. System overwrites the existing work object without throwing any exception.
Thanks,
-
Kensho Tsuchihashi Aravindan Mohan
Pegasystems Inc.
US
As this session comes to a close, I want to take a moment to thank @KenshoTsuchihashi for being our expert this time!
Thank you to everyone that took the time to ask questions and participate in this session as well!
I hope you all enjoyed Ask the Expert - Pega Platform.
Stay tuned for our next session in June!