Logo
  • Products
    • SecOps Studio
  • Solutions
    • Pega Stack Shifter
  • Services
    • Pega Enablement
    • Pega Modernization
  • About
  • Contact
  • Blog
Code Vault

Service File Processing – tutorial

December 10, 2024 Code Vault Curators

This article is all about working out a tutorial on service file rules in Pega.

It is a mandatory pre-requisite to go through my previous article on Service file configurations before continuing here.

Service File Configurations in Pega

I have already explained the business requirements in my previous article.

Business Requirement: External system sends us the input file with a list of customer details. For each record in the file, you need to create a new Sales case with the details provided.

Below is the input file we get from the external system.

Let’s straight away start the tutorial

Step 1: Create a new service file rule.

I have already created it in my previous post. I am going to use it

Step 2: Configure the service file rule

Service tab

Since I am going to create the sales case from the details provided in the file, my primary page will be OMXG07-FirstApp-Work-Sales

Method tab

Same configuration as we saw in the previous post.

Processing method – by record type

Record terminator – rn

Offset – 0

Length – 2

Data mode – text only

Character encoding – Default

Request tab

Same configuration as we saw in the previous article.

For the record type 10 & 99, use Skip as Map to

Map to key – MapCustomerData.Customer is the namespace for the parse delimited we created before

Below is the configuration for parse delimited rule.

I need to specify the activity in the Parse segments row. For this, I am going to create a new processing activity

Step 3: Create a new Service activity rule for processing the data

I am creating the activity in the primary page class

A simple activity with one step.

I am using the OOTB activity svcAddWorkObject, which accepts the pyStartCase, the starter flow for the sales case as the parameter. This activity can create a new case

Why svcAddWorkObject?

There are many OOTB activities to create cases in pega. Mostly all the case creation activities use the two main reusable activities createWorkPage and addWork.

The speciality of this activity is that it passes the current step page as MergePage parameter to Call createWorkPage activity.

It means the primary page in the service file rule – MyServicePage will be the current step page and it will be passed in as mergepage parameter. Remember, after parsing MyServicePage will hold the values of customername, age and sex.

Finally, in the createWorkPage activity, the MergePage content will get merged with the pyWorkPage. This is how the data from the file is passed to the case.

Note: This is not the only way to pass the data to pyWorkpage

Save the activity rule.

Step 4: Specify the activity rule in the parse segments array

Save the rule

Step 5: Prepare and run the service file rule.

Prepare a CSV file with the right test data.

Run the service file rule manually using the actions button and supply the file.

If you need, you can trace the service-file rule.

Click execute.

You should get a success message.

Step 6: Verify the run

You can always verify the case details from the designer studio.

App Explorer -> Click on the class to view the instances.

You can see 3 sales got created in the same minute!!

By the way, my current time is not 4.01 PM. It is +6 hours ahead.

One more verification: let’s see if the customer details are rightly populated in the case.

Click and open the case S-38, the last created case.

Customer name is Sandosh and age is 26. Cool.

Parse rules – map the data from external system to pega;

service-file rule –   process the data.

Finally the missing piece file listener – listen the file and invoke processing via service file.

We will see about file listener in the next article

File listener Usage and Configurations in Pega
  • file-processing
  • pega-integration
Code Vault Curators

A technical team dedicated to empowering the Pega ecosystem with in-depth knowledge, guided by Premkumar Ganesan's vision.

Post navigation

Previous
Next

Pega Courses

Pega courses can be accessed at https://myknowacademy.com

Search through the blog

Tags

activity authentication background-processing case-management data-model declarative-processing email-processing file-processing pega-core-concepts pega-integration process reporting security system-administration user-interface validation

Categories

  • Code Vault

Recent posts

  • Service REST – Usage and Configurations in Pega
  • Queue processor – Usage and Configurations
  • Data Pages Usage & Configurations in Pega
  • Requestor types in Pega
  • Case Locking Mechanism in Pega

Related Articles

Code Vault

Service REST – Usage and Configurations in Pega

December 18, 2024 Code Vault Curators

First of all, don’t think INTEGRATION is a difficult topic in PEGA. I would say Integration is much easier than creating an activity rule. Pega makes it simple for developers. All you need to do is configure the Integration rules. Pega takes care of the rest. Pega provides useful wizards and guides the developers in […]

Code Vault

Service SOAP – Usage and Configurations in Pega

December 10, 2024 Code Vault Curators

In this blog article, we will see how a Pega application can host a SOAP web service. I request you to go through another blog article on Service-REST where I already talked about services in general – Update: The Concept of SOAP services remains the same across different Pega versions. The screenshots in this blog […]

Code Vault

Connect SOAP – Usage and Configurations in Pega

December 10, 2024 Code Vault Curators

In this blog article, we will try to understand about Connect-SOAP in Pega. Update: The concept of SOAP Connector remains the same across different Pega versions. Most of the screenshots in this blog article were reused from Pega 7 version and few were updated. Use this blog article to learn the concepts and you can […]

Code Vault

Connect REST – Usage and Configurations in Pega

December 10, 2024 Code Vault Curators

In this blog article, we will try to understand about Connect-REST in Pega. Connect-REST is One of the most commonly used Connectors in Pega to integrate with external systems. Update: The concept of REST Connector remains the same across different Pega versions. Most of the screenshots in this blog article were reused from Pega 7 […]

About

MyKnowTech was born with a mission to bridge the gap between technical expertise and business needs. We are a boutique firm specializing in Pega solutions, delivering them with a personal touch. At the heart of our philosophy is a commitment to putting clients first.

Company
  • About
  • Leadership
  • Career
  • Contact
Resources
  • Blog
  • Services
  • Solutions
  • Insights

©  MyKnowTech B.V. All Rights Reserved.

  • Sitemap
  • Terms & Conditions
  • Privacy Policy