1. Real-Time & Synchronous Services
-
Retry Mechanism: Retry is not recommended for synchronous or real-time services. If required, ensure it aligns with the calling system's timeout and SLA requirements.
-
Wait Activities: Wait activities are not recommended in synchronous integrations, as they can unnecessarily increase response times and impact the overall user experience.
-
Reply Activity & Global Fault Handling: Add Reply activities in both the Main Flow and Global Fault Handler, and remove the Rethrow activity from the Global Fault Handler as per Pen Test guidelines.
-
Large-Volume Processing: Processing large volumes of data within loops presents scalability risks. The integration may fail or experience performance degradation. Consider optimizing the design to handle bulk data efficiently.
-
OIC Runtime Limits: Respect OIC runtime limits and avoid integrations running longer than one hour. For long-running or high-volume processing, consider asynchronous patterns, batching, or chunking to improve reliability and scalability.
-
Centralized Datadog Logging: For synchronous integrations (ABC), Datadog logging should be implemented only in Service A. Child services should return error details to the parent service for centralized monitoring and incident creation, avoiding duplicate alerts.
2. Batch Services
-
Scheduler Integration: The scheduler integration should not contain any business logic. Its responsibility should be limited to triggering the process. Move all business processing, validations, transformations, and downstream calls to the Main integration or appropriate child services.
-
Integration Naming Convention: Integration naming conventions are not being followed. Use the standard hierarchy: SCH → Main → Child. Ensure names clearly reflect the business context.
-
Empty File / No File Handling: For empty file or no-file scenarios, consider throwing a custom fault and generating a Warning or Error alert in Datadog based on business requirements and interface criticality.
3. General Code Review Points
-
Avoid Hardcoding: Avoid hardcoding configuration values. Maintain retry settings, endpoint configurations, and other business parameters in Lookups, Configuration Tables, or OCI Vault for easier maintenance and flexibility.
-
Integration Description: The integration description is missing. Provide a meaningful description explaining the integration's purpose and functionality.
-
Connection and Lookup Descriptions: Connection and Lookup descriptions are missing. Add meaningful descriptions to improve maintainability and understanding.
-
Runtime Error Details: Capture and return actual runtime error details instead of using hardcoded or lookup-based error messages. Avoid generic names such as Stitch2, FOREach1, etc., in error descriptions.
-
Activity Naming Standards: Activity names are not following the naming standards in the OIC integration. Use meaningful and standardized names for all activities.
-
Retry for Asynchronous Integrations: Consider implementing retry mechanisms for API calls to edge systems in asynchronous or one-way integrations to handle transient failures and intermittent connectivity issues.
-
Centralized Datadog Logging: Multiple Datadog calls were identified. Datadog logging should not be invoked from the Main Flow. Instead, throw the fault to the Global Fault Handler and perform the Datadog call there. Datadog should be called only once from the Global Fault Handler.
-
Business Tracking Parameters: Tracking parameters are missing. Configure meaningful business tracking fields to improve transaction traceability, monitoring, and troubleshooting across the integration lifecycle.
-
Separate Retry Blocks: Multiple invoke activities are configured under one retry block. Each invoke activity should be configured with a separate retry block instead of sharing a common retry mechanism.
-
Code Modularization: Code readability needs improvement. Split complex logic into multiple child integrations for better maintainability and easier review. Consider:
- Breaking complex logic into smaller, reusable child integrations.
- Calling a child integration for each file from the For Each activity.
- Creating separate child services for standard error handling, data logging, and utility calls.
- Using Parent-Child integration patterns wherever appropriate.
-
Remove Unused Components: Remove unused variables and activities to improve readability and maintainability.
-
Meaningful Integration Names: Integration names should be meaningful and clearly indicate the source, target, or business context.
-
Datadog Field Mapping: Ensure all required fields are mapped and sent in the Datadog format.
-
Date Format Validation: VarDateFormat is generally expected to be in HKT (Hong Kong Time). However, it does not appear to be in HKT currently. Verify the date format and timezone.
-
Avoid Unnecessary Activities and Deep Nesting: Avoid Scope and Catch activities when there is no specific requirement for fault handling. Avoid deep nesting of Scope, Switch, For-Each, and While activities. Simplify the design to improve readability and maintenance.
-
Avoid Loop-Invoke Anti-Patterns: Avoid unnecessary invoke calls inside loops. Consider moving invoke calls outside the loop wherever possible, or process records in batches/chunks to improve performance, scalability, and maintainability.
-
Secure Credential Management: Use OCI Vault for storing secrets such as keys and credentials.
-
Standardized Directory and Stage Names: Use meaningful and standardized names for directories, stages, and other artifacts. Avoid generic names such as
mystageortempfolder. Instead, use descriptive names such as/stage/zip,/stage/unzip, or/stage/archive. -
Mandatory Input Validation: Validate mandatory input fields at the beginning of the integration and fail fast if required data is missing.
-
Lookup-Driven Routing: Use lookup-driven routing instead of hardcoded IF/Switch conditions wherever feasible.
-
Optimize Child Integration Payloads: Avoid unnecessarily large payloads between child integrations. Pass only the required data elements.
-
Reusable Common Services: Use Child Integrations/Common Services for reusable functionality such as Datadog logging, email notifications, audit logging, and utility functions.
Objective: Ensure OIC integrations follow standard design principles, improve performance and scalability, maintain consistency, simplify troubleshooting, and support long-term maintainability.

No comments:
Post a Comment