Skip to content

Commit 4f33457

Browse files
committed
Changed purchase order workflow to accept XML not JSON.
1 parent bebd224 commit 4f33457

File tree

4 files changed

+19
-21
lines changed

4 files changed

+19
-21
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
bin/
22
obj/
3+
.azurite/

MyLogicAppRulesWorkspace/LogicApp/PurchaseOrderWorkflow/workflow.json

+3-10
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"parameters": {
1010
"ruleSetName": "ProcessPurchaseOrderRuleSet",
1111
"documentType": "PO",
12-
"purchaseOrderXml": "@triggerBody()?['purchaseOrderXml']"
12+
"purchaseOrderXml": "@{base64ToString(triggerBody()?['$content'])}"
1313
}
1414
},
1515
"runAfter": {}
@@ -29,19 +29,12 @@
2929
}
3030
},
3131
"triggers": {
32-
"When_a_HTTP_request_is_received": {
32+
"When_a_PurchaseOrder_is_received": {
3333
"type": "Request",
3434
"kind": "Http",
3535
"inputs": {
3636
"method": "POST",
37-
"schema": {
38-
"type": "object",
39-
"properties": {
40-
"purchaseOrderXml": {
41-
"type": "string"
42-
}
43-
}
44-
}
37+
"schema": {}
4538
}
4639
}
4740
},

MyLogicAppRulesWorkspace/LogicApp/TestBRE.http

+13-4
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,17 @@ Content-Type: application/json
1919
@purchaseOrderWorkflowUrl = {{ $dotenv PURCHASE_ORDER_WORKFLOW_URL }}
2020

2121
POST {{ purchaseOrderWorkflowUrl }}
22-
Content-Type: application/json
22+
Content-Type: application/xml
2323

24-
{
25-
"purchaseOrderXml": "<ns0:PurchaseOrder xmlns:ns0=\"http://EAISolution.PurchaseOrder\"><Header><ReqID>ReqID_0</ReqID><Date>Date_0</Date></Header><Item><Description>Description_0</Description><Quantity>400</Quantity><UnitPrice>20</UnitPrice></Item><Status>New</Status></ns0:PurchaseOrder>"
26-
}
24+
<ns0:PurchaseOrder xmlns:ns0="http://EAISolution.PurchaseOrder">
25+
<Header>
26+
<ReqID>123456</ReqID>
27+
<Date>2024-12-20T05:47:00Z</Date>
28+
</Header>
29+
<Item>
30+
<Description>Ink cartridge refill</Description>
31+
<Quantity>400</Quantity>
32+
<UnitPrice>20</UnitPrice>
33+
</Item>
34+
<Status>New</Status>
35+
</ns0:PurchaseOrder>

MyLogicAppRulesWorkspace/MyLogicAppRulesWorkspace.code-workspace

+2-7
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@
1010
}
1111
],
1212
"settings": {
13-
"azurite.location": ".azurite",
14-
"terminal.integrated.env.windows": {
15-
"PATH": "${env:USERPROFILE}\\.azurelogicapps\\dependencies\\DotNetSDK;${env:PATH}"
16-
},
17-
"omnisharp.dotNetCliPaths": [
18-
"${env:USERPROFILE}\\.azurelogicapps\\dependencies\\DotNetSDK"
19-
]
13+
"azurite.location": ".azurite"
14+
}
2015
}
2116
}

0 commit comments

Comments
 (0)