public class MLService extends Object implements Serializable
If the status was already confirmed, the workitem type is 'archive', than the ml status is set to 'training' and a eventLog entry is created to indicate that this workitem can be send to the training service. (Note: the training service can reject the workitem for training if the data is insufficient of quality)
| Modifier and Type | Field and Description |
|---|---|
protected javax.enterprise.event.Event<EntityObjectEvent> |
entityObjectEvents |
static String |
EVENTLOG_TOPIC_TRAINING |
protected org.imixs.workflow.engine.EventLogService |
eventLogService |
static String |
ITEM_ML_DEFINITIONS |
static String |
ITEM_ML_ENDPOINT |
static String |
ITEM_ML_ITEMS |
static String |
ITEM_ML_LOCALES |
static String |
ITEM_ML_MODEL |
static String |
ITEM_ML_QUALITY |
static String |
ITEM_ML_STATUS |
static String |
ML_STATUS_CONFIRMED |
static String |
ML_STATUS_SUGGEST |
static String |
ML_STATUS_TRAINING |
protected org.imixs.workflow.engine.ModelService |
modelService |
protected org.imixs.workflow.engine.WorkflowService |
workflowService |
| Constructor and Description |
|---|
MLService() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAllDocumentText(org.imixs.workflow.ItemCollection workitem)
This method returns a string with all the text content of all documents
attached to a workitem.
|
List<org.imixs.workflow.ItemCollection> |
getMLDefinitions(org.imixs.workflow.ItemCollection workitem)
This method returns a list of ItemCollection object holding the
ml.definitions stored in a given workitem.
|
void |
onWorkflowEvent(org.imixs.workflow.engine.ProcessingEvent processingEvent)
WorkflowEvent listener to update the ml.status property.
|
void |
trainWorkitem(String uid)
This method sends a given workitem to each ML Training Service defined in the
item 'ml.definitions'.
|
void |
updateMLDefinition(org.imixs.workflow.ItemCollection workitem,
org.imixs.workflow.ItemCollection newMLDefinition)
This method updates the item 'ml.definitions' of a workitem holding a list of
ML Endpoint definitions.
|
public static final String ITEM_ML_DEFINITIONS
public static final String ITEM_ML_ENDPOINT
public static final String ITEM_ML_ITEMS
public static final String ITEM_ML_LOCALES
public static final String ITEM_ML_STATUS
public static final String ITEM_ML_MODEL
public static final String ITEM_ML_QUALITY
public static final String ML_STATUS_SUGGEST
public static final String ML_STATUS_CONFIRMED
public static final String ML_STATUS_TRAINING
public static final String EVENTLOG_TOPIC_TRAINING
@Inject protected javax.enterprise.event.Event<EntityObjectEvent> entityObjectEvents
@Inject protected org.imixs.workflow.engine.ModelService modelService
@Inject protected org.imixs.workflow.engine.WorkflowService workflowService
@Inject protected org.imixs.workflow.engine.EventLogService eventLogService
public void onWorkflowEvent(@Observes
org.imixs.workflow.engine.ProcessingEvent processingEvent)
If no ml.status item exists, and ml.item is not empty, than the status is set to 'suggest'
If the status is 'suggest' and the current event is 'public' than the status is set to 'confirmed'
processingEvent - public String getAllDocumentText(org.imixs.workflow.ItemCollection workitem)
public void trainWorkitem(String uid)
The method is called by the MLTrainingScheduler.
uid - public void updateMLDefinition(org.imixs.workflow.ItemCollection workitem,
org.imixs.workflow.ItemCollection newMLDefinition)
If a endpoint definition with the same service endpoint and model name already exists, the method overwrites this entry.
workitem - - the workitem holding a list of existing
endpoint definitionsnewEndpointDefinition - - the new Endpoint definition to be stored.public List<org.imixs.workflow.ItemCollection> getMLDefinitions(org.imixs.workflow.ItemCollection workitem)
Copyright © 2020–2021 Imixs Software Solutions GmbH. All rights reserved.