use of com.graphaware.nlp.workflow.input.WorkflowInputQueryConfiguration in project neo4j-nlp by graphaware.
the class DynamicConfigurationTest method testWorfklowItemsInfosShouldBeLoadedFromPreviousState.
@Test
public void testWorfklowItemsInfosShouldBeLoadedFromPreviousState() throws Exception {
resetSingleton();
ObjectMapper mapper = new ObjectMapper();
mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);
keyValueStore = new GraphKeyValueStore(getDatabase());
QueryBasedWorkflowInput workflowInput = new QueryBasedWorkflowInput("test", getDatabase());
DynamicConfiguration configuration = new DynamicConfiguration(getDatabase());
workflowInput.setConfiguration(new WorkflowInputQueryConfiguration(new HashMap<>()));
try (Transaction tx = getDatabase().beginTx()) {
configuration.storeWorkflowInstanceItem(workflowInput);
tx.success();
}
GraphAwareRuntime runtime = GraphAwareRuntimeFactory.createRuntime(getDatabase());
runtime.registerModule(new NLPModule("NLP", NLPConfiguration.defaultConfiguration(), getDatabase()));
runtime.start();
runtime.waitUntilStarted();
}
Aggregations