@Named(value="mlController") @ConversationScoped public class MLController extends Object implements Serializable
The method search provides a suggest list searching a phrase within the document content of the current workitem.
| Modifier and Type | Field and Description |
|---|---|
protected MLService |
mlService |
protected org.imixs.workflow.faces.data.WorkflowController |
workflowController |
| Constructor and Description |
|---|
MLController() |
| Modifier and Type | Method and Description |
|---|---|
static List<String> |
findMatches(String phrase,
String _text)
Returns a matching text sequence form a search phrase
e.g.
|
String |
getMLResult()
Returns a JSON object containing the current ml result status and the item
names collected by the MLAdatper.
|
List<String> |
getSearchResult() |
boolean |
isMLItem(String name)
This method returns true if the item value for a given item was computed by
the MLAdatper
|
void |
reset()
This method reset the search and input state.
|
void |
search()
This method searches a text phrase within the document content of attached
documents.
|
@Inject protected org.imixs.workflow.faces.data.WorkflowController workflowController
@Inject protected MLService mlService
public boolean isMLItem(String name)
name - public String getMLResult()
{"status":"suggest",
"items": [
"_invoicenumber",
"_invoicetotal"
]
}
The following stati are defined:
public void search()
JSF Integration:
<h:commandScript name="imixsOfficeWorkflow.mlSearch" action=
"#{mlController.search()}" rendered="#{mlController!=null}" render=
"ml-results" />
JavaScript Example:
imixsOfficeWorkflow.mlSearch({ item: '_invoicenumber' })
public static List<String> findMatches(String phrase, String _text)
e.g. 'cat' is found in 'Catalog'
The method also searches for computed phrases based on the first hit.
It seems that this kind of problem can not be solved with regex.
data - public void reset()
Copyright © 2020–2021 Imixs Software Solutions GmbH. All rights reserved.