This is my use case for my POC and trying to find some sample code. Can you help me to get that?
- BankA send message to customer and asking his approval. For example, Message = Please provide your approval to see your documents as part of Onboarding process.
Would like to send message from BankA Node.
- CustA receives the message and send back along with his approval / reject.
CustA should be able to see the message in UI and send A / R from CustA node.
- If customer approved BankA sends approval state to Vendor1 to get required document(this would be some basic message like we sent the documents as requested)
- BankA just respond back to VendorA and CustA that we received the required document.
I am following below flow…
- Generate unsigned transactions:
a) Create State b) Create Command and c) Build transaction using TransactionBuilder.
- Verify the transaction
- Self sign the transaction
- Initiate the FlowSession to send to CustA
- Here I have some confusion should I need to use send()(should be in Initiator call?) and receive()(should be in Acceptor call?) OR sendAndReceive() (is this function would call Acceptor?)
Also, I am not sure how the flow (in code level) interact between Initiator() and Acceptor()?
- Do I need to call Finality subFlow after getting respond from CustA?
The above flow (Banka -> CustA -> BankA) is high priority for now.
Can you please provide/refer some sample code for above flow?