@@ -9,13 +9,11 @@ def initialize(args)
9
9
end
10
10
11
11
def get_workflow_definitions
12
- #ds-snippet-start:Maestro1Step2
13
12
configuration = DocuSign_Maestro ::Configuration . new
14
13
configuration . host = args [ :base_path ]
15
14
16
15
api_client = DocuSign_Maestro ::ApiClient . new ( configuration )
17
16
api_client . set_default_header ( 'Authorization' , "Bearer #{ args [ :access_token ] } " )
18
- #ds-snippet-end:Maestro1Step2
19
17
20
18
workflow_management_api = DocuSign_Maestro ::WorkflowManagementApi . new ( api_client )
21
19
@@ -31,10 +29,8 @@ def get_workflow_definition
31
29
api_client = DocuSign_Maestro ::ApiClient . new ( configuration )
32
30
api_client . set_default_header ( 'Authorization' , "Bearer #{ args [ :access_token ] } " )
33
31
34
- #ds-snippet-start:Maestro1Step3
35
32
workflow_management_api = DocuSign_Maestro ::WorkflowManagementApi . new ( api_client )
36
33
workflow_management_api . get_workflow_definition ( args [ :account_id ] , args [ :workflow_id ] )
37
- #ds-snippet-end:Maestro1Step3
38
34
end
39
35
40
36
def trigger_workflow ( workflow )
@@ -44,7 +40,6 @@ def trigger_workflow(workflow)
44
40
api_client = DocuSign_Maestro ::ApiClient . new ( configuration )
45
41
api_client . set_default_header ( 'Authorization' , "Bearer #{ args [ :access_token ] } " )
46
42
47
- #ds-snippet-start:Maestro1Step4
48
43
trigger_payload = DocuSign_Maestro ::TriggerPayload . new
49
44
trigger_payload . instance_name = args [ :instance_name ]
50
45
trigger_payload . participants = { }
@@ -61,11 +56,8 @@ def trigger_workflow(workflow)
61
56
trigger_options = DocuSign_Maestro ::TriggerWorkflowOptions . new
62
57
trigger_options . mtid = mtid
63
58
trigger_options . mtsec = mtsec
64
- #ds-snippet-end:Maestro1Step4
65
59
66
- #ds-snippet-start:Maestro1Step5
67
60
workflow_trigger_api = DocuSign_Maestro ::WorkflowTriggerApi . new ( api_client )
68
61
workflow_trigger_api . trigger_workflow ( args [ :account_id ] , args [ :workflow_id ] , trigger_payload , trigger_options )
69
- #ds-snippet-end:Maestro1Step5
70
62
end
71
63
end
0 commit comments