Skip to content

Logic Apps import (Standard + Consumption ARM)

Vision / planned — Dashboard analysis + scaffolding preview are available; create-in-cluster and production-ready convert are not shipped.

This page describes how MeshFlows imports Azure Logic Apps Standard workflow.json and Consumption ARM deployment templates into a shared intermediate representation (IR), how Service Bus / Invictus peek-lock patterns map to RabbitMQ / meshflows.events, and what remains unresolved.


Supported inputs

Kind Detection Extract
standard_workflow definition / triggers+actions (Standard workflow.json) Use definition as-is
arm_consumption ARM resources[] with Microsoft.Logic/workflows Use each resource’s properties.definition
unknown neither shape Clear 400 / analyzer error

HFG-style layout note: many enterprise repos keep Consumption apps under Artifacts/LogicApps/*.json (+ *.parameters.json). MeshFlows only needs the deployment template (or Standard workflow.json). Do not copy customer HFG trees into this repo — use sanitized fixtures under engine/services/dashboard/app/fixtures/logicapps/.

Pipeline:

  1. Detect input kind → extract definition(s).
  2. Analyze → gap report (mapped / partial / unmapped, platform gaps).
  3. Scaffolding preview / download → MeshFlows workflow.yaml + trigger.yaml stubs + import-report.json (not runtime-complete).
  4. Convert + create-in-cluster (later) → higher-confidence YAML and Dashboard create.

Related: Why MeshFlows — roadmap, Triggers, Egress RabbitMQ, service_call / step types, ADR 0013 — messaging ack model.


Dashboard: analysis + scaffolding preview

Admin UI: Platform → Logic Apps Import.

  • Upload or paste sanitized Standard workflow.json or Consumption ARM JSON (no production secrets).
  • UI shows detected format (standard_workflow / arm_consumption) and, for ARM, a banner that [parameters(...)] / [concat(...)] / [variables(...)] remain unresolved placeholders.
  • Multiple Logic workflows in one ARM file: primary is analyzed fully; extras are listed.
  • POST /api/tools/logicapps/analyze returns classification, coverage, Service Bus / Invictus → AMQP suggestions, platform gaps, and scaffolding.
  • POST /api/tools/logicapps/scaffolding/download returns a ZIP (+ README.txt).
  • UI banner: scaffolding / not runtime-complete.
  • Create in cluster is disabled (Coming soon).

Peek-lock / complete → AMQP + type: log (product rule)

Until a full-fetched Service Bus provider + triggers exists, the importer always uses the ordinary AMQP/RabbitMQ path (not native SB):

Logic Apps pattern MeshFlows scaffolding
peekLockTopicMessagesV2 / peekLockQueueMessagesV2 / getMessagesFromTopicV2 flows/triggers/*-amqp.yaml (RabbitMQ / meshflows.events)
Invictus Http subscribe + recurrence (subscribeUrl) Same AMQP trigger (preferred over poll HTTP)
Invictus queries.filter (Domain = '…' AND Service = '…' …) DSAV triggerFilters on header:Domain / Service / Action / Version (+ optional context:amqp.routing_key)
Invictus queries.subscription (@take(replace(…)) / ARM) Comment placeholder — not evaluated
Invictus deleteOnReceive: false Documented as peek-lock-like; fits subscriber-owned ACK caveat
completeTopicMessageV2 / completeQueueMessageV2 type: log step
Invictus Acknowledge_Message (HTTP ack + LockToken) type: log step

Caveat (semantic difference)

Logic Apps holds a peek-lock and completes mid-flow. MeshFlows ACKs in the RabbitMQ trigger subscriber after synchronous Orchestrator invoke. That is similar in duration, but ack is not a workflow step. Scaffolding therefore:

  1. Emits an AMQP trigger for the peek-lock / subscribe side (with DSAV filters when Invictus queries.filter parses).
  2. Emits a type: log reminder where complete/ack used to be — not a fake complete service_call.

Example scaffolding snippet:

  # Former peek-lock complete / acknowledge 'Acknowledge_Message' (acknowledge)
  # CAVEAT: AMQP subscriber already ACKs after Orchestrator invoke —
  # this is not a mid-flow Service Bus / Invictus complete.
  - id: acknowledge_message
    type: log
    level: info
    message: "TODO: former peek-lock complete/ack — message already ACKed by AMQP subscriber"

Example Invictus subscribe → DSAV AMQP trigger filters:

invocation:
  type: amqp
  triggerFilters:
    - property: header:Domain
      equals: "ERP"
    - property: header:Service
      equals: "Package"
    - property: header:Action
      equals: "Upload"
    - property: header:Version
      equals: "1.0"
    - property: context:amqp.routing_key
      equals: erp.package.upload.1.0

Native Service Bus mapping is a future exception only if product ships a full SB provider+triggers; until then always AMQP.

See Egress RabbitMQ — Consumer ack vs peek-lock, RabbitMQ broker, and ADR 0013.


Scope import rule (type: scope vs try/catch)

MeshFlows type: scope is a sequential grouping of steps — a sub-workflow in the designer (nested pipeline). It is not parallel.scopes (concurrent lanes) and not scoped_context (workflow variables).

MeshFlows term What it is
type: scope Sequential nested steps (Logic Apps grouping Scope)
type: try Nested steps + optional catch (Logic Apps Scope with Failed sibling)
parallel.scopes Named concurrent lanes inside type: parallel
scoped_context Workflow-level variable slots

Logic Apps type: Scope ≠ MeshFlows parallel.scopes.

Importer mapping:

Logic Apps pattern MeshFlows scaffolding
Scope / action with sibling(s) runAfter: Failed / Skipped / TimedOut type: try wrapping main + catch (rethrow: true)
Sibling Scope with runAfter: Succeeded only type: scope with run_after: [{parent: succeeded}]
Sibling with mixed runAfter: [Succeeded, Failed] (and similar) sibling with run_after: [{parent: [succeeded, failed]}] (not catch)
Standalone Scope without a Failed sibling type: scope (grouped steps; designer shows a nested group)
Nested actions inside a Scope Emitted under steps: (Until / If / Foreach still expand)

Example (HFG/Consumption-style Scope_Main / Scope_Exception / Scope_Succeeded):

  - id: scope_main
    type: try
    rethrow: true
    steps:
      - id: call_api
        type: service_call
        # …
    catch:
      # from Logic Apps exception Scope 'Scope_Exception'
      - id: log_failure
        type: log
        # …
  - id: scope_succeeded
    type: scope
    run_after:
      - scope_main: succeeded
    steps:
      - id: notify_ok
        type: service_call
        # …

Mixed Succeeded+Failed sibling (not catch):

  - id: try
    type: scope
    steps:
      - id: work
        type: log
        message: "try body"
  - id: filter_errors
    type: scope
    run_after:
      - try: [succeeded, failed]
    steps:
      - id: log_filter
        type: log
        message: "after try, success or failure"

InitializeVariable → scoped_context (not a step)

Logic Apps InitializeVariable is a workflow-global variable declaration, even when the action sits inside a Scope. MeshFlows maps it to workflow-level scoped_context.variables — not to a workflow step.

Logic Apps MeshFlows
InitializeVariable inputs.variables[] scoped_context.variables[] (name, type, init.value)
Type Object / String / Integer / Float / Boolean / Array object / string / number / number / boolean / array
SetVariable type: context_set (literals mapped; @utcNow() / expressions → TODO_utc_now / quoted stub)
IncrementVariable type: context_increment
AppendToArrayVariable Mutation step (still partial — variables provider)
runAfter on InitializeVariable Collapsed; later actions do not depend on a missing init step

Example:

"Initialize_variable_-_varRequest": {
  "type": "InitializeVariable",
  "inputs": {
    "variables": [{ "name": "varRequest", "type": "Object", "value": {} }]
  },
  "runAfter": {}
}

becomes:

scoped_context:
  provider:
    service_name: variables.service
    version: "^1.0"
  variables:
    - name: varRequest
      type: object
      init:
        value: {}

Nested InitializeVariable inside a Scope is still lifted to the workflow scoped_context (Logic Apps variables are not Scope-local).


Azure Tables watermark → workflow cursor (not Settings, not trigger)

Logic Apps often stores an incremental filter datetime in Azure Table Storage (GetEntity + later Merge/Patch with utcNow() / currentDateTime). That is a durable workflow watermark, not Dashboard Admin Settings and not a trigger start-contract. Recurrence (and mail/SFTP polling) stay a schedule trigger; the first workflow step looks for new work and uses context:filterDateTime.

Logic Apps MeshFlows
ApiConnection azuretables GET /Tables/…/entities(PartitionKey, RowKey) workflow cursor — value injected at run start into context_key
Later PATCH/MERGE/PUT of the same entity Not a step. Orchestrator writes the KV on succeeded from update_from_context
InitializeVariable / SetVariable of that key (utcNow()) context_set stamp (TODO_utc_now — MeshFlows has no utcNow()); replace with ISO-8601 so the KV actually advances
Default when the key is missing default_value: "1970-01-01T00:00:00Z"
Inspect / reset in Dashboard Design → Cursor (GET/POST/DELETE /api/runtime/cursors/{workflow})

Put cursor on the workflow document (next to scoped_context). Trigger YAML stays type: schedule only. Operators can set the stored value (for example back to 1970-01-01T00:00:00Z) without editing YAML. Legacy invocation.trigger_cursor on a trigger is still honored as a fallback.

Example scaffolding:

name: afas-employee-sync
cursor:
  enabled: true
  bucket: trigger-cursors
  key: Import/LogicApps/afas-employee-sync/afasScheduling/Organization.Employee
  default_value: "1970-01-01T00:00:00Z"
  context_key: filterDateTime
  update_from_context: currentDateTime

The write is not a workflow step: after a succeeded run the orchestrator copies context[update_from_context] into the KV. Scaffolding therefore emits a visible context_set for that key (TODO_utc_now until you map @utcNow() / convertTimeZone). If you leave the LA expression as a literal, the cursor is written as @utcNow() instead of a datetime.

Use context:filterDateTime in later steps instead of @body('GetFilterDateTime'). One cursor per workflow. A full Azure Tables connector is out of scope.

The analyzer walks nested Scope / Until / If / Foreach actions, so a GetEntity inside a Try Scope is still classified and mapped. A wrapping Scope named Try with no Failed sibling becomes type: scope (grouped steps in the designer). Until becomes repeat_until with the inner graph expanded, so nested Scopes that do have Failed siblings (Try_GetData, Try_Publish) still become type: try + catch. Azure Tables PUT /entities/etag(PartitionKey, RowKey) is the same watermark write as PATCH/MERGE.


Service Bus → RabbitMQ / meshflows.events

Logic Apps operationId MeshFlows target Status
peekLockTopicMessagesV2 AMQP trigger (topic / DSAV queue on meshflows.events) partial
peekLockQueueMessagesV2 AMQP trigger (named queue) partial
sendMessage egress.rabbitmq.publish / egress.rabbitmq.topic.send mapped
getMessagesFromTopicV2 Prefer AMQP trigger over poll partial
completeTopicMessageV2 / completeQueueMessageV2 type: log (subscriber already ACKed) partial

Peek-lock alternatives (open-source brokers)

Fair comparison for “explicit ack / complete from consumer (or later from a step)” with enough community tractie. MeshFlows today: RabbitMQ with subscriber-owned ACK (no complete-step).

Broker Ack model (close to peek-lock?) Open source Tractie Fit for MeshFlows
RabbitMQ Consumer basic.ack / nack after delivery; lock ≈ unacked message Yes (MPL) Very high Current — keep
Apache Pulsar Cumulative / individual ack; exclusive + shared subscriptions; ack can be deferred Yes (ASL 2.0) High Strong if you want richer ack APIs later
NATS JetStream Explicit ack (Ack / Nak / InProgress / Term) with ack wait Yes (Apache 2.0) High Good “native complete-from-consumer” story
Apache ActiveMQ Artemis JMS CLIENT_ACKNOWLEDGE / individual ack; AMQP disposition Yes (Apache 2.0) Medium–high (JMS shops) Viable; overlaps AMQP ecosystem
Redis Streams Consumer groups + XACK; pending entries list (PEL) Yes (RSALv2 / SSPL — licence nuance) High Simple ack; not a full broker substitute
Apache Kafka Offset commit ≠ peek-lock complete Yes (Apache 2.0) Very high Different model — see below

Kafka caveat

Kafka consumers advance a committed offset (or leave it to the client). That is progress tracking for a partition, not a per-message lock token you complete from an arbitrary workflow step after side effects. Rebalance, batching, and at-least-once semantics differ from Service Bus peek-lock + completeMessage. Do not treat Kafka offset commit as a 1:1 peek-lock complete replacement.

Recommendation (MeshFlows)

  1. Stay on RabbitMQ + current subscriber ACK for AMQP triggers.
  2. Prefer a future step-level ack API (delivery token → subscriber callback) over adopting a second broker solely for Logic Apps complete* parity.
  3. Consider Pulsar or NATS JetStream only if product strategy needs native complete-from-workflow / multi-ack patterns beyond RabbitMQ — not as the default import path.

Details and decision record: ADR 0013.


Managed Identity

Azure Service Bus can authenticate with workload identity / user-assigned MI (ADR 0012). Logic Apps Http / connector MSI is still a P2 gap in the analysis report — the importer does not map Azure identity resource IDs onto MeshFlows connections.


MVP golden workflows

  1. HTTP Request → Http / Liquid / Response
  2. Service Bus / Invictus peek-lock → AMQP trigger → transform → type: log (former complete/ack)
  3. Recurrence → schedule-driven workflow
  4. Consumption ARM extract → same IR as Standard

Non-goals (current)

  • Production-ready convert with expression-mapping confidence
  • Create-in-cluster from Dashboard (download / preview only)
  • 1:1 peek-lock + complete*Message as separate MeshFlows steps
  • Native Service Bus provider mapping (always AMQP until full SB provider exists)
  • Full Invictus pub/sub runtime
  • Resolving ARM [parameters] / [concat] expressions
  • MSI / Entra workload identity import mapping (runtime for Service Bus: ADR 0012)

Estimated coverage from PFC-AIS-style Standard portfolios: ~15–25% direct mapped; ~60–70% with stubs / partial mappings. Consumption ARM portfolios (HFG-style) are Http/ApiConnection/Scope-heavy — classify/gap first.


Implementation pointers

  • Analyzer + scaffolding emit: engine/services/dashboard/app/logicapps_import.py
  • API: POST /api/tools/logicapps/analyze, POST /api/tools/logicapps/scaffolding/download
  • UI: Dashboard nav Logic Apps Import (logicAppsImportPanel)
  • Synthetic fixtures: engine/services/dashboard/app/fixtures/logicapps/ (incl. arm_consumption_invictus_subscribe.json, scope_try_catch_pattern.json, initialize_variable_scoped_context.json, azure_tables_watermark.json, nested_scope_until_watermark.json)