Global Counter

0

100 $ /year subscription
Buy now
Try it for free

About Global Counter

Global Counter is a powerful utility designed to manage persistent numeric values that need to exist beyond the lifespan of a single job or flow. Whether you need to track daily production totals, generate unique invoice numbers, or synchronize data between completely separate flows, this app provides a centralized solution.

Global Counter utilizes a centralized JSON database with advanced file-locking mechanisms. This ensures that your counters remain accurate and uncorrupted, even when multiple flows (or multiple Switch servers sharing a network drive) attempt to access or update them simultaneously.

Key Features

  • Multi-Counter Operations: Configure up to 5 distinct counters within a single flow element. Perform complex logic in one step (e.g., "Get JobID", "Increment DailyTotal", and "Check BatchLimit").

  • Flexible Actions: Choose to Get (retrieve to Private Data), Set (update database), or Get & Set simultaneously.

  • Advanced Math: Go beyond simple +1 counting.

    • Increment: Add, Multiply, or Power (exponent).

    • Decrement: Subtract, Divide, or Root.

    • Fixed: Force a specific static value.

  • Bounds & Limits: Restrict your counters to a specific range (Min/Max).

    • Clamp: Stick to the limit (e.g., a progress counter that never exceeds 100%).

    • Rollover: Automatically loop values (e.g., 1–10 then back to 1).

    • Error: Fail the job if a limit is reached (e.g., "Daily ticket quota exhausted").

  • Smart Reset Triggers: Automate your counting logic with powerful schedules:

    • Periodic - Calendar: Reset automatically at Midnight (Daily), Weekly, Monthly, Quarterly, or Yearly.

    • Periodic - Interval: Reset after a set duration (e.g., every 30 minutes).

    • Fixed Date: Reset at a specific timestamp.

  • Data Formatting: Automatically format retrieved values with customizable padding (e.g., turn 1 into 0001), prefixes, and suffixes.

  • Reliability:

    • Atomic Writes: Uses temporary files and safe rename operations to prevent partial data writes.

    • Corruption Recovery: Automatically detects JSON corruption and creates backups to keep production moving.

    • Network Tunable: Configurable retry policies (stale timeout, min/max wait) specifically designed for high-latency network storage.

Example Use Cases

  1. Daily Job Numbering: Create a counter that increments with every job and resets automatically at midnight. Use the formatting tools to output a value like 2023-10-25-0042 to Private Data.
  2. Load Balancing (Round Robin): Distribute jobs evenly across 3 downstream processes. Set a counter with a Max of 3, a Min of 1, and set the Limit to Rollover. The counter will cycle 1, 2, 3, 1, 2, 3... allowing you to route traffic based on the value.
  3. Batch Processing & Quotas: Track the number of files entering a flow. Use the Error limit to stop processing once a daily quota (e.g., 500 jobs) is reached, triggering an alert via the Error connection.
  4. Global Unique IDs: Generate unique serial numbers that are shared across multiple different flows running in parallel. Because the storage is external to the flow, Flow A and Flow B can both pull from the same "InvoiceID" counter without collision.

Technical Details

  • Storage: Stores data in a standard gc.json file. You can use the default Switch backing folder or specify a custom path (e.g., a network share) for multi-server access.

  • Output: Returns values as Private Data attached to the job (e.g., [CounterKey]-get or [CounterKey]-set).

  • Connections: Includes explicit "Success" and "Error" traffic light connections for robust error handling.

About Significans Automation

Significans Automation Inc. specializes in delivering next-generation automation to the Printing and Packaging industry. The company offers programming and expertise in custom workflow development, communication and project management, color management, prepress training, and end-to-end business integration. The company is driven by the conviction that customized automation is the only path forward.

Compatibility
Switch Version Required:25.11 or higher
Platform:Windows, Mac
Resources

App creator

Significans Automation
Support
+1-877-463-4465
Online support

App creator

Significans Automation
Support
+1-877-463-4465
Online support