use of org.jbpm.process.workitem.ethereum.ObserveContractEventWorkitemHandler in project jbpm-work-items by kiegroup.
the class EthereumWorkitemHandlerTest method testObserveContractUpdates.
@Test
public void testObserveContractUpdates() throws Exception {
TestWorkItemManager manager = new TestWorkItemManager();
WorkItemImpl workItem = new WorkItemImpl();
workItem.setParameter("ServiceURL", "http://localhost:8545/");
workItem.setParameter("ContractAddress", "0x00211e7e");
workItem.setParameter("EventName", "AmountUpdatedEvent");
workItem.setParameter("EventReturnType", "int256");
workItem.setParameter("SignalName", "mysignal");
workItem.setParameter("AbortOnUpdate", "true");
ObserveContractEventWorkitemHandler handler = new ObserveContractEventWorkitemHandler(kieSession);
handler.setWeb3j(web3j);
handler.executeWorkItem(workItem, manager);
assertNotNull(manager.getResults());
}
Aggregations