id: custodian.capability_request.v1
entity_type: capability_request
workstations:
  - name: requested
    description: Capability has been requested and awaits routing or acceptance.
    entry_assertions:
      - id: capability_request.from_routing_disputed
        target: previous_workstation
        op: any_eq
        value:
          - routing_disputed
        description: Rerouting returns a disputed request to requested.
    exit_assertions: []
  - name: routing_disputed
    description: Routing decision has been disputed.
    entry_assertions:
      - id: capability_request.disputable_source
        target: previous_workstation
        op: any_eq
        value:
          - requested
        description: Only requested items can enter routing dispute.
    exit_assertions: []
  - name: accepted
    description: A provider has accepted the capability request.
    entry_assertions:
      - id: capability_request.acceptable_source
        target: previous_workstation
        op: any_eq
        value:
          - requested
        description: Acceptance follows the requested workstation.
    exit_assertions: []
  - name: in_progress
    description: Provider work is underway.
    entry_assertions:
      - id: capability_request.progress_source
        target: previous_workstation
        op: any_eq
        value:
          - accepted
          - ready_for_review
        description: Work can start after acceptance or return from review.
    exit_assertions: []
  - name: ready_for_review
    description: Capability is ready for requester review.
    entry_assertions:
      - id: capability_request.review_source
        target: previous_workstation
        op: any_eq
        value:
          - in_progress
        description: Review follows in-progress work.
    exit_assertions: []
  - name: completed
    description: Capability request has been completed.
    entry_assertions:
      - id: capability_request.completion_source
        target: previous_workstation
        op: any_eq
        value:
          - ready_for_review
        description: Completion follows review readiness.
    exit_assertions: []
  - name: rejected
    description: Capability request was rejected.
    entry_assertions:
      - id: capability_request.rejectable_source
        target: previous_workstation
        op: any_eq
        value:
          - requested
          - accepted
          - in_progress
        description: Requested through in-progress items can be rejected.
    exit_assertions: []
  - name: withdrawn
    description: Capability request was withdrawn.
    entry_assertions:
      - id: capability_request.withdrawable_source
        target: previous_workstation
        op: any_eq
        value:
          - requested
          - routing_disputed
          - accepted
          - in_progress
          - ready_for_review
        description: Non-terminal active items can be withdrawn.
    exit_assertions: []
