public class WorkflowMockEnvironment extends Object
AbstractPluginTest, TestWorkflowService, ModelPluginMock| Modifier and Type | Field and Description |
|---|---|
protected javax.ejb.SessionContext |
ctx |
static String |
DEFAULT_MODEL_VERSION |
protected org.imixs.workflow.engine.DocumentService |
documentService |
protected org.imixs.workflow.engine.ModelService |
modelService |
protected org.imixs.workflow.WorkflowContext |
workflowContext |
protected org.imixs.workflow.engine.WorkflowService |
workflowService |
| Constructor and Description |
|---|
WorkflowMockEnvironment() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createTestDatabase()
Create a test database with some workItems and a simple model
|
Map<String,org.imixs.workflow.ItemCollection> |
getDatabase() |
org.imixs.workflow.engine.DocumentService |
getDocumentService() |
org.imixs.workflow.Model |
getModel() |
String |
getModelPath() |
org.imixs.workflow.engine.ModelService |
getModelService() |
org.imixs.workflow.WorkflowContext |
getWorkflowContext() |
org.imixs.workflow.engine.WorkflowService |
getWorkflowService() |
void |
loadModel()
loads the current model
|
void |
loadModel(String modelPath)
loads a model from the given path
|
org.imixs.workflow.ItemCollection |
processWorkItem(org.imixs.workflow.ItemCollection workitem)
Mocks a processing life cycle
|
void |
setModelPath(String modelPath) |
void |
setup() |
public static final String DEFAULT_MODEL_VERSION
protected org.imixs.workflow.engine.DocumentService documentService
protected org.imixs.workflow.engine.WorkflowService workflowService
@Spy protected org.imixs.workflow.engine.ModelService modelService
protected javax.ejb.SessionContext ctx
protected org.imixs.workflow.WorkflowContext workflowContext
public String getModelPath()
public void setModelPath(String modelPath)
public org.imixs.workflow.WorkflowContext getWorkflowContext()
public org.imixs.workflow.engine.WorkflowService getWorkflowService()
public org.imixs.workflow.engine.ModelService getModelService()
public org.imixs.workflow.engine.DocumentService getDocumentService()
public void setup()
throws org.imixs.workflow.exceptions.PluginException,
org.imixs.workflow.exceptions.ModelException
org.imixs.workflow.exceptions.PluginExceptionorg.imixs.workflow.exceptions.ModelExceptionprotected void createTestDatabase()
public org.imixs.workflow.Model getModel()
public void loadModel(String modelPath)
modelPath - public void loadModel()
public org.imixs.workflow.ItemCollection processWorkItem(org.imixs.workflow.ItemCollection workitem)
throws org.imixs.workflow.exceptions.AccessDeniedException,
org.imixs.workflow.exceptions.ProcessingErrorException,
org.imixs.workflow.exceptions.PluginException,
org.imixs.workflow.exceptions.ModelException
workitem - org.imixs.workflow.exceptions.ModelExceptionorg.imixs.workflow.exceptions.PluginExceptionorg.imixs.workflow.exceptions.ProcessingErrorExceptionorg.imixs.workflow.exceptions.AccessDeniedExceptionCopyright © 2018 Imixs Software Solutions GmbH. All rights reserved.