Skip to content

Commit

Permalink
Merge branch 'main' into fix/list_evaluate_error
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiyaoPCCW authored Nov 12, 2024
2 parents 371b811 + 12cdedc commit 54c9f11
Show file tree
Hide file tree
Showing 31 changed files with 490 additions and 568 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ spec:
- classpath:/mef-sonata/api-targets/api-target.order.eline.add.yaml
- classpath:/mef-sonata/api-targets/api-target.order.uni.read.yaml
- classpath:/mef-sonata/api-targets/api-target.order.eline.read.yaml
- classpath:/mef-sonata/api-targets/api-target.order.uni.read.delete.yaml
- classpath:/mef-sonata/api-targets/api-target.order.eline.read.delete.yaml
- classpath:/mef-sonata/api-targets/api-target.order.uni.delete.yaml
- classpath:/mef-sonata/api-targets/api-target.order.eline.delete.yaml
- classpath:/mef-sonata/api-targets/api-target.quote.eline.add.yaml
Expand All @@ -38,6 +40,8 @@ spec:
- classpath:/mef-sonata/api-targets-mappers/api-target-mapper.order.eline.add.yaml
- classpath:/mef-sonata/api-targets-mappers/api-target-mapper.order.uni.read.yaml
- classpath:/mef-sonata/api-targets-mappers/api-target-mapper.order.eline.read.yaml
- classpath:/mef-sonata/api-targets-mappers/api-target-mapper.order.uni.read.delete.yaml
- classpath:/mef-sonata/api-targets-mappers/api-target-mapper.order.eline.read.delete.yaml
- classpath:/mef-sonata/api-targets-mappers/api-target-mapper.order.uni.delete.yaml
- classpath:/mef-sonata/api-targets-mappers/api-target-mapper.order.eline.delete.yaml
- classpath:/mef-sonata/api-targets-mappers/api-target-mapper.quote.eline.add.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,42 @@
"relatedContactInformation": "${T(com.consoleconnect.kraken.operator.gateway.func.SpelFunc).appendSellerInformation(env.seller.role,env.seller.name,env.seller.emailAddress,env.seller.number,mefRequestBody.relatedContactInformation)}",
"id": "${entity.id}",
"orderDate": "${T(com.consoleconnect.kraken.operator.core.toolkit.DateTime).nowInUTCFormatted()}",
"productOrderItem": "${mefRequestBody.productOrderItem}",
"productOrderItem": [
{
"action": "${mefRequestBody.productOrderItem[0].action}",
"agreementName": "${mefRequestBody.productOrderItem[0].agreementName}",
"billingAccount": "${mefRequestBody.productOrderItem[0].billingAccount}",
"coordinatedAction": "${mefRequestBody.productOrderItem[0].coordinatedAction}",
"endCustomerName": "${mefRequestBody.productOrderItem[0].endCustomerName}",
"expediteIndicator": "${mefRequestBody.productOrderItem[0].expediteIndicator}",
"id": "${mefRequestBody.productOrderItem[0].id}",
"expectedCompletionDate": "${mefRequestBody.productOrderItem[0].requestedCompletionDate}",
"note": "${mefRequestBody.productOrderItem[0].note}",
"product": {
"productOffering": "${mefRequestBody.productOrderItem[0].product.productOffering}",
"productConfiguration": "${mefRequestBody.productOrderItem[0].product.productConfiguration}",
"productRelationship": "${mefRequestBody.productOrderItem[0].product.productRelationship}",
"place": "${mefRequestBody.productOrderItem[0].product.place}",
"href": "${mefRequestBody.productOrderItem[0].product.href}",
"id": "${responseBody.id}"
},
"productOfferingQualificationItem": "${mefRequestBody.productOrderItem[0].productOfferingQualificationItem}",
"productOrderItemRelationship": "${mefRequestBody.productOrderItem[0].productOrderItemRelationship}",
"quoteItem": "${mefRequestBody.productOrderItem[0].quoteItem}",
"relatedBuyerPON": "${mefRequestBody.productOrderItem[0].relatedBuyerPON}",
"relatedContactInformation": "${mefRequestBody.productOrderItem[0].relatedContactInformation}",
"requestedCompletionDate": "${mefRequestBody.productOrderItem[0].requestedCompletionDate}",
"requestedItemTerm": "${mefRequestBody.productOrderItem[0].requestedItemTerm}",
"tspRestorationPriority": "${mefRequestBody.productOrderItem[0].tspRestorationPriority}",
"charge": "${mefRequestBody.productOrderItem[0].charge}",
"completionDate": "((mefResponseBody.state=='completed'?mefResponseBody.completionDate:null))",
"expediteAcceptedIndicator": "${mefRequestBody.productOrderItem[0].expediteIndicator}",
"itemTerm": "${mefRequestBody.productOrderItem[0].itemTerm}",
"milestone": "${mefRequestBody.productOrderItem[0].milestone}",
"state": "((mefResponseBody.state))",
"terminationError": "${mefRequestBody.productOrderItem[0].terminationError}"
}
],
"state": "${responseBody.status}",
"orderId": "${responseBody.id}",
"instanceId": "${responseBody.port.id}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
actionType: add
endpoints:
- id: create connection order
path: /api/v2/company/{companyName}/connections/layer2
path: /api/v2/company/{username}/connections/layer2
method: put
serverKey: mef.sonata.api-target-spec.con1718940696857
mappers:
Expand Down Expand Up @@ -136,6 +136,27 @@ spec:
sourceLocation: BODY
targetLocation: BODY
requiredMapping: true
- name: mapper.order.eline.add.product.productConfiguration.type
title: "connection type"
source: "@{{productOrderItem[0].product.productConfiguration.type}}"
target: "@{{type}}"
sourceLocation: BODY
targetLocation: BODY
requiredMapping: false
- name: mapper.order.eline.add.product.productConfiguration.destUNIMetroId
title: "connection destUNIMetroId"
source: "@{{productOrderItem[0].product.productConfiguration.destUNIMetroId}}"
target: "@{{destMetroId}}"
sourceLocation: BODY
targetLocation: BODY
requiredMapping: false
- name: mapper.order.eline.add.product.productConfiguration.buyerCompanyId
title: "connection buyerCompanyId"
source: "@{{productOrderItem[0].product.productConfiguration.buyerCompanyId}}"
target: "@{{destCompany}}"
sourceLocation: BODY
targetLocation: BODY
requiredMapping: false
response:
- name: mapper.order.eline.add.state
title: Order State Mapping
Expand Down Expand Up @@ -194,7 +215,7 @@ spec:
- name: mapper.order.eline.add.product.id
title: product instance id
description: ""
source: ""
source: "@{{id}}"
sourceLocation: BODY
target: "@{{productOrderItem[0].product.id}}"
targetLocation: BODY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ spec:
- name: mapper.order.uni.add.product.id
title: product instance id
description: ""
source: ""
source: "@{{id}}"
sourceLocation: BODY
target: "@{{productOrderItem[0].product.id}}"
targetLocation: BODY
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,41 @@ spec:
"relatedContactInformation": "${T(com.consoleconnect.kraken.operator.gateway.func.SpelFunc).appendSellerInformation(env.seller.role, env.seller.name, env.seller.emailAddress, env.seller.number, mefRequestBody.relatedContactInformation)}",
"id": "${entity.id}",
"orderDate":"${T(com.consoleconnect.kraken.operator.core.toolkit.DateTime).nowInUTCFormatted()}",
"productOrderItem": "${mefRequestBody.productOrderItem}",
"productOrderItem": [{
"action": "${mefRequestBody.productOrderItem[0].action}",
"agreementName": "${mefRequestBody.productOrderItem[0].agreementName}",
"billingAccount": "${mefRequestBody.productOrderItem[0].billingAccount}",
"coordinatedAction": "${mefRequestBody.productOrderItem[0].coordinatedAction}",
"endCustomerName": "${mefRequestBody.productOrderItem[0].endCustomerName}",
"expediteIndicator": "${mefRequestBody.productOrderItem[0].expediteIndicator}",
"id": "${mefRequestBody.productOrderItem[0].id}",
"expectedCompletionDate": "${mefRequestBody.productOrderItem[0].expectedCompletionDate}",
"note": "${mefRequestBody.productOrderItem[0].note}",
"product": {
"productOffering": "${mefRequestBody.productOrderItem[0].product.productOffering}",
"productConfiguration": "${mefRequestBody.productOrderItem[0].product.productConfiguration}",
"productRelationship": "${mefRequestBody.productOrderItem[0].product.productRelationship}",
"place": "${mefRequestBody.productOrderItem[0].product.place}",
"href": "${mefRequestBody.productOrderItem[0].product.href}",
"id": "${mefRequestBody.productOrderItem[0].product.id}"
},
"productOfferingQualificationItem": "${mefRequestBody.productOrderItem[0].productOfferingQualificationItem}",
"productOrderItemRelationship": "${mefRequestBody.productOrderItem[0].productOrderItemRelationship}",
"quoteItem": "${mefRequestBody.productOrderItem[0].quoteItem}",
"relatedBuyerPON": "${mefRequestBody.productOrderItem[0].relatedBuyerPON}",
"relatedContactInformation": "${mefRequestBody.productOrderItem[0].relatedContactInformation}",
"requestedCompletionDate": "${mefRequestBody.productOrderItem[0].requestedCompletionDate}",
"requestedItemTerm": "${mefRequestBody.productOrderItem[0].requestedItemTerm}",
"tspRestorationPriority": "${mefRequestBody.productOrderItem[0].tspRestorationPriority}",
"charge": "${mefRequestBody.productOrderItem[0].charge}",
"completionDate": "((mefResponseBody.state=='completed'?mefResponseBody.completionDate:null))",
"expectedCompletionDate": "${mefRequestBody.productOrderItem[0].requestedCompletionDate}",
"expediteAcceptedIndicator": "${mefRequestBody.productOrderItem[0].expediteIndicator}",
"itemTerm": "${mefRequestBody.productOrderItem[0].itemTerm}",
"milestone": "${mefRequestBody.productOrderItem[0].milestone}",
"state": "((mefResponseBody.state))",
"terminationError": "${mefRequestBody.productOrderItem[0].terminationError}"
}],
"state": "",
"orderId": ""
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,41 @@ spec:
"relatedContactInformation": "${T(com.consoleconnect.kraken.operator.gateway.func.SpelFunc).appendSellerInformation(env.seller.role, env.seller.name, env.seller.emailAddress, env.seller.number, mefRequestBody.relatedContactInformation)}",
"id": "${entity.id}",
"orderDate":"${T(com.consoleconnect.kraken.operator.core.toolkit.DateTime).nowInUTCFormatted()}",
"productOrderItem": "${mefRequestBody.productOrderItem}",
"productOrderItem": [{
"action": "${mefRequestBody.productOrderItem[0].action}",
"agreementName": "${mefRequestBody.productOrderItem[0].agreementName}",
"billingAccount": "${mefRequestBody.productOrderItem[0].billingAccount}",
"coordinatedAction": "${mefRequestBody.productOrderItem[0].coordinatedAction}",
"endCustomerName": "${mefRequestBody.productOrderItem[0].endCustomerName}",
"expediteIndicator": "${mefRequestBody.productOrderItem[0].expediteIndicator}",
"id": "${mefRequestBody.productOrderItem[0].id}",
"expectedCompletionDate": "${mefRequestBody.productOrderItem[0].expectedCompletionDate}",
"note": "${mefRequestBody.productOrderItem[0].note}",
"product": {
"productOffering": "${mefRequestBody.productOrderItem[0].product.productOffering}",
"productConfiguration": "${mefRequestBody.productOrderItem[0].product.productConfiguration}",
"productRelationship": "${mefRequestBody.productOrderItem[0].product.productRelationship}",
"place": "${mefRequestBody.productOrderItem[0].product.place}",
"href": "${mefRequestBody.productOrderItem[0].product.href}",
"id": "${mefRequestBody.productOrderItem[0].product.id}"
},
"productOfferingQualificationItem": "${mefRequestBody.productOrderItem[0].productOfferingQualificationItem}",
"productOrderItemRelationship": "${mefRequestBody.productOrderItem[0].productOrderItemRelationship}",
"quoteItem": "${mefRequestBody.productOrderItem[0].quoteItem}",
"relatedBuyerPON": "${mefRequestBody.productOrderItem[0].relatedBuyerPON}",
"relatedContactInformation": "${mefRequestBody.productOrderItem[0].relatedContactInformation}",
"requestedCompletionDate": "${mefRequestBody.productOrderItem[0].requestedCompletionDate}",
"requestedItemTerm": "${mefRequestBody.productOrderItem[0].requestedItemTerm}",
"tspRestorationPriority": "${mefRequestBody.productOrderItem[0].tspRestorationPriority}",
"charge": "${mefRequestBody.productOrderItem[0].charge}",
"completionDate": "((mefResponseBody.state=='completed'?mefResponseBody.completionDate:null))",
"expectedCompletionDate": "${mefRequestBody.productOrderItem[0].requestedCompletionDate}",
"expediteAcceptedIndicator": "${mefRequestBody.productOrderItem[0].expediteIndicator}",
"itemTerm": "${mefRequestBody.productOrderItem[0].itemTerm}",
"milestone": "${mefRequestBody.productOrderItem[0].milestone}",
"state": "((mefResponseBody.state))",
"terminationError": "${mefRequestBody.productOrderItem[0].terminationError}"
}],
"state": "",
"orderId": ""
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ spec:
env:
code: ${targetApiConfig.endpoints[0].responseBody}
inputs: ${targetApiConfig.inputs}
postResultRender: true
- uri: ${env.target.url}
trigger:
path: /mefApi/sonata/productInventory/v7/product/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ spec:
env:
code: ${targetApiConfig.endpoints[0].responseBody}
inputs: ${targetApiConfig.inputs}
postResultRender: true

- id: persist_http_response
actionType: buildin@db
Expand Down
Loading

0 comments on commit 54c9f11

Please sign in to comment.