Skip to content

Commit

Permalink
Some logging methods usage fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dolfinus committed Apr 15, 2019
1 parent 7d608f0 commit 8e37bf1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/org/camunda/latera/bss/connectors/HOMS.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -77,30 +77,30 @@ class HOMS {
def orderData = Order.getData(execution)
LinkedHashMap body = [
order: [
data: orderData ?: [:]
data: orderData
]
]
logger.log('/ Saving order data...', 'info')
logger.info('/ Saving order data...')
def result = this.processor.sendRequest(path: "/api/orders/${homsOrderCode}",
body: body,
'put')
logger.log('\\ Order data saved', 'info')
logger.info('\\ Order data saved')
}

void getOrderData() {
logger.log('/ Receiving order data...', "info")
logger.info('/ Receiving order data...')
def result = this.processor.sendRequest(path: "/api/orders/${homsOrderCode}",
'get')
Order.saveData(result.order.data, execution)
homsOrderId = result.order.id
execution.setVariable('homsOrderId', homsOrderId)

LinkedHashMap orderData = [:]
result.order.data.each { k,v -> //Magic, do not touch
orderData[k] = v
}
Order.saveData(orderData, execution)
execution.setVariable('homsOrdDataBuffer', orderData)
logger.log('\\ Order data received', "info")
logger.info('\\ Order data received')
}

void finishOrder() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class AutoSaveOrderData implements ExecutionListener {
def homs = new HOMS(execution)
homs.saveOrderData()
} else {
logger.log('Order data has not changed, save not needed', "info")
logger.info('Order data has not changed, save not needed')
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/org/camunda/latera/bss/utils/Order.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Order {
LinkedHashMap data = [:]
execution.getVariables().each { key, value ->
if (key =~ /^homsOrderData/ && key != 'homsOrderDataUploadedFile') {
String dataKey = key.replaceFirst(/^homsOrderData/, "")
String dataKey = key.replaceFirst(/^homsOrderData/, '')
data[StringUtil.decapitalize(dataKey)] = value
}
}
Expand Down

0 comments on commit 8e37bf1

Please sign in to comment.