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_ITEMS |
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.
|
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 the ML Training Service via Rest API.
|
public static final String ITEM_ML_ITEMS
public static final String ITEM_ML_STATUS
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)
uid - Copyright © 2020–2021 Imixs Software Solutions GmbH. All rights reserved.