Connect the Hyperledger Fabric App

Please ensure you have successfully connected to a Hyperledger Fabric blockchain via the Hyperledger Fabric App.

Instantiate a Smart Clause® Template

If you're new to Clause, follow the getting started guide. Otherwise, you should add a Smart Clause® to your contract that emits an obligation, for example, 'Full Payment Upon Signature' or 'Fragile Goods'. The obligations that a Smart Clause emits are listed in the smart clause details window.

Configure your Smart Clause's Action flow to use a Fabric Audit Trail Step.

Simply select the FabricAudit connection in the drop down.

You can use flow expressions to build a message string that should be stored on the blockchain.

Sign your contract

Remember that Actions are only processed when your contract is running. Contracts are running once all signatures have been received.

Once your contract is Running, you should trigger your Smart Clause. The correct way to do this depends on which clause that you chose. For example: 

  • Full Payment upon Signature is triggered automatically when the seller signs the contract.
  • Fragile Goods is triggered by calling the Clause API

Validate that your Smart Clause has emitted an obligation in the Timeline.

You can then use the Blockchain Explorer of your chosen platform, or inspect the peer or chaincode container logs to verify that the audit trail JSON event has been written to the blockchain.

You should see the full details of any actions stored on the blockchain and sent to the container logs:

 Please refer to the Audit Trail Event Format reference for more details on the format of the JSON.