Class: Request::Traction::GridIon

Inherits:
CustomerRequest show all
Defined in:
app/models/request/traction/grid_ion.rb

Constant Summary

Constants included from Metadata

Metadata::SECTION_FIELDS

Constants included from Statemachine

Statemachine::ACTIVE, Statemachine::COMPLETED_STATE, Statemachine::INACTIVE, Statemachine::OPENED_STATE, Statemachine::SORT_ORDER

Instance Method Summary collapse

Methods inherited from CustomerRequest

#biffable?, #can_be_billed?, #create_billing_events, #customer_accepts_responsibility!, #generate_create_request_event, #generate_destroy_request_event, #generate_request_event, #update_responsibilities!

Methods inherited from Request

accessioning_required?, #add_comment, #aliquot_attributes, #associated_studies, #billing_product_identifier, #cancelable?, #copy, #current_request_event, #customer_accepts_responsibility!, delegate_validator, #event_with_key_value, #eventful_studies, for_study, #format_qc_information, #get_value, #has_passed, #lab_events_for_batch, #manifest_processed!, #next_request_type_id, #next_requests, #next_requests_via_asset, #next_requests_via_submission, number_expected_for_submission_id_and_request_type_id, #previous_failed_requests?, #priority, #product_line, #project=, #project_id=, #ready?, #request_type_updatable?, #return_pending_to_inbox!, #run_events, #source_labware, #study=, #study_id=, #submitted_at, #target_purpose, #target_tube, #update_pool_information, #update_priority, #update_responsibilities!, #value_for

Methods included from Metadata

#has_metadata, required_tags

Methods included from EventfulRecord

#has_many_events, #has_many_lab_events, #has_one_event_with_family

Methods included from Statistics

#asset_statistics, #progress_statistics, #sample_statistics_new

Methods included from CustomerResponsibility

included

Methods included from Batch::RequestBehaviour

#create_batch_request!, included, #recycle_from_batch!, #return_for_inbox!, #with_batch_id

Methods included from Statemachine

#cancellable?, #change_decision!, #closed?, #failed_downstream!, #failed_upstream!, #finished?, included, #on_blocked, #on_cancelled, #on_failed, #on_hold, #on_passed, #on_started, #open?, #terminated?, #transfer_aliquots, #transition_to

Methods included from StandardNamedScopes

included

Methods included from Commentable

#after_comment_addition

Methods included from Uuid::Uuidable

included, #unsaved_uuid!, #uuid

Methods included from Api::RequestIO::Extensions

included, #json_root

Methods included from Aliquot::DeprecatedBehaviours::Request

#sample_name, #tag, #tag_number

Methods inherited from ApplicationRecord

convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!

Methods included from Warren::BroadcastMessages

#broadcast, included, #queue_associated_for_broadcast, #queue_for_broadcast, #warren

Instance Method Details

#aasm_validate_statesObject

We've destroyed the stat_machine, but its validation remains. Here we override it to allow custom states.


25
26
27
# File 'app/models/request/traction/grid_ion.rb', line 25

def aasm_validate_states
  true
end

#passed?Boolean

Returns:

  • (Boolean)

19
20
21
# File 'app/models/request/traction/grid_ion.rb', line 19

def passed?
  state == 'passed'
end

#register_work_ordersObject


29
30
31
32
33
34
35
36
# File 'app/models/request/traction/grid_ion.rb', line 29

def register_work_orders
  # We go via order as we need to get a particular instance of submission
  return if order&.submission.nil?

  order.submission.register_callback(:once) do
    WorkOrder::Factory.new(order.submission).create_work_orders!
  end
end