Interface IndicatorOperations
public interface IndicatorOperations
Provides indicator execution operations for the EBX™ Insight Add-on. These operations must be called within different EBX contexts, such as:
user service, script/user task and trigger.
All the indicator execution operations require a configured indicator for a dedicated EBX entity (dataspace, dataset, table, record, workflow, etc.).
Code sample
public class UserServiceExecuteAnIndicator implements UserService<TableViewEntitySelection> { @Override public void setupDisplay(UserServiceSetupDisplayContext<TableViewEntitySelection> context, UserServiceDisplayConfigurator configurator) { // an EBX session from the user service context Session session = context.getSession(); //get an instance of indicator execution operations IndicatorOperations indicatorOperations = OperationsFactory.getInstance().getIndicatorOperations(session); try { //execute an indicator based on it's uuid IndicatorExecution indicatorExecution = indicatorOperations.execute("AERC-1234-AHFD-4532"); //returns a list of executions results for a given indicator List<IndicatorExecutionResult> results = indicatorExecution.getIndicatorExecutionResults(); //returns all the executions associated with a given indicator. It's possible to order those execution from ascendant or descendant order QueryParam qp = new QueryParam(); qp.setOrderByExecutionDate(Order.ASC); List<IndicatorExecution> indicatorExecutionResults = indicatorOperations.getIndicatorExecutions("AERC-1234-AHFD-4532", qp); // returns the last execution of the given indicator IndicatorExecution indicatorLastExecution = indicatorOperations.getLastIndicatorExecution("AERC-1234-AHFD-4532"); } catch (DPRAException e) { e.printStackTrace(); } } }
- Since:
- 4.2.0
-
Method Summary
Modifier and TypeMethodDescriptionexecutes an indicatorgetIndicatorExecutions
(String indicatorId, QueryParam queryParam) Returns all the executions associated with a given indicator.getLastIndicatorExecution
(String indicatorId) Returns the last execution of the given indicator
-
Method Details
-
execute
executes an indicator
- Parameters:
indicatorId
- an indicator UUID- Returns:
- the information of an indicator execution
- Throws:
DPRAException
- when the indicator does not exist or the UUID indicated contains some typos
-
getIndicatorExecutions
List<IndicatorExecution> getIndicatorExecutions(String indicatorId, QueryParam queryParam) throws DPRAException Returns all the executions associated with a given indicator. It's possible to order the executions in ascending or descending order.
- Parameters:
indicatorId
- an indicator UUIDqueryParam
- a DPRA query param- Returns:
- List
the information of an indicator execution - Throws:
DPRAException
- when the indicator does not exist or the UUID indicated contains a typo
-
getLastIndicatorExecution
Returns the last execution of the given indicator
- Parameters:
indicatorId
- an indicator UUID- Returns:
- IndicatorExecution the last execution of the given indicator
- Throws:
DPRAException
- when the indicator does not exist or the UUID indicated contains a typo
-