QueryStockLedgerActionService

public interface QueryStockLedgerActionService

This service is responsible for handling Commcare stock ledger actions in tasks.

Methods

queryStockLedger

void queryStockLedger(String configName, String caseId, String sectionId, DateTime startDate, DateTime endDate, Map<String, Object> extraData)

This task action allows to query the Commcare stock ledger based on the incoming Case ID and Section ID. When the stock ledger is queried, each response is parsed by MOTECH and a Received Stock Transaction event is raised.

Parameters:
  • configName – the name of the configuration used for connecting to CommcareHQ
  • caseId – the id of the case on CommCareHQ
  • sectionId – the ID of the section
  • startDate – the beginning of the allowed period for transaction dates
  • endDate – the finish of the allowed period for transaction dates
  • extraData – the extra data that will be sent with stock transaction as an event