Выдавать событие через определенное количество дней в Hyperledger composer

#node.js #hyperledger #hyperledger-composer

#node.js #hyperledger #hyperledger-composer

Вопрос:

Ресурс, который называется Contract have contract_start_date и contract_end_date properties в файле модели. Я хочу выдать событие после contract_end_date .

Файл модели:

 asset Contract identified by contractId {
       o String contractId
       o DateTime contract_start_date
       o DateTime contract_end_date
}

transaction set_Dates {
    --> Contract contract
    o DateTime start_date
    o DateTime end_date
}

event end_Date_Reached { 
    o String message
}  

 /** 
 * In the logic.js file 
 */
 
 async function setDate (tx) { 
   tx.contract.contract_start_date = tx.start_date;
   tx.contract.contract_end_date = tx.end_date; 
   
   // get the Contract asset from registry
  let contractRegistry = await getAssetRegistry('org.test.sample.Contract');
  await contractRegistry.update(tx.contract);  // update the registry
 }  

Как мне выдать end_Date_Reached событие, проверив значение contract_end_date свойства? Любая помощь будет оценена!