Hello again @stanislaw.grin
Yes, the afterUpdate handler is working correctly – I’ve not had any issues with this one, but maybe that’s because this action is being triggered by a Make Scenario that’s polling in the background periodically.
The last invocations of the afterCreate handler were:
(Actually, I’ve never seen any evidence that the afterCreated event handler has ever actually been called)
Trigger: LabSavvy API /create – trying the POST call to the foreign API from this API route
Log:
Wed Aug 21 2024 15:13:43 GMT-0400 (Eastern Daylight Time) | SERVER_CODE | INFO | [2412062] Building ServerCode Model for path (/opt/backendless/repo/51d297f6-92e1-171f-ff15-a7a602959f00/files/servercode/CODELESS/LabSavvy/PRODUCTION)
Wed Aug 21 2024 15:13:43 GMT-0400 (Eastern Daylight Time) | SERVER_CODE | INFO | [2412062] ServerCode Model built in 32ms
Wed Aug 21 2024 15:13:43 GMT-0400 (Eastern Daylight Time) | SERVER_CODE | INFO | [2412062] [D14DA93B-8901-4FBE-B691-667A861F811E] [INVOKE SERVICE] services.LabSavvy.Create_Order
Wed Aug 21 2024 15:13:44 GMT-0400 (Eastern Daylight Time) | SERVER_CODE | INFO | [2412062] {"starred":1,"date":"2024-08-21T19:13:44.272Z","number":"LS000-BILT-TEST-CASE0","billing":{"company":"LabSavvy","contact":"LabSavvy","addressName":"LabSavvy","addressType":"LabSavvy","address":{"line1":"1234 Anywhere Street","line2":"","city":"Boonies","stateProvince":"GA","postalCode":"39851","country":"USA"}},"shipping":{"company":"LabSavvy","contact":"LabSavvy","addressName":"LabSavvy","addressType":"LabSavvy","address":{"line1":"1234 Anywhere Street","line2":"","city":"Boonies","stateProvince":"GA","postalCode":"39851","country":"USA"}},"lines":{"lineNumber":1,"item":{"id":585,"name":"1-BILT Test Product"}},"customer":{"id":"684","name":"LabSavvy"}}
Wed Aug 21 2024 15:13:44 GMT-0400 (Eastern Daylight Time) | SERVER_CODE | INFO | [2412062] ### INSIDE FUNCTION ###
Wed Aug 21 2024 15:13:44 GMT-0400 (Eastern Daylight Time) | SERVER_CODE | INFO | [2412062] undefined
Wed Aug 21 2024 15:13:44 GMT-0400 (Eastern Daylight Time) | SERVER_CODE | INFO | [2412062] #######################
Wed Aug 21 2024 15:13:44 GMT-0400 (Eastern Daylight Time) | SERVER_CODE | INFO | [2412062] ################################################### SOS RESPONSE ###################################################
Wed Aug 21 2024 15:13:44 GMT-0400 (Eastern Daylight Time) | SERVER_CODE | INFO | [2412062] undefined
Wed Aug 21 2024 15:13:44 GMT-0400 (Eastern Daylight Time) | SERVER_CODE | INFO | [2412062] ################################################### SOS RESPONSE ###################################################
Wed Aug 21 2024 15:13:44 GMT-0400 (Eastern Daylight Time) | SERVER_CODE | INFO | [2412062] Processing finished in 1084.007ms
Trigger: SOSOrder/Create API Action – trying the POST call to the foreign API in this route
Log:
Wed Aug 21 2024 15:15:09 GMT-0400 (Eastern Daylight Time) | SERVER_CODE | INFO | [2412744] Building ServerCode Model for path (/opt/backendless/repo/51d297f6-92e1-171f-ff15-a7a602959f00/files/servercode/CODELESS/SOSAPI/PRODUCTION)
Wed Aug 21 2024 15:15:09 GMT-0400 (Eastern Daylight Time) | SERVER_CODE | INFO | [2412744] ServerCode Model built in 36ms
Wed Aug 21 2024 15:15:09 GMT-0400 (Eastern Daylight Time) | SERVER_CODE | INFO | [2412744] [A765FB4B-40AD-4A30-9BB1-49BC5ECF1624] [INVOKE SERVICE] services.SOSAPI.SOSOrder
Wed Aug 21 2024 15:15:09 GMT-0400 (Eastern Daylight Time) | SERVER_CODE | INFO | [2412744] { dataObject: { starred: 1, date: '2024-08-17T09:00:00', number: 'LS999-BILT-TEST-CASE9', channel: { name: 'LabSavvy' }, billing: { company: 'LabSavvy', contact: 'LabSavvy', phone: null, email: null, addressName: '', addressType: '', address: [Object] }, shipping: { company: 'LabSavvy', contact: 'Beth-6 to BILT Oteyza', phone: null, email: null, addressName: '', addressType: '', address: [Object] }, lines: [ [Object] ], customer: { id: 684, name: 'LabSavvy' } }, starred: 1, number: 'string', channel: { name: 'LabSavvy' }, billing: 'string', shipping: 'string', lines: [ { id: 4948, lineNumber: 1, item: [Object], class: [Object], job: null, workcenter: null, tax: [Object], linkedTransaction: null, description: 'item used to test BILT workflows', quantity: 1, weight: 0, volume: 0, weightunit: 'lb', volumeunit: 'cbm', unitprice: 0, amount: 0, altAmount: 0, picked: 0, shipped: 1, invoiced: 0, produced: 0, returned: 0, cost: 0, margin: 0, listPrice: null, percentdiscount: null, backOrdered: 0, duedate: '2024-08-06T00:00:00', uom: null, bin: null, lot: null, serials: null } ], customer: { id: 684, name: 'LabSavvy' } }
Wed Aug 21 2024 15:15:09 GMT-0400 (Eastern Daylight Time) | SERVER_CODE | INFO | [2412744] LabSavvy
Wed Aug 21 2024 15:15:09 GMT-0400 (Eastern Daylight Time) | SERVER_CODE | INFO | [2412744] We have a valid dataObject!!! -- Using passed dataObject as the database source.
Wed Aug 21 2024 15:15:10 GMT-0400 (Eastern Daylight Time) | SERVER_CODE | INFO | [2412744] ################ POSTING TO SOS ################
Wed Aug 21 2024 15:15:10 GMT-0400 (Eastern Daylight Time) | SERVER_CODE | INFO | [2412744] ######## RESPONSE FROM SOS ########
Wed Aug 21 2024 15:15:10 GMT-0400 (Eastern Daylight Time) | SERVER_CODE | INFO | [2412744] undefined
Wed Aug 21 2024 15:15:10 GMT-0400 (Eastern Daylight Time) | SERVER_CODE | INFO | [2412744] ###################################
Wed Aug 21 2024 15:15:10 GMT-0400 (Eastern Daylight Time) | SERVER_CODE | INFO | [2412744] Processing finished in 674.214ms
I’m not currently getting any actions that are inside the onCreate event handler, but I’m not sure why it’s not being triggered. Is it possible to run a cURL POST command from the Node JS backend? Can something like fetch be run?
Yes, I had previously tried the Try…Catch…Finally block – but I couldn’t get it working with this either.
I’m currently working on a minimal reproducible example…
Mike