public class MLAdapter extends Object implements org.imixs.workflow.SignalAdapter
The MLAdaper automatically analyses the text content of a attached fields, and stores entities found in the text into corresponding items.
By the parameters 'ml.endpoint' and 'ml.locales' the MLAdapter can be configured in the imixs.properties or by environment variables (ML_API_ENDPOINT' and 'ML_LOCALES')
The Adapter can be optional configured through the model by defining a workflow result tag named 'ml-config'.
Example:
<ml-config>
<endpoint>https://localhost:8111/api/resource/</endpoint>
<locales>de_DE,en_GB</locales>
</ml-config>
Per default the MLAdapter takes all entities into the current workitem if an item with the name did not yet exist.
To configure the behavior of the entity adaption optional configuration via the workflow model is possible:
<ml-entity>
<name>_invoicetotal</name>
<type>currency</type>
</ml-entity>
<ml-entity>
<name>_cdtr_bic</name>
<type>text</type>
<mapping>bic</mapping>
</ml-entity>
| Modifier and Type | Field and Description |
|---|---|
static int |
API_EVENT_FAILURE |
static int |
API_EVENT_SUCCESS |
static String |
ML_ENTITY |
static String |
PLUGIN_ERROR |
| Constructor and Description |
|---|
MLAdapter() |
| Modifier and Type | Method and Description |
|---|---|
org.imixs.workflow.ItemCollection |
execute(org.imixs.workflow.ItemCollection document,
org.imixs.workflow.ItemCollection event)
This method posts a text from an attachment to the Imixs-ML Analyse service
endpoint
|
public static final String ML_ENTITY
public static final String PLUGIN_ERROR
public static final int API_EVENT_SUCCESS
public static final int API_EVENT_FAILURE
public org.imixs.workflow.ItemCollection execute(org.imixs.workflow.ItemCollection document,
org.imixs.workflow.ItemCollection event)
throws org.imixs.workflow.exceptions.AdapterException
execute in interface org.imixs.workflow.Adapterorg.imixs.workflow.exceptions.AdapterExceptionCopyright © 2020–2021 Imixs Software Solutions GmbH. All rights reserved.