@oneblink/apps-react
    Preparing search index...

    Function getFlowInstanceNodesWithMeta

    • Inputs a form approval flow instance and set of form submission approvals and returns a flattened array of nodes/steps with inlcuded metadata.

      const formApprovalFlowInstance = {
      steps: [
      {
      type: 'STANDARD',
      group: 'oneblink:administrator',
      isSkipped: false,
      label: 'Manager Approval',
      approvalFormId: '1234',
      },
      {
      type: 'CONCURRENT',
      nodes: [
      {
      label: 'HR Review',
      group: 'oneblink:administrator',
      isSkipped: false,
      approvalFormId: '1234',
      },
      {
      label: 'Finance Review',
      group: 'oneblink:administrator',
      isSkipped: false,
      approvalFormId: '1234',
      },
      ],
      },
      ],
      }

      const formSubmissionApprovals = [
      {
      id: 'approval1',
      stepLabel: 'Manager Approval',
      status: 'APPROVED',
      createdAt: '2024-03-20T10:00:00Z',
      updatedAt: '2024-03-20T10:00:00Z',
      updatedBy: 'fake@fake.com',
      group: 'oneblink:administrator',
      approvalFormId: '1234',
      },
      ]

      const nodesWithMeta = getFlowInstanceNodesWithMeta(
      formApprovalFlowInstance,
      formSubmissionApprovals,
      )

      Parameters

      Returns FlowInstanceNodeWithMeta[]

      ApprovalTypes.FlowInstanceNodeWithMeta[]