Class: Legion::Extensions::ServiceNow::Skills::ApprovalWorkflow

Inherits:
LLM::Skills::Base
  • Object
show all
Defined in:
lib/legion/extensions/service_now/skills/approval_workflow.rb

Instance Method Summary collapse

Instance Method Details

#assess_request(context: {}) ⇒ Object

rubocop:disable Lint/UnusedMethodArgument



21
22
23
24
25
26
# File 'lib/legion/extensions/service_now/skills/approval_workflow.rb', line 21

def assess_request(context: {}) # rubocop:disable Lint/UnusedMethodArgument
  Legion::LLM::Skills::StepResult.new(
    inject:   'Assessing the approval request against policy and risk.',
    metadata: { step: 'assess_request' }
  )
end

#complete(context: {}) ⇒ Object

rubocop:disable Lint/UnusedMethodArgument



36
37
38
39
40
41
# File 'lib/legion/extensions/service_now/skills/approval_workflow.rb', line 36

def complete(context: {}) # rubocop:disable Lint/UnusedMethodArgument
  Legion::LLM::Skills::StepResult.new(
    inject:   'Approval workflow complete.',
    metadata: { step: 'complete' }
  )
end

#gather_approval_details(context: {}) ⇒ Object

rubocop:disable Lint/UnusedMethodArgument



14
15
16
17
18
19
# File 'lib/legion/extensions/service_now/skills/approval_workflow.rb', line 14

def gather_approval_details(context: {}) # rubocop:disable Lint/UnusedMethodArgument
  Legion::LLM::Skills::StepResult.new(
    inject:   'Gathering pending approval details and associated record.',
    metadata: { step: 'gather_approval_details' }
  )
end

#make_decision(context: {}) ⇒ Object

rubocop:disable Lint/UnusedMethodArgument



28
29
30
31
32
33
34
# File 'lib/legion/extensions/service_now/skills/approval_workflow.rb', line 28

def make_decision(context: {}) # rubocop:disable Lint/UnusedMethodArgument
  Legion::LLM::Skills::StepResult.new(
    inject:   'Approving or rejecting the request with comments.',
    metadata: { step: 'make_decision' },
    gate:     :confirm
  )
end