conductor_ruby 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +142 -0
- data/LICENSE +190 -0
- data/README.md +517 -0
- data/examples/agentic_workflows/llm_chat.rb +106 -0
- data/examples/dynamic_workflow.rb +177 -0
- data/examples/event_handler.rb +94 -0
- data/examples/event_listener_examples.rb +430 -0
- data/examples/helloworld/greetings_worker.rb +24 -0
- data/examples/helloworld/helloworld.rb +99 -0
- data/examples/kitchensink.rb +213 -0
- data/examples/metadata_journey.rb +189 -0
- data/examples/metrics_example.rb +284 -0
- data/examples/new_dsl_demo.rb +141 -0
- data/examples/orkes/http_poll.rb +83 -0
- data/examples/orkes/secrets_example.rb +69 -0
- data/examples/orkes/wait_for_webhook.rb +90 -0
- data/examples/prompt_journey.rb +245 -0
- data/examples/rag_workflow.rb +167 -0
- data/examples/schedule_journey.rb +244 -0
- data/examples/simple_worker.rb +125 -0
- data/examples/simple_workflow.rb +89 -0
- data/examples/task_context_example.rb +257 -0
- data/examples/task_listener_example.rb +192 -0
- data/examples/worker_configuration_example.rb +282 -0
- data/examples/workflow_dsl.rb +316 -0
- data/examples/workflow_ops.rb +305 -0
- data/lib/conductor/client/authorization_client.rb +238 -0
- data/lib/conductor/client/integration_client.rb +108 -0
- data/lib/conductor/client/metadata_client.rb +139 -0
- data/lib/conductor/client/prompt_client.rb +58 -0
- data/lib/conductor/client/scheduler_client.rb +132 -0
- data/lib/conductor/client/schema_client.rb +32 -0
- data/lib/conductor/client/secret_client.rb +48 -0
- data/lib/conductor/client/task_client.rb +168 -0
- data/lib/conductor/client/workflow_client.rb +242 -0
- data/lib/conductor/configuration/authentication_settings.rb +17 -0
- data/lib/conductor/configuration.rb +103 -0
- data/lib/conductor/exceptions.rb +86 -0
- data/lib/conductor/http/api/application_resource_api.rb +107 -0
- data/lib/conductor/http/api/authorization_resource_api.rb +56 -0
- data/lib/conductor/http/api/event_resource_api.rb +133 -0
- data/lib/conductor/http/api/gateway_auth_resource_api.rb +48 -0
- data/lib/conductor/http/api/group_resource_api.rb +76 -0
- data/lib/conductor/http/api/integration_resource_api.rb +145 -0
- data/lib/conductor/http/api/metadata_resource_api.rb +231 -0
- data/lib/conductor/http/api/prompt_resource_api.rb +81 -0
- data/lib/conductor/http/api/role_resource_api.rb +60 -0
- data/lib/conductor/http/api/scheduler_resource_api.rb +211 -0
- data/lib/conductor/http/api/schema_resource_api.rb +82 -0
- data/lib/conductor/http/api/secret_resource_api.rb +134 -0
- data/lib/conductor/http/api/task_resource_api.rb +321 -0
- data/lib/conductor/http/api/token_resource_api.rb +42 -0
- data/lib/conductor/http/api/user_resource_api.rb +59 -0
- data/lib/conductor/http/api/workflow_bulk_resource_api.rb +91 -0
- data/lib/conductor/http/api/workflow_resource_api.rb +451 -0
- data/lib/conductor/http/api_client.rb +437 -0
- data/lib/conductor/http/models/authentication_config.rb +67 -0
- data/lib/conductor/http/models/authorization_request.rb +39 -0
- data/lib/conductor/http/models/base_model.rb +162 -0
- data/lib/conductor/http/models/bulk_response.rb +39 -0
- data/lib/conductor/http/models/conductor_application.rb +39 -0
- data/lib/conductor/http/models/conductor_user.rb +53 -0
- data/lib/conductor/http/models/create_or_update_application_request.rb +24 -0
- data/lib/conductor/http/models/create_or_update_role_request.rb +27 -0
- data/lib/conductor/http/models/event_handler.rb +130 -0
- data/lib/conductor/http/models/generate_token_request.rb +27 -0
- data/lib/conductor/http/models/group.rb +36 -0
- data/lib/conductor/http/models/integration.rb +70 -0
- data/lib/conductor/http/models/integration_api.rb +53 -0
- data/lib/conductor/http/models/integration_api_update.rb +43 -0
- data/lib/conductor/http/models/integration_update.rb +36 -0
- data/lib/conductor/http/models/permission.rb +24 -0
- data/lib/conductor/http/models/poll_data.rb +33 -0
- data/lib/conductor/http/models/prompt_template.rb +59 -0
- data/lib/conductor/http/models/prompt_template_test_request.rb +43 -0
- data/lib/conductor/http/models/rerun_workflow_request.rb +37 -0
- data/lib/conductor/http/models/role.rb +27 -0
- data/lib/conductor/http/models/schema_def.rb +59 -0
- data/lib/conductor/http/models/search_result.rb +187 -0
- data/lib/conductor/http/models/skip_task_request.rb +27 -0
- data/lib/conductor/http/models/start_workflow_request.rb +68 -0
- data/lib/conductor/http/models/subject_ref.rb +35 -0
- data/lib/conductor/http/models/tag_object.rb +36 -0
- data/lib/conductor/http/models/target_ref.rb +39 -0
- data/lib/conductor/http/models/task.rb +156 -0
- data/lib/conductor/http/models/task_def.rb +95 -0
- data/lib/conductor/http/models/task_exec_log.rb +30 -0
- data/lib/conductor/http/models/task_result.rb +115 -0
- data/lib/conductor/http/models/task_result_status.rb +24 -0
- data/lib/conductor/http/models/token.rb +33 -0
- data/lib/conductor/http/models/upsert_group_request.rb +30 -0
- data/lib/conductor/http/models/upsert_user_request.rb +39 -0
- data/lib/conductor/http/models/workflow.rb +202 -0
- data/lib/conductor/http/models/workflow_def.rb +73 -0
- data/lib/conductor/http/models/workflow_schedule.rb +100 -0
- data/lib/conductor/http/models/workflow_state_update.rb +30 -0
- data/lib/conductor/http/models/workflow_status_constants.rb +57 -0
- data/lib/conductor/http/models/workflow_task.rb +169 -0
- data/lib/conductor/http/models/workflow_test_request.rb +67 -0
- data/lib/conductor/http/rest_client.rb +211 -0
- data/lib/conductor/orkes/models/access_key.rb +56 -0
- data/lib/conductor/orkes/models/granted_permission.rb +27 -0
- data/lib/conductor/orkes/models/metadata_tag.rb +15 -0
- data/lib/conductor/orkes/models/rate_limit_tag.rb +15 -0
- data/lib/conductor/orkes/orkes_clients.rb +69 -0
- data/lib/conductor/version.rb +5 -0
- data/lib/conductor/worker/events/conductor_event.rb +40 -0
- data/lib/conductor/worker/events/global_dispatcher.rb +37 -0
- data/lib/conductor/worker/events/http_events.rb +25 -0
- data/lib/conductor/worker/events/listener_registry.rb +40 -0
- data/lib/conductor/worker/events/listeners.rb +34 -0
- data/lib/conductor/worker/events/sync_event_dispatcher.rb +78 -0
- data/lib/conductor/worker/events/task_runner_events.rb +271 -0
- data/lib/conductor/worker/events/workflow_events.rb +49 -0
- data/lib/conductor/worker/fiber_executor.rb +532 -0
- data/lib/conductor/worker/ractor_task_runner.rb +501 -0
- data/lib/conductor/worker/task_context.rb +114 -0
- data/lib/conductor/worker/task_definition_registrar.rb +322 -0
- data/lib/conductor/worker/task_handler.rb +360 -0
- data/lib/conductor/worker/task_in_progress.rb +60 -0
- data/lib/conductor/worker/task_runner.rb +538 -0
- data/lib/conductor/worker/telemetry/metrics_collector.rb +196 -0
- data/lib/conductor/worker/telemetry/prometheus_backend.rb +224 -0
- data/lib/conductor/worker/worker.rb +355 -0
- data/lib/conductor/worker/worker_config.rb +154 -0
- data/lib/conductor/worker/worker_registry.rb +71 -0
- data/lib/conductor/workflow/dsl/input_ref.rb +37 -0
- data/lib/conductor/workflow/dsl/output_ref.rb +44 -0
- data/lib/conductor/workflow/dsl/parallel_builder.rb +49 -0
- data/lib/conductor/workflow/dsl/switch_builder.rb +74 -0
- data/lib/conductor/workflow/dsl/task_ref.rb +178 -0
- data/lib/conductor/workflow/dsl/workflow_builder.rb +1016 -0
- data/lib/conductor/workflow/dsl/workflow_definition.rb +150 -0
- data/lib/conductor/workflow/llm/chat_message.rb +47 -0
- data/lib/conductor/workflow/llm/embedding_model.rb +19 -0
- data/lib/conductor/workflow/llm/tool_call.rb +43 -0
- data/lib/conductor/workflow/llm/tool_spec.rb +46 -0
- data/lib/conductor/workflow/task_type.rb +68 -0
- data/lib/conductor/workflow/timeout_policy.rb +31 -0
- data/lib/conductor/workflow/workflow_executor.rb +373 -0
- data/lib/conductor.rb +192 -0
- metadata +359 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Conductor
|
|
4
|
+
module Http
|
|
5
|
+
module Models
|
|
6
|
+
# PromptTemplate model - AI prompt template
|
|
7
|
+
class PromptTemplate < BaseModel
|
|
8
|
+
SWAGGER_TYPES = {
|
|
9
|
+
created_by: 'String',
|
|
10
|
+
create_time: 'Integer',
|
|
11
|
+
description: 'String',
|
|
12
|
+
integrations: 'Array<String>',
|
|
13
|
+
name: 'String',
|
|
14
|
+
owner_app: 'String',
|
|
15
|
+
tags: 'Array<TagObject>',
|
|
16
|
+
template: 'String',
|
|
17
|
+
updated_by: 'String',
|
|
18
|
+
update_time: 'Integer',
|
|
19
|
+
variables: 'Array<String>',
|
|
20
|
+
version: 'Integer'
|
|
21
|
+
}.freeze
|
|
22
|
+
|
|
23
|
+
ATTRIBUTE_MAP = {
|
|
24
|
+
created_by: :createdBy,
|
|
25
|
+
create_time: :createTime,
|
|
26
|
+
description: :description,
|
|
27
|
+
integrations: :integrations,
|
|
28
|
+
name: :name,
|
|
29
|
+
owner_app: :ownerApp,
|
|
30
|
+
tags: :tags,
|
|
31
|
+
template: :template,
|
|
32
|
+
updated_by: :updatedBy,
|
|
33
|
+
update_time: :updateTime,
|
|
34
|
+
variables: :variables,
|
|
35
|
+
version: :version
|
|
36
|
+
}.freeze
|
|
37
|
+
|
|
38
|
+
attr_accessor :created_by, :create_time, :description, :integrations,
|
|
39
|
+
:name, :owner_app, :tags, :template, :updated_by,
|
|
40
|
+
:update_time, :variables, :version
|
|
41
|
+
|
|
42
|
+
def initialize(params = {})
|
|
43
|
+
@created_by = params[:created_by]
|
|
44
|
+
@create_time = params[:create_time]
|
|
45
|
+
@description = params[:description]
|
|
46
|
+
@integrations = params[:integrations]
|
|
47
|
+
@name = params[:name]
|
|
48
|
+
@owner_app = params[:owner_app]
|
|
49
|
+
@tags = params[:tags]
|
|
50
|
+
@template = params[:template]
|
|
51
|
+
@updated_by = params[:updated_by]
|
|
52
|
+
@update_time = params[:update_time]
|
|
53
|
+
@variables = params[:variables]
|
|
54
|
+
@version = params[:version] || 1
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Conductor
|
|
4
|
+
module Http
|
|
5
|
+
module Models
|
|
6
|
+
# PromptTemplateTestRequest model - request to test a prompt template
|
|
7
|
+
class PromptTemplateTestRequest < BaseModel
|
|
8
|
+
SWAGGER_TYPES = {
|
|
9
|
+
llm_provider: 'String',
|
|
10
|
+
model: 'String',
|
|
11
|
+
prompt: 'String',
|
|
12
|
+
prompt_variables: 'Hash<String, Object>',
|
|
13
|
+
stop_words: 'Array<String>',
|
|
14
|
+
temperature: 'Float',
|
|
15
|
+
top_p: 'Float'
|
|
16
|
+
}.freeze
|
|
17
|
+
|
|
18
|
+
ATTRIBUTE_MAP = {
|
|
19
|
+
llm_provider: :llmProvider,
|
|
20
|
+
model: :model,
|
|
21
|
+
prompt: :prompt,
|
|
22
|
+
prompt_variables: :promptVariables,
|
|
23
|
+
stop_words: :stopWords,
|
|
24
|
+
temperature: :temperature,
|
|
25
|
+
top_p: :topP
|
|
26
|
+
}.freeze
|
|
27
|
+
|
|
28
|
+
attr_accessor :llm_provider, :model, :prompt, :prompt_variables,
|
|
29
|
+
:stop_words, :temperature, :top_p
|
|
30
|
+
|
|
31
|
+
def initialize(params = {})
|
|
32
|
+
@llm_provider = params[:llm_provider]
|
|
33
|
+
@model = params[:model]
|
|
34
|
+
@prompt = params[:prompt]
|
|
35
|
+
@prompt_variables = params[:prompt_variables]
|
|
36
|
+
@stop_words = params[:stop_words]
|
|
37
|
+
@temperature = params[:temperature]
|
|
38
|
+
@top_p = params[:top_p]
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Conductor
|
|
4
|
+
module Http
|
|
5
|
+
module Models
|
|
6
|
+
# Request to rerun a workflow from a specific task
|
|
7
|
+
class RerunWorkflowRequest < BaseModel
|
|
8
|
+
SWAGGER_TYPES = {
|
|
9
|
+
re_run_from_workflow_id: 'String',
|
|
10
|
+
workflow_input: 'Hash<String, Object>',
|
|
11
|
+
re_run_from_task_id: 'String',
|
|
12
|
+
task_input: 'Hash<String, Object>',
|
|
13
|
+
correlation_id: 'String'
|
|
14
|
+
}.freeze
|
|
15
|
+
|
|
16
|
+
ATTRIBUTE_MAP = {
|
|
17
|
+
re_run_from_workflow_id: :reRunFromWorkflowId,
|
|
18
|
+
workflow_input: :workflowInput,
|
|
19
|
+
re_run_from_task_id: :reRunFromTaskId,
|
|
20
|
+
task_input: :taskInput,
|
|
21
|
+
correlation_id: :correlationId
|
|
22
|
+
}.freeze
|
|
23
|
+
|
|
24
|
+
attr_accessor :re_run_from_workflow_id, :workflow_input, :re_run_from_task_id,
|
|
25
|
+
:task_input, :correlation_id
|
|
26
|
+
|
|
27
|
+
def initialize(params = {})
|
|
28
|
+
@re_run_from_workflow_id = params[:re_run_from_workflow_id]
|
|
29
|
+
@workflow_input = params[:workflow_input]
|
|
30
|
+
@re_run_from_task_id = params[:re_run_from_task_id]
|
|
31
|
+
@task_input = params[:task_input]
|
|
32
|
+
@correlation_id = params[:correlation_id]
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Conductor
|
|
4
|
+
module Http
|
|
5
|
+
module Models
|
|
6
|
+
# Role model - represents a role with permissions
|
|
7
|
+
class Role < BaseModel
|
|
8
|
+
SWAGGER_TYPES = {
|
|
9
|
+
name: 'String',
|
|
10
|
+
permissions: 'Array<Permission>'
|
|
11
|
+
}.freeze
|
|
12
|
+
|
|
13
|
+
ATTRIBUTE_MAP = {
|
|
14
|
+
name: :name,
|
|
15
|
+
permissions: :permissions
|
|
16
|
+
}.freeze
|
|
17
|
+
|
|
18
|
+
attr_accessor :name, :permissions
|
|
19
|
+
|
|
20
|
+
def initialize(params = {})
|
|
21
|
+
@name = params[:name]
|
|
22
|
+
@permissions = params[:permissions]
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Conductor
|
|
4
|
+
module Http
|
|
5
|
+
module Models
|
|
6
|
+
# Schema type constants
|
|
7
|
+
module SchemaType
|
|
8
|
+
JSON = 'JSON'
|
|
9
|
+
AVRO = 'AVRO'
|
|
10
|
+
PROTOBUF = 'PROTOBUF'
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# SchemaDef model - JSON/Avro/Protobuf schema definition
|
|
14
|
+
class SchemaDef < BaseModel
|
|
15
|
+
SWAGGER_TYPES = {
|
|
16
|
+
owner_app: 'String',
|
|
17
|
+
create_time: 'Integer',
|
|
18
|
+
update_time: 'Integer',
|
|
19
|
+
created_by: 'String',
|
|
20
|
+
updated_by: 'String',
|
|
21
|
+
name: 'String',
|
|
22
|
+
version: 'Integer',
|
|
23
|
+
type: 'String',
|
|
24
|
+
data: 'Hash<String, Object>',
|
|
25
|
+
external_ref: 'String'
|
|
26
|
+
}.freeze
|
|
27
|
+
|
|
28
|
+
ATTRIBUTE_MAP = {
|
|
29
|
+
owner_app: :ownerApp,
|
|
30
|
+
create_time: :createTime,
|
|
31
|
+
update_time: :updateTime,
|
|
32
|
+
created_by: :createdBy,
|
|
33
|
+
updated_by: :updatedBy,
|
|
34
|
+
name: :name,
|
|
35
|
+
version: :version,
|
|
36
|
+
type: :type,
|
|
37
|
+
data: :data,
|
|
38
|
+
external_ref: :externalRef
|
|
39
|
+
}.freeze
|
|
40
|
+
|
|
41
|
+
attr_accessor :owner_app, :create_time, :update_time, :created_by,
|
|
42
|
+
:updated_by, :name, :version, :type, :data, :external_ref
|
|
43
|
+
|
|
44
|
+
def initialize(params = {})
|
|
45
|
+
@owner_app = params[:owner_app]
|
|
46
|
+
@create_time = params[:create_time]
|
|
47
|
+
@update_time = params[:update_time]
|
|
48
|
+
@created_by = params[:created_by]
|
|
49
|
+
@updated_by = params[:updated_by]
|
|
50
|
+
@name = params[:name]
|
|
51
|
+
@version = params[:version] || 1
|
|
52
|
+
@type = params[:type]
|
|
53
|
+
@data = params[:data]
|
|
54
|
+
@external_ref = params[:external_ref]
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Conductor
|
|
4
|
+
module Http
|
|
5
|
+
module Models
|
|
6
|
+
# Generic scrollable search result
|
|
7
|
+
class SearchResult < BaseModel
|
|
8
|
+
SWAGGER_TYPES = {
|
|
9
|
+
total_hits: 'Integer',
|
|
10
|
+
results: 'Array<Object>'
|
|
11
|
+
}.freeze
|
|
12
|
+
|
|
13
|
+
ATTRIBUTE_MAP = {
|
|
14
|
+
total_hits: :totalHits,
|
|
15
|
+
results: :results
|
|
16
|
+
}.freeze
|
|
17
|
+
|
|
18
|
+
attr_accessor :total_hits, :results
|
|
19
|
+
|
|
20
|
+
def initialize(params = {})
|
|
21
|
+
@total_hits = params[:total_hits] || 0
|
|
22
|
+
@results = params[:results] || []
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Workflow summary for search results
|
|
27
|
+
class WorkflowSummary < BaseModel
|
|
28
|
+
SWAGGER_TYPES = {
|
|
29
|
+
workflow_id: 'String',
|
|
30
|
+
correlation_id: 'String',
|
|
31
|
+
workflow_type: 'String',
|
|
32
|
+
version: 'Integer',
|
|
33
|
+
start_time: 'String',
|
|
34
|
+
update_time: 'String',
|
|
35
|
+
end_time: 'String',
|
|
36
|
+
status: 'String',
|
|
37
|
+
input: 'String',
|
|
38
|
+
output: 'String',
|
|
39
|
+
reason_for_incompletion: 'String',
|
|
40
|
+
execution_time: 'Integer',
|
|
41
|
+
event: 'String',
|
|
42
|
+
failed_reference_task_names: 'String',
|
|
43
|
+
external_input_payload_storage_path: 'String',
|
|
44
|
+
external_output_payload_storage_path: 'String',
|
|
45
|
+
priority: 'Integer',
|
|
46
|
+
input_size: 'Integer',
|
|
47
|
+
output_size: 'Integer',
|
|
48
|
+
failed_task_names: 'Array<String>'
|
|
49
|
+
}.freeze
|
|
50
|
+
|
|
51
|
+
ATTRIBUTE_MAP = {
|
|
52
|
+
workflow_id: :workflowId,
|
|
53
|
+
correlation_id: :correlationId,
|
|
54
|
+
workflow_type: :workflowType,
|
|
55
|
+
version: :version,
|
|
56
|
+
start_time: :startTime,
|
|
57
|
+
update_time: :updateTime,
|
|
58
|
+
end_time: :endTime,
|
|
59
|
+
status: :status,
|
|
60
|
+
input: :input,
|
|
61
|
+
output: :output,
|
|
62
|
+
reason_for_incompletion: :reasonForIncompletion,
|
|
63
|
+
execution_time: :executionTime,
|
|
64
|
+
event: :event,
|
|
65
|
+
failed_reference_task_names: :failedReferenceTaskNames,
|
|
66
|
+
external_input_payload_storage_path: :externalInputPayloadStoragePath,
|
|
67
|
+
external_output_payload_storage_path: :externalOutputPayloadStoragePath,
|
|
68
|
+
priority: :priority,
|
|
69
|
+
input_size: :inputSize,
|
|
70
|
+
output_size: :outputSize,
|
|
71
|
+
failed_task_names: :failedTaskNames
|
|
72
|
+
}.freeze
|
|
73
|
+
|
|
74
|
+
attr_accessor :workflow_id, :correlation_id, :workflow_type, :version,
|
|
75
|
+
:start_time, :update_time, :end_time, :status, :input, :output,
|
|
76
|
+
:reason_for_incompletion, :execution_time, :event,
|
|
77
|
+
:failed_reference_task_names,
|
|
78
|
+
:external_input_payload_storage_path,
|
|
79
|
+
:external_output_payload_storage_path,
|
|
80
|
+
:priority, :input_size, :output_size, :failed_task_names
|
|
81
|
+
|
|
82
|
+
def initialize(params = {})
|
|
83
|
+
@workflow_id = params[:workflow_id]
|
|
84
|
+
@correlation_id = params[:correlation_id]
|
|
85
|
+
@workflow_type = params[:workflow_type]
|
|
86
|
+
@version = params[:version]
|
|
87
|
+
@start_time = params[:start_time]
|
|
88
|
+
@update_time = params[:update_time]
|
|
89
|
+
@end_time = params[:end_time]
|
|
90
|
+
@status = params[:status]
|
|
91
|
+
@input = params[:input]
|
|
92
|
+
@output = params[:output]
|
|
93
|
+
@reason_for_incompletion = params[:reason_for_incompletion]
|
|
94
|
+
@execution_time = params[:execution_time]
|
|
95
|
+
@event = params[:event]
|
|
96
|
+
@failed_reference_task_names = params[:failed_reference_task_names]
|
|
97
|
+
@external_input_payload_storage_path = params[:external_input_payload_storage_path]
|
|
98
|
+
@external_output_payload_storage_path = params[:external_output_payload_storage_path]
|
|
99
|
+
@priority = params[:priority]
|
|
100
|
+
@input_size = params[:input_size]
|
|
101
|
+
@output_size = params[:output_size]
|
|
102
|
+
@failed_task_names = params[:failed_task_names] || []
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Task summary for search results
|
|
107
|
+
class TaskSummary < BaseModel
|
|
108
|
+
SWAGGER_TYPES = {
|
|
109
|
+
workflow_id: 'String',
|
|
110
|
+
workflow_type: 'String',
|
|
111
|
+
correlation_id: 'String',
|
|
112
|
+
scheduled_time: 'String',
|
|
113
|
+
start_time: 'String',
|
|
114
|
+
update_time: 'String',
|
|
115
|
+
end_time: 'String',
|
|
116
|
+
status: 'String',
|
|
117
|
+
reason_for_incompletion: 'String',
|
|
118
|
+
execution_time: 'Integer',
|
|
119
|
+
queue_wait_time: 'Integer',
|
|
120
|
+
task_def_name: 'String',
|
|
121
|
+
task_type: 'String',
|
|
122
|
+
input: 'String',
|
|
123
|
+
output: 'String',
|
|
124
|
+
task_id: 'String',
|
|
125
|
+
external_input_payload_storage_path: 'String',
|
|
126
|
+
external_output_payload_storage_path: 'String',
|
|
127
|
+
workflow_priority: 'Integer',
|
|
128
|
+
domain: 'String'
|
|
129
|
+
}.freeze
|
|
130
|
+
|
|
131
|
+
ATTRIBUTE_MAP = {
|
|
132
|
+
workflow_id: :workflowId,
|
|
133
|
+
workflow_type: :workflowType,
|
|
134
|
+
correlation_id: :correlationId,
|
|
135
|
+
scheduled_time: :scheduledTime,
|
|
136
|
+
start_time: :startTime,
|
|
137
|
+
update_time: :updateTime,
|
|
138
|
+
end_time: :endTime,
|
|
139
|
+
status: :status,
|
|
140
|
+
reason_for_incompletion: :reasonForIncompletion,
|
|
141
|
+
execution_time: :executionTime,
|
|
142
|
+
queue_wait_time: :queueWaitTime,
|
|
143
|
+
task_def_name: :taskDefName,
|
|
144
|
+
task_type: :taskType,
|
|
145
|
+
input: :input,
|
|
146
|
+
output: :output,
|
|
147
|
+
task_id: :taskId,
|
|
148
|
+
external_input_payload_storage_path: :externalInputPayloadStoragePath,
|
|
149
|
+
external_output_payload_storage_path: :externalOutputPayloadStoragePath,
|
|
150
|
+
workflow_priority: :workflowPriority,
|
|
151
|
+
domain: :domain
|
|
152
|
+
}.freeze
|
|
153
|
+
|
|
154
|
+
attr_accessor :workflow_id, :workflow_type, :correlation_id, :scheduled_time,
|
|
155
|
+
:start_time, :update_time, :end_time, :status,
|
|
156
|
+
:reason_for_incompletion, :execution_time, :queue_wait_time,
|
|
157
|
+
:task_def_name, :task_type, :input, :output, :task_id,
|
|
158
|
+
:external_input_payload_storage_path,
|
|
159
|
+
:external_output_payload_storage_path,
|
|
160
|
+
:workflow_priority, :domain
|
|
161
|
+
|
|
162
|
+
def initialize(params = {})
|
|
163
|
+
@workflow_id = params[:workflow_id]
|
|
164
|
+
@workflow_type = params[:workflow_type]
|
|
165
|
+
@correlation_id = params[:correlation_id]
|
|
166
|
+
@scheduled_time = params[:scheduled_time]
|
|
167
|
+
@start_time = params[:start_time]
|
|
168
|
+
@update_time = params[:update_time]
|
|
169
|
+
@end_time = params[:end_time]
|
|
170
|
+
@status = params[:status]
|
|
171
|
+
@reason_for_incompletion = params[:reason_for_incompletion]
|
|
172
|
+
@execution_time = params[:execution_time]
|
|
173
|
+
@queue_wait_time = params[:queue_wait_time]
|
|
174
|
+
@task_def_name = params[:task_def_name]
|
|
175
|
+
@task_type = params[:task_type]
|
|
176
|
+
@input = params[:input]
|
|
177
|
+
@output = params[:output]
|
|
178
|
+
@task_id = params[:task_id]
|
|
179
|
+
@external_input_payload_storage_path = params[:external_input_payload_storage_path]
|
|
180
|
+
@external_output_payload_storage_path = params[:external_output_payload_storage_path]
|
|
181
|
+
@workflow_priority = params[:workflow_priority]
|
|
182
|
+
@domain = params[:domain]
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Conductor
|
|
4
|
+
module Http
|
|
5
|
+
module Models
|
|
6
|
+
# Request to skip a task in a running workflow
|
|
7
|
+
class SkipTaskRequest < BaseModel
|
|
8
|
+
SWAGGER_TYPES = {
|
|
9
|
+
task_input: 'Hash<String, Object>',
|
|
10
|
+
task_output: 'Hash<String, Object>'
|
|
11
|
+
}.freeze
|
|
12
|
+
|
|
13
|
+
ATTRIBUTE_MAP = {
|
|
14
|
+
task_input: :taskInput,
|
|
15
|
+
task_output: :taskOutput
|
|
16
|
+
}.freeze
|
|
17
|
+
|
|
18
|
+
attr_accessor :task_input, :task_output
|
|
19
|
+
|
|
20
|
+
def initialize(params = {})
|
|
21
|
+
@task_input = params[:task_input]
|
|
22
|
+
@task_output = params[:task_output]
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'base_model'
|
|
4
|
+
|
|
5
|
+
module Conductor
|
|
6
|
+
module Http
|
|
7
|
+
module Models
|
|
8
|
+
# StartWorkflowRequest model for starting a workflow execution
|
|
9
|
+
class StartWorkflowRequest < BaseModel
|
|
10
|
+
SWAGGER_TYPES = {
|
|
11
|
+
name: 'String',
|
|
12
|
+
version: 'Integer',
|
|
13
|
+
correlation_id: 'String',
|
|
14
|
+
input: 'Hash<String, Object>',
|
|
15
|
+
task_to_domain: 'Hash<String, String>',
|
|
16
|
+
workflow_def: 'WorkflowDef',
|
|
17
|
+
external_input_payload_storage_path: 'String',
|
|
18
|
+
priority: 'Integer',
|
|
19
|
+
created_by: 'String',
|
|
20
|
+
idempotency_key: 'String',
|
|
21
|
+
idempotency_strategy: 'String'
|
|
22
|
+
}.freeze
|
|
23
|
+
|
|
24
|
+
ATTRIBUTE_MAP = {
|
|
25
|
+
name: :name,
|
|
26
|
+
version: :version,
|
|
27
|
+
correlation_id: :correlationId,
|
|
28
|
+
input: :input,
|
|
29
|
+
task_to_domain: :taskToDomain,
|
|
30
|
+
workflow_def: :workflowDef,
|
|
31
|
+
external_input_payload_storage_path: :externalInputPayloadStoragePath,
|
|
32
|
+
priority: :priority,
|
|
33
|
+
created_by: :createdBy,
|
|
34
|
+
idempotency_key: :idempotencyKey,
|
|
35
|
+
idempotency_strategy: :idempotencyStrategy
|
|
36
|
+
}.freeze
|
|
37
|
+
|
|
38
|
+
# Idempotency strategies
|
|
39
|
+
module IdempotencyStrategy
|
|
40
|
+
FAIL = 'FAIL'
|
|
41
|
+
RETURN_EXISTING = 'RETURN_EXISTING'
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
attr_accessor :name, :version, :correlation_id, :input, :task_to_domain,
|
|
45
|
+
:workflow_def, :external_input_payload_storage_path, :priority,
|
|
46
|
+
:created_by, :idempotency_key, :idempotency_strategy
|
|
47
|
+
|
|
48
|
+
# Initialize a new StartWorkflowRequest
|
|
49
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
50
|
+
def initialize(attributes = {})
|
|
51
|
+
return unless attributes.is_a?(Hash)
|
|
52
|
+
|
|
53
|
+
self.name = attributes[:name] if attributes.key?(:name)
|
|
54
|
+
self.version = attributes[:version] if attributes.key?(:version)
|
|
55
|
+
self.correlation_id = attributes[:correlation_id] if attributes.key?(:correlation_id)
|
|
56
|
+
self.input = attributes[:input] if attributes.key?(:input)
|
|
57
|
+
self.task_to_domain = attributes[:task_to_domain] if attributes.key?(:task_to_domain)
|
|
58
|
+
self.workflow_def = attributes[:workflow_def] if attributes.key?(:workflow_def)
|
|
59
|
+
self.external_input_payload_storage_path = attributes[:external_input_payload_storage_path] if attributes.key?(:external_input_payload_storage_path)
|
|
60
|
+
self.priority = attributes[:priority] if attributes.key?(:priority)
|
|
61
|
+
self.created_by = attributes[:created_by] if attributes.key?(:created_by)
|
|
62
|
+
self.idempotency_key = attributes[:idempotency_key] if attributes.key?(:idempotency_key)
|
|
63
|
+
self.idempotency_strategy = attributes[:idempotency_strategy] if attributes.key?(:idempotency_strategy)
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Conductor
|
|
4
|
+
module Http
|
|
5
|
+
module Models
|
|
6
|
+
# Subject type constants for authorization
|
|
7
|
+
module SubjectType
|
|
8
|
+
USER = 'USER'
|
|
9
|
+
ROLE = 'ROLE'
|
|
10
|
+
GROUP = 'GROUP'
|
|
11
|
+
TAG = 'TAG'
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# SubjectRef model - identifies a user, role, or group for authorization
|
|
15
|
+
class SubjectRef < BaseModel
|
|
16
|
+
SWAGGER_TYPES = {
|
|
17
|
+
type: 'String',
|
|
18
|
+
id: 'String'
|
|
19
|
+
}.freeze
|
|
20
|
+
|
|
21
|
+
ATTRIBUTE_MAP = {
|
|
22
|
+
type: :type,
|
|
23
|
+
id: :id
|
|
24
|
+
}.freeze
|
|
25
|
+
|
|
26
|
+
attr_accessor :type, :id
|
|
27
|
+
|
|
28
|
+
def initialize(params = {})
|
|
29
|
+
@type = params[:type]
|
|
30
|
+
@id = params[:id]
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Conductor
|
|
4
|
+
module Http
|
|
5
|
+
module Models
|
|
6
|
+
# Tag type constants
|
|
7
|
+
module TagType
|
|
8
|
+
METADATA = 'METADATA'
|
|
9
|
+
RATE_LIMIT = 'RATE_LIMIT'
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# TagObject model - base tag model for metadata and rate limit tags
|
|
13
|
+
class TagObject < BaseModel
|
|
14
|
+
SWAGGER_TYPES = {
|
|
15
|
+
key: 'String',
|
|
16
|
+
type: 'String',
|
|
17
|
+
value: 'Object'
|
|
18
|
+
}.freeze
|
|
19
|
+
|
|
20
|
+
ATTRIBUTE_MAP = {
|
|
21
|
+
key: :key,
|
|
22
|
+
type: :type,
|
|
23
|
+
value: :value
|
|
24
|
+
}.freeze
|
|
25
|
+
|
|
26
|
+
attr_accessor :key, :type, :value
|
|
27
|
+
|
|
28
|
+
def initialize(params = {})
|
|
29
|
+
@key = params[:key]
|
|
30
|
+
@type = params[:type]
|
|
31
|
+
@value = params[:value]
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Conductor
|
|
4
|
+
module Http
|
|
5
|
+
module Models
|
|
6
|
+
# Target type constants for authorization
|
|
7
|
+
module TargetType
|
|
8
|
+
WORKFLOW_DEF = 'WORKFLOW_DEF'
|
|
9
|
+
TASK_DEF = 'TASK_DEF'
|
|
10
|
+
APPLICATION = 'APPLICATION'
|
|
11
|
+
USER = 'USER'
|
|
12
|
+
SECRET = 'SECRET'
|
|
13
|
+
SECRET_NAME = 'SECRET_NAME'
|
|
14
|
+
TAG = 'TAG'
|
|
15
|
+
DOMAIN = 'DOMAIN'
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# TargetRef model - identifies a resource target for authorization
|
|
19
|
+
class TargetRef < BaseModel
|
|
20
|
+
SWAGGER_TYPES = {
|
|
21
|
+
type: 'String',
|
|
22
|
+
id: 'String'
|
|
23
|
+
}.freeze
|
|
24
|
+
|
|
25
|
+
ATTRIBUTE_MAP = {
|
|
26
|
+
type: :type,
|
|
27
|
+
id: :id
|
|
28
|
+
}.freeze
|
|
29
|
+
|
|
30
|
+
attr_accessor :type, :id
|
|
31
|
+
|
|
32
|
+
def initialize(params = {})
|
|
33
|
+
@type = params[:type]
|
|
34
|
+
@id = params[:id]
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|