Package com.groiss.ml.classifier
Class ClassificationAction
java.lang.Object
com.groiss.ml.classifier.ClassificationAction
This class provides methods to be used in system steps of process definitions as well as pre-processings and postconditions
of tasks.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
executeClassification
(String classifierAssignmentName, String minimumProbability, String failOnError) Executes a classification for the current activity instance using the classifier of the specified classifier assignment defined for the process definition of that activity instance, i.e. the classification is performed and the result is stored in the field defined as output field in that classifier assignment.boolean
executeClassifications
(String minimumProbability, String failOnError) Executes classifications for the current activity instance using all classifier assignment defined for the process definition of that activity instance, i.e. the classifications are performed and their results are stored in the fields defined as output fields in the various classifier assignments.
-
Constructor Details
-
ClassificationAction
public ClassificationAction()
-
-
Method Details
-
executeClassification
public boolean executeClassification(String classifierAssignmentName, String minimumProbability, String failOnError) Executes a classification for the current activity instance using the classifier of the specified classifier assignment defined for the process definition of that activity instance, i.e. the classification is performed and the result is stored in the field defined as output field in that classifier assignment. If a minimum probability is specified an automatic storage of the result in the output field will only be performed if the probability of the classification result is greater or equals to that minimum probability. If null or an empty string is passed storage will be performed in any case.- Parameters:
classifierAssignmentName
- the name of the classifier assignment which classifier shall be taken for the classificationminimumProbability
- the minimum classification probability that must be met to trigger automatic storagefailOnError
- if 'true' is passed an exception thrown during classification will be re-thrown, otherwise if will only be logged- Returns:
- always true
-
executeClassifications
Executes classifications for the current activity instance using all classifier assignment defined for the process definition of that activity instance, i.e. the classifications are performed and their results are stored in the fields defined as output fields in the various classifier assignments. If a minimum probability is specified automatic storage of the results in the output fields will only be performed for those classifications which probability of the classification result is greater or equals to that minimum probability. If null or an empty string is passed storage will be performed in any case.- Parameters:
minimumProbability
- the minimum classification probability that must be met to trigger automatic storagefailOnError
- if 'true' is passed an exception thrown during classification will be re-thrown, otherwise if will only be logged- Returns:
- always true
-