Skip to content
suyogs1Public

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FlowASM

Unified n8n-style Mainframe Workflow Platform

FlowASM combines IPLLab (assembly engine), ZeroFrame (3270 automation), TK5/Hercules, and z/OS into a single visual workflow platform with drag-and-drop capabilities.

✨ Features

  • 🎨 Visual Workflow Builder - n8n-style drag-and-drop interface
  • πŸ”§ Sandboxed ASM Engine - Built-in IPLLab engine for deterministic demos
  • πŸ”Œ Multiple Connectors - TK5, z/OS, 3270 terminal automation
  • πŸ“Š Live Execution - Watch workflows run with real-time logs
  • πŸ’Ύ Import/Export - Save and share workflows as JSON
  • πŸ”„ Template Variables - Pass data between nodes
  • πŸš€ Node.js Only - No Python, pure npm

πŸš€ Quick Start

cd FlowASM
npm install
npm start

Open http://localhost:3000 and start building workflows!

Or run the CLI demo:

npm run demo

πŸ“– What is FlowASM?

FlowASM is a visual workflow platform that chains mainframe operations:

Assemble Code β†’ Execute β†’ Submit JCL β†’ Verify 3270 β†’ Output

Key Capabilities

  1. Sandboxed Execution - Run assembly code locally without external dependencies
  2. TK5 Integration - Connect to TK5/Hercules emulator for real mainframe ops
  3. z/OS Integration - Submit jobs to real z/OS systems (secure credentials)
  4. 3270 Automation - Automate terminal interactions
  5. Visual Builder - Create workflows with drag-and-drop UI

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              FlowASM Core Engine                β”‚
β”‚         (n8n-style orchestrator)                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚             β”‚          β”‚          β”‚
β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”   β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β” β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β” β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”
β”‚  ASM   β”‚   β”‚  TK5   β”‚ β”‚  z/OS  β”‚ β”‚3270/ZF β”‚
β”‚Sandbox β”‚   β”‚Connectorβ”‚ β”‚Connectorβ”‚ β”‚Connectorβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“ Project Structure

FlowASM/
β”œβ”€β”€ core/
β”‚   β”œβ”€β”€ runner.js          ← Workflow orchestrator
β”‚   β”œβ”€β”€ flow-engine.js     ← Execution engine
β”‚   └── api.js             ← REST API
β”œβ”€β”€ engines/
β”‚   └── asm-sandbox/
β”‚       β”œβ”€β”€ adapter.js     ← Connector adapter
β”‚       └── engine.js      ← ASM engine (IPLLab port)
β”œβ”€β”€ connectors/
β”‚   β”œβ”€β”€ tk5/               ← TK5/Hercules connector
β”‚   β”œβ”€β”€ zos/               ← z/OS connector
β”‚   └── zeroframe/         ← 3270 terminal connector
β”œβ”€β”€ workflows/
β”‚   β”œβ”€β”€ payroll-demo.json  ← Sandbox demo
β”‚   β”œβ”€β”€ tk5-demo.json      ← TK5 demo
β”‚   └── zos-integration.json ← z/OS demo
β”œβ”€β”€ ui/
β”‚   β”œβ”€β”€ index.html         ← Web interface
β”‚   β”œβ”€β”€ app.js             ← UI logic
β”‚   └── styles.css         ← Styling
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ README_DEMO.md     ← Demo guide
β”‚   └── CREDENTIALS_TEMPLATE.md ← Security guide
β”œβ”€β”€ server.js              ← Main entry point
β”œβ”€β”€ cli-demo.js            ← CLI demo runner
└── package.json

🎯 Demo Workflows

1. Payroll Processing (Sandbox)

No setup required - Runs entirely in asm-sandbox

  • Compile payroll assembly code
  • Execute calculation (1000 + 250 = 1250)
  • Debug and verify result
  • Submit JCL via 3270 (stubbed)
  • Wait for completion (stubbed)
npm run demo

2. TK5 Emulator Demo

Requires: TK5/Hercules running on localhost:8038

  • Compile assembly code
  • IPL TK5 system
  • Submit job to TK5
  • Check job status
export TK5_ENDPOINT=http://localhost:8038
npm start
# Load "TK5 Emulator Demo" in UI

3. z/OS Integration

Requires: z/OS credentials (see docs/CREDENTIALS_TEMPLATE.md)

  • Compile program
  • Submit job to real z/OS
  • Fetch SMF records
  • Read output dataset
export ZOS_ENDPOINT=https://your-zos.com
export ZOS_USERNAME=user
export ZOS_PASSWORD=pass
npm start
# Load "z/OS Integration Example" in UI

πŸ”§ Node Types

ASM Sandbox Nodes

asm.compile

  • Compiles assembly source code
  • Returns: bytecode, instructions, labels

asm.run

  • Executes compiled bytecode
  • Returns: registers, output, exitCode

asm.debug

  • Debug session with breakpoints
  • Returns: breakpointsHit, stepsExecuted, finalState

TK5 Nodes

tk5.ipl

  • IPL (boot) TK5 system
  • Config: { volume: "SYSRES" }

tk5.submit

  • Submit JCL job to TK5
  • Config: { jobName, jcl }

tk5.status

  • Get job status
  • Config: { jobId }

z/OS Nodes

zos.submit

  • Submit JCL to real z/OS
  • Config: { jcl }

zos.smf

  • Fetch SMF records
  • Config: { dataset }

zos.dataset

  • Read dataset content
  • Config: { dataset }

3270 Terminal Nodes

zeroframe.send

  • Send action to 3270 terminal
  • Config: { action, text }

zeroframe.read

  • Read screen content
  • Config: {}

zeroframe.wait

  • Wait for expected text
  • Config: { expectedText, timeout }

πŸ”„ Template Variables

Pass data between nodes:

{
  "nodes": [
    {
      "id": "compile",
      "type": "asm.compile",
      "config": { "sourceCode": "..." }
    },
    {
      "id": "run",
      "type": "asm.run",
      "config": {
        "bytecode": "{{node.compile.artifacts.bytecode}}"
      }
    }
  ]
}

πŸ“Š API Reference

GET /api/health

Health check and connector status

GET /api/workflows

List all workflows

GET /api/workflows/:id

Get workflow definition

POST /api/workflows/execute

Execute a workflow

πŸ”’ Security

NEVER commit credentials!

All sensitive configuration via environment variables:

export TK5_ENDPOINT=http://localhost:8038
export ZOS_ENDPOINT=https://zos.example.com
export ZOS_USERNAME=user
export ZOS_PASSWORD=pass
export ZEROFRAME_ENDPOINT=http://localhost:3270

See docs/CREDENTIALS_TEMPLATE.md for details.

πŸ”Œ Connector Status

Connectors automatically fallback to stubbed mode when unavailable:

  • asm-sandbox: Always available (built-in)
  • tk5: Stubbed if TK5_ENDPOINT not set
  • zos: Stubbed if credentials not configured
  • zeroframe: Stubbed if ZEROFRAME_ENDPOINT not set

Stubbed connectors return deterministic responses marked with stubbed: true.

🎨 Building Workflows

Via UI

  1. Open http://localhost:3000
  2. Select workflow from sidebar
  3. Click nodes to edit configuration
  4. Click "▢️ Run Workflow"
  5. Watch execution in real-time

Via JSON

Create workflows/my-workflow.json:

{
  "id": "my-workflow",
  "name": "My Custom Workflow",
  "nodes": [
    {
      "id": "step1",
      "type": "asm.compile",
      "description": "Compile code",
      "config": {
        "sourceCode": ".TEXT\nmain:\n  MOV R0, #42\n  HLT"
      }
    }
  ]
}

Execute via API:

curl -X POST http://localhost:3000/api/workflows/execute \
  -H "Content-Type: application/json" \
  -d @workflows/my-workflow.json

πŸ› Troubleshooting

Port 3000 in use:

PORT=3001 npm start

Connector stubbed:

  • Check environment variables
  • Verify endpoint availability
  • See docs/CREDENTIALS_TEMPLATE.md

Workflow fails:

  • Check execution log in UI
  • Verify JSON syntax
  • Inspect node configuration

πŸ“¦ Dependencies

  • express - HTTP server (only dependency!)

πŸŽƒ Kiroween 2024

Theme: Combining separate systems into a unified whole

FlowASM demonstrates this by unifying:

  • IPLLab (assembly engine)
  • ZeroFrame (3270 automation)
  • TK5/Hercules (emulator)
  • z/OS (real mainframe)

Into a single n8n-style visual workflow platform.

πŸ“š Documentation

πŸš€ Next Steps

  1. Try the demo - npm run demo
  2. Explore UI - npm start β†’ http://localhost:3000
  3. Configure connectors - See docs/CREDENTIALS_TEMPLATE.md
  4. Build workflows - Create custom automation
  5. Integrate systems - Connect TK5, z/OS, 3270

Built with Node.js only - No Python, pure npm! πŸš€

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages