Sub-project: imixs-workflow-core
Package: org.imixs.workflow
Class: ModelManager
ModelRestService was using ModelService’s methods quite a few times in its method printVersionTable. I moved the method to perform the desired operation in the ModelService where it belonged and then called that method once in the ModelRestService to get the output.
The model was also defined in the ModelManager interface as ModelService implements it.
Sub-project: imixs-workflow-core
Package: org.imixs.workflow.exceptions
Class: WorkflowException
ErrorHandler class had conditionals in the addErrorMessage where it was checking the instance of PluginException and ValidationException and performing action based on that. I created a method formatErrorMessageWithParameters in the abstract class workflowException and overrode this method in PluginException and ValidationException child classes. In the ErrorHandler class I changed the conditional with the call to this new method and based on the object type it will perform desired behavior.
Refactored to resolve cyclic dependency Location-
Sub-Project: imixs-workflow-engine Package: org.imixs.workflow.engine Classes: AsyncEventScheduler and AsyncEventService
Refactoring applied- Move method to increase cohesion. Location(s)- Sub-project: imixs-workflow-jax-rs Package: org.imixs.workflow.jaxrs Class: ModelRestService
Sub-project: imixs-workflow-engine Package: org.imixs.workflow.engine Class: ModelService
Sub-project: imixs-workflow-core Package: org.imixs.workflow Class: ModelManager ModelRestService was using ModelService’s methods quite a few times in its method printVersionTable. I moved the method to perform the desired operation in the ModelService where it belonged and then called that method once in the ModelRestService to get the output. The model was also defined in the ModelManager interface as ModelService implements it.
Refactoring applied- Replace conditional with polymorphism. Location(s)- Sub-project: imixs-workflow-faces Package: org.imixs.workflow.faces.util Class: ErrorHandler
Sub-project: imixs-workflow-faces Package: org.imixs.workflow.faces.util Class: ValidationException
Sub-project: imixs-workflow-core Package: org.imixs.workflow.exceptions Class: PluginException
Sub-project: imixs-workflow-core Package: org.imixs.workflow.exceptions Class: WorkflowException ErrorHandler class had conditionals in the addErrorMessage where it was checking the instance of PluginException and ValidationException and performing action based on that. I created a method formatErrorMessageWithParameters in the abstract class workflowException and overrode this method in PluginException and ValidationException child classes. In the ErrorHandler class I changed the conditional with the call to this new method and based on the object type it will perform desired behavior.