Adobe Captivate · Arazzo Workflow

Adobe Learning Manager Search and Enroll

Version 1.0.0

Search the catalog by text, pick the top course, choose an instance, and enroll a learner.

1 workflow 1 source API 1 provider
View Spec View on GitHub AuthoringEducationeLearningLMSSCORMTrainingxAPIArazzoWorkflows

Provider

adobe-captivate

Workflows

search-and-enroll
Find a course by search query and enroll a learner into its first instance.
Searches learning objects for a query string, takes the top result, lists its instances, and creates an enrollment for the learner against the first instance.
3 steps inputs: accessToken, learnerId, loTypes, query outputs: enrollmentId, learningObjectId
1
searchCourses
searchLearningObjects
Run a text search across learning objects and select the top matching result to enroll into.
2
listInstances
getLearningObjectInstances
List the instances of the top search result and pick the first available instance to enroll into.
3
enrollLearner
createEnrollment
Enroll the learner into the selected instance of the matched learning object.

Source API Descriptions

Arazzo Workflow Specification

adobe-captivate-search-and-enroll-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Adobe Learning Manager Search and Enroll
  summary: Search the catalog by text, pick the top course, choose an instance, and enroll a learner.
  description: >-
    A discovery-driven enrollment flow for Adobe Learning Manager (Captivate
    Prime). The workflow runs a full-text search across learning objects,
    selects the top matching course, lists that course's instances to choose an
    offering, and enrolls the supplied learner against the chosen instance.
    Every 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: learningManagerApi
  url: ../openapi/adobe-captivate-prime-api-openapi.yml
  type: openapi
workflows:
- workflowId: search-and-enroll
  summary: Find a course by search query and enroll a learner into its first instance.
  description: >-
    Searches learning objects for a query string, takes the top result, lists
    its instances, and creates an enrollment for the learner against the first
    instance.
  inputs:
    type: object
    required:
    - accessToken
    - query
    - learnerId
    properties:
      accessToken:
        type: string
        description: OAuth 2.0 bearer access token issued via Adobe IMS.
      query:
        type: string
        description: The text search query to match learning objects against.
      learnerId:
        type: string
        description: The id of the user (learner) to enroll.
      loTypes:
        type: string
        description: Optional comma-separated learning object types to restrict the search to.
  steps:
  - stepId: searchCourses
    description: >-
      Run a text search across learning objects and select the top matching
      result to enroll into.
    operationId: searchLearningObjects
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: query
      in: query
      value: $inputs.query
    - name: filter.loTypes
      in: query
      value: $inputs.loTypes
    - name: page[limit]
      in: query
      value: 1
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      learningObjectId: $response.body#/data/0/id
    onSuccess:
    - name: hasMatch
      type: goto
      stepId: listInstances
      criteria:
      - context: $response.body
        condition: $.data.length > 0
        type: jsonpath
  - stepId: listInstances
    description: >-
      List the instances of the top search result and pick the first available
      instance to enroll into.
    operationId: getLearningObjectInstances
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: learningObjectId
      in: path
      value: $steps.searchCourses.outputs.learningObjectId
    - name: page[limit]
      in: query
      value: 1
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      instanceId: $response.body#/data/0/id
  - stepId: enrollLearner
    description: >-
      Enroll the learner into the selected instance of the matched learning
      object.
    operationId: createEnrollment
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    requestBody:
      contentType: application/vnd.api+json
      payload:
        data:
          type: enrollment
          attributes:
            loInstanceId: $steps.listInstances.outputs.instanceId
          relationships:
            loInstance:
              data:
                id: $steps.listInstances.outputs.instanceId
                type: learningObjectInstance
            learner:
              data:
                id: $inputs.learnerId
                type: user
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      enrollmentId: $response.body#/data/id
      dateEnrolled: $response.body#/data/attributes/dateEnrolled
  outputs:
    learningObjectId: $steps.searchCourses.outputs.learningObjectId
    enrollmentId: $steps.enrollLearner.outputs.enrollmentId