-
Notifications
You must be signed in to change notification settings - Fork 2
/
UC1_DownloadInvoiceFile.yaml
159 lines (158 loc) · 5.01 KB
/
UC1_DownloadInvoiceFile.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
$integration: http://ibm.com/appconnect/integration/v2/integrationFile
integration:
type: api
trigger-interfaces:
trigger-interface-1:
triggers:
getencodedInput:
assembly:
$ref: '#/integration/assemblies/assembly-2'
input-context:
data: input
output-context:
data: ouput
options:
resources:
- business-object: input
model:
$ref: '#/models/input'
triggers:
getencoded: getencodedInput
- business-object: ouput
model:
$ref: '#/models/ouput'
triggers: {}
type: api-trigger
action-interfaces:
action-interface-2:
type: api-action
business-object: request
connector-type: iiboc
account-name: Account 1
actions:
INVOKEACTION: {}
assemblies:
assembly-2:
assembly:
execute:
- custom-action:
name: Callable flow Invoke
target:
$ref: '#/integration/action-interfaces/action-interface-2'
action: INVOKEACTION
map:
customSchemas:
properties.`localEnvironment`:
type: object
properties:
ordernumber:
type: string
mappings:
- application:
template: UC1_CallableFileRead
- endpoint:
template: ReturnFileAsMultiPart
- localEnvironment:
mappings:
- ordernumber:
template: '{{$api.ordernumber}}'
$map: http://ibm.com/appconnect/map/v1
input:
- variable: api
$ref: '#/trigger/api/parameters'
- variable: flowDetails
$ref: '#/flowDetails'
- parse:
name: JSON Parser Parse
parse-format: json
source:
template: '{{$CallableflowInvoke.localEnvironment}}'
input:
- variable: api
$ref: '#/trigger/api/parameters'
- variable: CallableflowInvoke
$ref: '#/node-output/Callable flow Invoke/response/payload'
- variable: flowDetails
$ref: '#/flowDetails'
sample-data: >-
{
"Filename":"IN_00100_22007894_SK_22006710_RI_6369205_93135.pdf",
"File":"LS1teUJvdW5kYXJ5DQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL3BkZg0KQ29udGVudC1EaXNwb3NpdGlvbjogYXR0YWNobWVudDsgZmlsZW5hbWU9ImZpbGVuYW1lLnBkZiIN/PtlXFL1sRngJWjubo1T6+uhNWra/N3s/rzE4Bas7p"
}
output-schema:
$schema: http://json-schema.org/draft-04/schema#
type: object
properties:
Filename:
type: string
File:
type: string
title: Parsed JSON
- response:
name: response-1
reply-maps:
- title: input successfully add custom operation
status-code: 200
map:
mappings:
- file:
template: '{{$JSONParserParse.File}}'
- filename:
template: '{{$JSONParserParse.Filename}}'
$map: http://ibm.com/appconnect/map/v1
input:
- variable: api
$ref: '#/trigger/api/parameters'
- variable: CallableflowInvoke
$ref: '#/node-output/Callable flow Invoke/response/payload'
- variable: JSONParserParse
$ref: '#/node-output/JSON Parser Parse/response/payload'
- variable: flowDetails
$ref: '#/flowDetails'
input: []
name: UC1_DownloadInvoiceFile
models:
input:
name: input
properties:
ordernumber:
required: false
id: true
type: string
plural: input
description: ' Post order number'
operations:
getencoded: '#/integration/assemblies/assembly-2'
methods:
getencoded:
name: getencoded
display:
name: Get Invoice file
accessType: WRITE
accepts:
- arg: ordernumber
type: string
http:
source: path
required: true
returns:
arg: data
type: ouput
root: true
http:
verb: GET
path: /:ordernumber/getencoded
ouput:
name: ouput
properties:
filename:
required: false
id: true
type: string
file:
required: false
id: false
type: string
plural: ouput
description: ' '
operations: {}