Bentley Systems · Arazzo Workflow

Bentley Advance an Issue Through Its Workflow

Version 1.0.0

Read an issue, update its status, record an audit-trail entry, and read back its workflow state.

1 workflow 1 source API 1 provider
View Spec View on GitHub Infrastructure EngineeringDigital TwinBIMCADReality CaptureConstructionAsset ManagementGeospatialiTwiniModelArazzoWorkflows

Provider

bentley-systems

Workflows

advance-issue
Read an issue, change its status, log an audit entry, and confirm workflow state.
Reads a single issue, updates its status, records an audit-trail entry for the transition, and reads the issue's workflow back to confirm the new state.
4 steps inputs: auditEntry, issueId, status outputs: auditEntryId, issueId, newStatus
1
readIssue
{$sourceDescriptions.issuesApi.url}#/paths/~1{issueId}/get
Read the issue's current state so the transition is applied against a known starting point.
2
updateStatus
UpdateIssue
Update the issue to its new status. This is the workflow transition itself.
3
recordAudit
CreateAuditTrail
Record an audit-trail entry capturing the status transition so the change is traceable.
4
confirmWorkflow
GetWorkflow
Read the issue's workflow state back to confirm the transition was applied.

Source API Descriptions

Arazzo Workflow Specification

bentley-systems-advance-issue-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Bentley Advance an Issue Through Its Workflow
  summary: Read an issue, update its status, record an audit-trail entry, and read back its workflow state.
  description: >-
    Issues move through a defined workflow — open, in review, resolved, closed —
    and every transition should be traceable. This workflow reads the current
    issue, updates it to a new status, records an audit-trail entry capturing the
    transition, and reads the issue's workflow state back to confirm the move.
    Because the Issues spec reuses the GetIssues operationId across the collection
    and item paths, the read step is bound by explicit operationPath. Each step
    spells out its request inline so the flow can be read and executed without
    opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: issuesApi
  url: ../openapi/itwin-issues-openapi.yml
  type: openapi
workflows:
- workflowId: advance-issue
  summary: Read an issue, change its status, log an audit entry, and confirm workflow state.
  description: >-
    Reads a single issue, updates its status, records an audit-trail entry for
    the transition, and reads the issue's workflow back to confirm the new state.
  inputs:
    type: object
    required:
    - issueId
    - status
    properties:
      issueId:
        type: string
        description: The issue to advance.
      status:
        type: string
        description: The new status to set on the issue (e.g. "Closed").
      auditEntry:
        type: object
        description: The audit-trail entry payload describing the transition.
  steps:
  - stepId: readIssue
    description: >-
      Read the issue's current state so the transition is applied against a known
      starting point.
    operationPath: '{$sourceDescriptions.issuesApi.url}#/paths/~1{issueId}/get'
    parameters:
    - name: issueId
      in: path
      value: $inputs.issueId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      currentStatus: $response.body#/issue/status
  - stepId: updateStatus
    description: >-
      Update the issue to its new status. This is the workflow transition itself.
    operationId: UpdateIssue
    parameters:
    - name: issueId
      in: path
      value: $inputs.issueId
    requestBody:
      contentType: application/json
      payload:
        status: $inputs.status
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      newStatus: $response.body#/issue/status
  - stepId: recordAudit
    description: >-
      Record an audit-trail entry capturing the status transition so the change
      is traceable.
    operationId: CreateAuditTrail
    parameters:
    - name: issueId
      in: path
      value: $inputs.issueId
    requestBody:
      contentType: application/json
      payload: $inputs.auditEntry
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      auditEntryId: $response.body#/auditTrailEntry/id
  - stepId: confirmWorkflow
    description: >-
      Read the issue's workflow state back to confirm the transition was applied.
    operationId: GetWorkflow
    parameters:
    - name: issueId
      in: path
      value: $inputs.issueId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      workflow: $response.body#/workflow
  outputs:
    issueId: $inputs.issueId
    newStatus: $steps.updateStatus.outputs.newStatus
    auditEntryId: $steps.recordAudit.outputs.auditEntryId