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
  • Boomi Solution
  • States
  1. Implementation Patterns
  2. State Management
  3. Technical Solutions

Boomi File-System Implementation

Simple File-System state-management with Boomi

Last updated 6 months ago

To start with the considerations we need a directory in which we store the state files. It is even better to have several (sub) directories to manage different states.

I recommend to use a shared directory to store states. However, for testing "no directory" is good enough ("No directory" with Disk v2 connector means: relative to Boomi Atom Directory).

A file-name represents to id of a state.

Boomi Solution

We use the Disk v2 connector and we keep all state-management processes (incl. required components) in the StateManager folder. There will be two independent subProcesses, called though a Route: subPr.saveState and subPr.readState:

States

A State is represented by j.State profile (see State-Management in general) and states are serialized and stored in files.

{
  "id" : "character",
  "key" : "character",
  "context" : "character",
  "userId" : "character",
  "userState" : "number"	/* # */,
  "userInfo" : "character",
  "payloadType" : "character",
  "payload" : "character"
}

Boomi Repository