|
ALBPM Process API (PAPI) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Represents a single condition in a Filter.
VarDefinition: the variable to compare.fuego.papi.Comparison: the type of comparison, e.g. IS, CONTAINS, GREATER_THANFilter.addAttribute(VarDefinition, Comparison, Object, boolean).
Example: Obtain the instances where received time is before now.
// get a ProcessServiceNESession
ProcessServiceNESession session = …;
// for default VarDefinitions, use VarDefinition.getDefaultVarDefinition,
// and use the VarDefinition field name.
VarDefinition variable = VarDefinition.getDefaultVarDefinition(VarDefinition.RECEIVE_ID);
Filter filter = ProcessService.createFilter();
filter.addAttribute(variable, Comparison.BEFORE, Time.now());
InstanceInfo[] instances = session.getInstancesByFilter(new String[] { "/MyProcessId" }, filter);
Example: Obtain the instances where external variable "MyVariable" is 123.
//get a ProcessServiceNESession
ProcessServiceNESession session = …;
//for external variables, use session.getVar with the name of the external variable
VarDefinition variable = session.getVar("MyVariable");
Filter filter = ProcessService.createFilter();
filter.addAttribute(variable, Comparison.IS, new Integer(123));
InstanceInfo[] instances = session.getInstancesByFilter(new String[] { "/MyProcessId" }, filter);
| Field Summary | |
static String |
CURRENT_USER
Special participant value, this value represent the participant which execute the filter. |
| Method Summary | |
Comparison |
getComparison()
Gets the comparison of the expression |
int |
getKind()
Gets the kind of the VarDefinition to compare |
String |
getSQLExpression(boolean caseSensitive)
Gets the SQL Expression generated by the FilterAttribute. |
Object |
getValue()
Gets the value to use in the expresion to compare with the instance attribute value. |
VarDefinition |
getVariable()
Gets the VarDefinition to compare. |
String |
getVariableId()
Gets the Id of the VarDefinition to compare |
boolean |
isParametric()
Returns true if this FilterAttribute is parametric. |
void |
setComparison(Comparison comparison)
Sets the comparison of the expression. |
void |
setParametric(boolean parametric)
Sets if this FilterAttribute is parametric or not. |
void |
setValue(Object value)
Sets the value to use in the expresion to compare with the instance attribute value. |
| Field Detail |
public static final String CURRENT_USER
| Method Detail |
public void setComparison(Comparison comparison)
comparison - new Comparison to set.fuego.papi.Comparisonpublic Comparison getComparison()
fuego.papi.Comparisonpublic int getKind()
Kindpublic void setParametric(boolean parametric)
parametric - true if this FilterAttribute is parametric.public boolean isParametric()
true if this FilterAttribute is parametric.
true if is paramteric.public String getSQLExpression(boolean caseSensitive)
caseSensitive - true if you use case sensitive strings.
public void setValue(Object value)
value - Object to compare with the instance attribute value.public Object getValue()
public VarDefinition getVariable()
VarDefinitionpublic String getVariableId()
|
ALBPM Process API (PAPI) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||