The MSPro Boomi Collection
About
Good Practices & Patterns
Good Practices & Patterns
  • Markus' Boomi Integration
  • Implementation Patterns
    • The Cache Challenge
      • The Get-Or-Create Use-Case
      • PropCache Scripts
    • State Management
      • Example Scenario
      • State-Management in general
      • State-Management Functionality
      • Technical Solutions
        • Boomi File-System Implementation
          • saveState
          • readState & fetchStates
    • Exception Handling
      • Exception vs Error
      • Basic Rules
        • Aggregating Exceptions
      • Exception Handling Pattern
        • User-Defined Exception Messages
        • Catch Exceptions
      • The pattern in practice
        • API Error Handling
          • Single Record Strategy
            • Single Record RES
          • Many Records Strategy (Array)
            • Many Records RES
        • Pre-Condition Check
    • SQL Patterns
      • Script Header
      • General Rules
        • Check using RowCount
        • Check if record exists
        • Pagination and Sorting
        • Parameter - Best Practices
        • Use JSON as a complex parameter
    • Process Patterns
      • Process Route Implementation Pattern
      • Sub-Process or Process Route
    • DateTime
      • The Boomi datetime dilemma
      • Database and Flow
      • Groovy
      • Data Hub
      • Get Current Date
    • Groovy Script Patterns
      • Dynamic Document Properties
      • Dynamic Process Properties
      • Documents
    • Array Elements to Documents
  • MSPro Services
    • Intermediate Storage
      • Example Processes
        • Docs 01 - Update and Create
          • sub.SampleData.Invoice
        • 02 - Upsert and Get
    • Render Templates
  • Tips
Powered by GitBook
On this page
  1. Implementation Patterns
  2. SQL Patterns

Script Header

  • Do start scripts with a header.

The header contains general information about the script’s functionality. It describes the input parameters and the expected results. Simply follow documentation guidelines as they exist for any programming language, like Java, C#, Python, Dart, …

In addition, and very important, the header contains a change history with the abbreviation of the editor and the date when the change was introduced.

  • Do skeep this header up to date, especially when you modify a script from someone else.

-- ==============================================
-- Get AccountType by UserID
-- ----------------------------------------------
-- Description bla, bla
--
-- Input:
--   1: @UserID        - An ADUserID with or without the domain '@xxx.com'
--
-- Returns:
--    The user's account typeas a string: "Personal" | "Corporate"
-- ----------------------------------------------------------------------
-- 2022-05-24   msc -   Fixed return value typo
-- 2022-05-20   msc -   Created
-- ======================================================================