Last active
May 25, 2019 18:41
-
-
Save hdkhanhkhtn/938b005dc89abad4e2c845852fe51a66 to your computer and use it in GitHub Desktop.
Define job steptypes.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"step-types": { | |
"script-module-step": [ | |
{ | |
"@type-id": "custom.HDK.ImportInventory", | |
"module": "app_storefront_controllers/cartridge/scripts/importInventory", | |
"function": "importInventory", | |
"parameters": { | |
"parameters": [ | |
{ | |
"@name": "WorkingFolder", | |
"@description": "Local folder relatively to IMPEX/src. (e.g download/inventory)", | |
"@type": "string", | |
"@required": false, | |
"@trim": true | |
}, | |
{ | |
"@name": "FilePattern", | |
"@description": "Input File pattern to search in local folder relatively to IMPEX/ (default is ^Inventory_(\\d){14}\\.xml).", | |
"@type": "string", | |
"@required": false, | |
"@trim": true | |
}, | |
{ | |
"@name": "ImportMode", | |
"@description": "Import Mode", | |
"@type": "string", | |
"@required": true, | |
"@trim": true, | |
"enum-values": { | |
"value": [ | |
"MERGE", | |
"REPLACE", | |
"UPDATE", | |
"DELETE" | |
] | |
} | |
}, | |
{ | |
"@name": "ImportFailedStatus", | |
"@description": "Treat Import Failed as", | |
"@type": "string", | |
"@required": true, | |
"@trim": true, | |
"enum-values": { | |
"value": [ | |
"WARN", | |
"ERROR" | |
] | |
} | |
}, | |
{ | |
"@name": "AfterProcessAction", | |
"@description": "Handle file after process", | |
"@type": "string", | |
"@required": true, | |
"@trim": true, | |
"enum-values": { | |
"value": [ | |
"DELETE_FILE", | |
"KEEP_FILE", | |
"ARCHIVE_FILE" | |
] | |
} | |
} | |
] | |
}, | |
"status-codes": { | |
"status": [ | |
{ | |
"@code": "ERROR", | |
"description": "Used when an error occurred." | |
}, | |
{ | |
"@code": "OK", | |
"description": "Used when everything went well." | |
}, | |
{ | |
"@code": "WARN", | |
"description": "Used when small, but acceptable problems occurred." | |
} | |
] | |
} | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment