Am trying to pass different valid and invalid Payloads.
Given url pacs003messagesAPI
* def fnUtil = Java.type('utilities.API_ServicesUtils')
* def Transaction_ID = new fnUtil().get6DigitRandomNumber();
* def payload = read('classpath:/resources/pacs003_Payload_Template.json')
* set payload.channel_id = "<channel_id>"
* set payload.channel_name = "<channel_name>"
* set payload.channel_transaction_id = Transaction_ID
Examples: |channel_id |channel_name |channel_transaction_id| |CHAL0 | Channel 0 | | |CHAL1 | Channel 1 | | |CHAL2 | Channel 2 | |
This Transaction ID is randomly generated from the Java method. I need to pass the generated random number in the first payload, and again in the second payload so that first time when I pass, it will be stored in DB and when the second payload uses the same random number, it should respond as duplicate and should not store in DB. How to reuse randomly generated number in more than one payload ?