launchpad-custom-function
Custom Function
Custom Function is a type Function that enables the user to extend the capability of LaunchPad with code written in High Level Languages (HLL) like Java. This feature is typically reserved for functionality that cannot be implemented in another rule type, i.e. Automation. To use this feature you upload the HLL artifacts, i.e. Jar or Python file, and reference the method you want to invoke when the Custom Function is called. The signature of Custom Function MUST match that of the HLL method so that the Custom Function can invoke it.
Like Functions Custom Function are sideeffect free and should not assume any shared state between requests. They perform the task or computation required the same way each time they are invoked.
Supported Languages:
How to create
- Write your code in a supported High Level Language (HLL)
- Create JAR (Java) or ZIP (Python, Node.js) of code, as known as Code Bundle
- Create a Function Rule
- Be sure to specify Function uses a Code Bundle
- Upload Code Bundle
- Define Custom Function's inputs parameters and output
- MUST signature of method defined in Code Bundle
Inputs
Inputs are also known as arguments to a Function. The input type MUST be compatible with the LaunchPad type otherwise user may have issues accessing the data associated with the input.
Gotchas
- Timezone Awareness: Date Functions use GMT by default; use
TodayWithTimeZonefor specific timezones - Custom Function Limits: AWS Lambda execution limits apply to custom Functions
- Arguments defined in HLL method MUST be defined in the same order as the Custom Function
- Return type of HLL method MUST be compatible with the return type of the Custom Function
- Using objects as input requires special handling for LaunchPad Field
Best Practices
- Use built-in Functions before creating custom function
- Test Custom Function with various input values
- Document custom Functions thoroughly
Example
- Parsing an Excel file that you uploaded and extract the results into a user defined data structure.
- Advanced date manipulations
- Complex mathematical calculations
- Integration with external libraries
- Specialized data transformations
More from pegasystems/pega-launchpad-agent-skills
launchpad-dx-apis
Explains how to use the Create Case DX API, including scalar content payloads, reference fields, allowed fields, and when to use this pattern.
24launchpad-webembed
Explains how to embed Launchpad applications into external websites and custom front-end apps using the pega-embed web component. Covers CORS policy setup, OAuth authentication (Client Credentials and PKCE), embed attributes, theming, events, and complete code examples for React/Next.js integration.
17launchpad-ux-custom-frontend
Guide for building custom React front-ends on Pega Launchpad using the Pega React SDK (@pega/react-sdk-components). Use this skill whenever users ask about building complete custom front-ends over a Launchpad application. Do not use this skill for questions about DX API methods unless they specifically relate to building a custom front-end. Do not use this skill for questions about custom UX components or the pega-embed web component.
13launchpad-ux-custom-components
Introduces Custom UX in Pega Launchpad / Constellation, when to build custom components, and what design information is needed.
10