Class ModelPluginMock

  • All Implemented Interfaces:
    org.imixs.workflow.Model

    public class ModelPluginMock
    extends org.imixs.workflow.bpmn.BPMNModel
    This 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
    • 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:
        getRawData in class org.imixs.workflow.bpmn.BPMNModel
      • getVersion

        public String getVersion()
        Specified by:
        getVersion in interface org.imixs.workflow.Model
        Overrides:
        getVersion in class org.imixs.workflow.bpmn.BPMNModel
      • getDefinition

        public org.imixs.workflow.ItemCollection getDefinition()
        Specified by:
        getDefinition in interface org.imixs.workflow.Model
        Overrides:
        getDefinition in class org.imixs.workflow.bpmn.BPMNModel
      • getTask

        public org.imixs.workflow.ItemCollection getTask​(int processid)
                                                  throws org.imixs.workflow.exceptions.ModelException
        Specified by:
        getTask in interface org.imixs.workflow.Model
        Overrides:
        getTask in class org.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:
        getEvent in interface org.imixs.workflow.Model
        Overrides:
        getEvent in class org.imixs.workflow.bpmn.BPMNModel
        Throws:
        org.imixs.workflow.exceptions.ModelException
      • getGroups

        public List<String> getGroups()
        Specified by:
        getGroups in interface org.imixs.workflow.Model
        Overrides:
        getGroups in class org.imixs.workflow.bpmn.BPMNModel
      • findAllTasks

        public List<org.imixs.workflow.ItemCollection> findAllTasks()
        Specified by:
        findAllTasks in interface org.imixs.workflow.Model
        Overrides:
        findAllTasks in class org.imixs.workflow.bpmn.BPMNModel
      • findAllEventsByTask

        public List<org.imixs.workflow.ItemCollection> findAllEventsByTask​(int processid)
        Specified by:
        findAllEventsByTask in interface org.imixs.workflow.Model
        Overrides:
        findAllEventsByTask in class org.imixs.workflow.bpmn.BPMNModel
      • findTasksByGroup

        public List<org.imixs.workflow.ItemCollection> findTasksByGroup​(String group)
        Specified by:
        findTasksByGroup in interface org.imixs.workflow.Model
        Overrides:
        findTasksByGroup in class org.imixs.workflow.bpmn.BPMNModel