Package org.imixs.workflow.engine
Class ModelPluginMock
- java.lang.Object
-
- org.imixs.workflow.bpmn.BPMNModel
-
- org.imixs.workflow.engine.ModelPluginMock
-
- All Implemented Interfaces:
org.imixs.workflow.Model
public class ModelPluginMock extends org.imixs.workflow.bpmn.BPMNModelThis class mocks a BPMNModel so that a custom list of plugins can be registered independent form the plugins listed in the parsed bpmn model file. This is useful for JUnit tests, where only some specific Plugins should run the test.... MockitoAnnotations.initMocks(this); super.setModelPath(MODEL_PATH); super.setup(); this.modelService.addModel(new ModelPluginMock(model, "org.imixs.marty.plugins.AppoverPlugin", "org.imixs.workflow.plugins.RulePlugin")); ....
-
-
Field Summary
-
Fields inherited from class org.imixs.workflow.bpmn.BPMNModel
EVENT_ITEM_ACL_OWNER_LIST, EVENT_ITEM_ACL_OWNER_LIST_MAPPING, EVENT_ITEM_ACL_READACCESS_LIST, EVENT_ITEM_ACL_READACCESS_LIST_MAPPING, EVENT_ITEM_ACL_UPDATE, EVENT_ITEM_ACL_WRITEACCESS_LIST, EVENT_ITEM_ACL_WRITEACCESS_LIST_MAPPING, EVENT_ITEM_DOCUMENTATION, EVENT_ITEM_HISTORY_MESSAGE, EVENT_ITEM_MAIL_BCC_LIST, EVENT_ITEM_MAIL_BCC_LIST_MAPPING, EVENT_ITEM_MAIL_BODY, EVENT_ITEM_MAIL_CC_LIST, EVENT_ITEM_MAIL_CC_LIST_MAPPING, EVENT_ITEM_MAIL_SUBJECT, EVENT_ITEM_MAIL_TO_LIST, EVENT_ITEM_MAIL_TO_LIST_MAPPING, EVENT_ITEM_NAME, EVENT_ITEM_READACCESS, EVENT_ITEM_REPORT_NAME, EVENT_ITEM_REPORT_OPTIONS, EVENT_ITEM_REPORT_PATH, EVENT_ITEM_REPORT_TARGET, EVENT_ITEM_RULE_DEFINITION, EVENT_ITEM_RULE_ENGINE, EVENT_ITEM_TIMER_ACTIVE, EVENT_ITEM_TIMER_DELAY, EVENT_ITEM_TIMER_DELAY_BASE, EVENT_ITEM_TIMER_DELAY_BASE_PROPERTY, EVENT_ITEM_TIMER_DELAY_UNIT, EVENT_ITEM_TIMER_SELECTION, EVENT_ITEM_VERSION_EVENT, EVENT_ITEM_VERSION_MODE, EVENT_ITEM_WORKFLOW_PUBLIC, EVENT_ITEM_WORKFLOW_PUBLIC_ACTORS, EVENT_ITEM_WORKFLOW_RESULT, TASK_ITEM_ACL_OWNER_LIST, TASK_ITEM_ACL_OWNER_LIST_MAPPING, TASK_ITEM_ACL_READACCESS_LIST, TASK_ITEM_ACL_READACCESS_LIST_MAPPING, TASK_ITEM_ACL_UPDATE, TASK_ITEM_ACL_WRITEACCESS_LIST, TASK_ITEM_ACL_WRITEACCESS_LIST_MAPPING, TASK_ITEM_APPLICATION_EDITOR, TASK_ITEM_APPLICATION_ICON, TASK_ITEM_APPLICATION_TYPE, TASK_ITEM_DOCUMENTATION, TASK_ITEM_NAME, TASK_ITEM_WORKFLOW_ABSTRACT, TASK_ITEM_WORKFLOW_SUMMARY
-
-
Constructor Summary
Constructors Constructor Description ModelPluginMock(org.imixs.workflow.Model aModel, String... pluginList)this constructor changes the registered plugins
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<org.imixs.workflow.ItemCollection>findAllEventsByTask(int processid)List<org.imixs.workflow.ItemCollection>findAllTasks()List<org.imixs.workflow.ItemCollection>findTasksByGroup(String group)org.imixs.workflow.ItemCollectiongetDefinition()org.imixs.workflow.ItemCollectiongetEvent(int processid, int activityid)List<String>getGroups()byte[]getRawData()org.imixs.workflow.ItemCollectiongetTask(int processid)StringgetVersion()
-
-
-
Constructor Detail
-
ModelPluginMock
public ModelPluginMock(org.imixs.workflow.Model aModel, String... pluginList)this constructor changes the registered plugins
-
-
Method Detail
-
getRawData
public byte[] getRawData()
- Overrides:
getRawDatain classorg.imixs.workflow.bpmn.BPMNModel
-
getVersion
public String getVersion()
- Specified by:
getVersionin interfaceorg.imixs.workflow.Model- Overrides:
getVersionin classorg.imixs.workflow.bpmn.BPMNModel
-
getDefinition
public org.imixs.workflow.ItemCollection getDefinition()
- Specified by:
getDefinitionin interfaceorg.imixs.workflow.Model- Overrides:
getDefinitionin classorg.imixs.workflow.bpmn.BPMNModel
-
getTask
public org.imixs.workflow.ItemCollection getTask(int processid) throws org.imixs.workflow.exceptions.ModelException- Specified by:
getTaskin interfaceorg.imixs.workflow.Model- Overrides:
getTaskin classorg.imixs.workflow.bpmn.BPMNModel- Throws:
org.imixs.workflow.exceptions.ModelException
-
getEvent
public org.imixs.workflow.ItemCollection getEvent(int processid, int activityid) throws org.imixs.workflow.exceptions.ModelException- Specified by:
getEventin interfaceorg.imixs.workflow.Model- Overrides:
getEventin classorg.imixs.workflow.bpmn.BPMNModel- Throws:
org.imixs.workflow.exceptions.ModelException
-
getGroups
public List<String> getGroups()
- Specified by:
getGroupsin interfaceorg.imixs.workflow.Model- Overrides:
getGroupsin classorg.imixs.workflow.bpmn.BPMNModel
-
findAllTasks
public List<org.imixs.workflow.ItemCollection> findAllTasks()
- Specified by:
findAllTasksin interfaceorg.imixs.workflow.Model- Overrides:
findAllTasksin classorg.imixs.workflow.bpmn.BPMNModel
-
findAllEventsByTask
public List<org.imixs.workflow.ItemCollection> findAllEventsByTask(int processid)
- Specified by:
findAllEventsByTaskin interfaceorg.imixs.workflow.Model- Overrides:
findAllEventsByTaskin classorg.imixs.workflow.bpmn.BPMNModel
-
-