Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions lib/domgen/action/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ def pre_complete

java_artifact :service_actions, :service, :server, :action, '#{service.name}Actions'

attr_accessor :priority

def pre_complete
service.disable_facet(:action) unless service.methods.any? { |m| m.action? }
end
Expand Down Expand Up @@ -239,6 +241,16 @@ def code

attr_accessor :application_event

attr_accessor :priority

def priority
if @priority.nil?
method.service.action.priority.nil? ? 100 : method.service.action.priority
else
@priority
end
end

attr_writer :max_error_count

def max_error_count
Expand Down
2 changes: 2 additions & 0 deletions lib/domgen/action/templates/action_type_populator.sql.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ INSERT INTO [Action].[tblActionType](ClassificationId,
Code,
Script,
ExternalId,
Priority,
RequestSchema,
ResponseSchema,
PreCompletionUserFeedbackPattern,
Expand All @@ -47,6 +48,7 @@ SELECT C.Id AS ClassificationId,
'<%= code %>' AS Code,
NULL as Script,
0 AS ExternalId,
<%= method.action.priority %> as Priority,
'<%= method.action.json_request_schema %>' AS RequestSchema,
'<%= method.action.json_response_schema %>' AS ResponseSchema,
'' AS PreCompletionUserFeedbackPattern,
Expand Down