diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 3ec1f36..cda376a 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -4,6 +4,7 @@ ### 1.2.18 (Development) + - Fix in Archiv Suche CustomSearchController.java - requestscoped ### 1.2.17 diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/CustomSearchController.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/CustomSearchController.java index fe10332..017185c 100644 --- a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/CustomSearchController.java +++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/CustomSearchController.java @@ -32,7 +32,7 @@ import java.util.Calendar; import java.util.Date; import java.util.logging.Logger; -import javax.enterprise.context.SessionScoped; +import javax.enterprise.context.RequestScoped; import javax.enterprise.event.Observes; import javax.inject.Inject; import javax.inject.Named; @@ -51,7 +51,8 @@ import org.imixs.workflow.office.views.SearchEvent; */ @Named -@SessionScoped +// @SessionScoped +@RequestScoped public class CustomSearchController implements Serializable { private static final long serialVersionUID = 1L; diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/datev/DatevCargosoftImportAdapter.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/datev/DatevCargosoftImportAdapter.java index e2bab9d..7ceca3d 100644 --- a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/datev/DatevCargosoftImportAdapter.java +++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/datev/DatevCargosoftImportAdapter.java @@ -31,7 +31,6 @@ import org.imixs.workflow.exceptions.PluginException; import org.imixs.workflow.exceptions.ProcessingErrorException; import org.imixs.workflow.exceptions.QueryException; -import com.alexanderlogistics.CargosoftSplitAdapter; import com.alexanderlogistics.InvoiceUtil; import com.alexanderlogistics.KreditorDebitorService; @@ -140,39 +139,35 @@ public class DatevCargosoftImportAdapter implements SignalAdapter { throws AdapterException, PluginException { logger.info("...parse datev file import..."); + // Set default values + INITIAL_MODEL_VERSION = "rechnungsausgang-de-1.0"; + INITIAL_TASK_ID = 5001; + INITIAL_EVENT_ID = 980; - // read the cargosoft import options - // ("rechnungsausgang-de-1.0").task(5001).event(980); + // Try to read the optional cargosoft import options... ItemCollection evalItemCollection = workflowService.evalWorkflowResult(event, "datev-cargosoft-import", - workitem, - false); - - if (evalItemCollection == null) { - throw new PluginException(CargosoftSplitAdapter.class.getSimpleName(), CONFIG_ERROR, - "missing datev-cargosoft-import configuration in model event - please check model configuration"); + workitem, false); + if (evalItemCollection != null) { + INITIAL_MODEL_VERSION = evalItemCollection.getItemValueString("model"); + if (INITIAL_MODEL_VERSION.isEmpty()) { + INITIAL_MODEL_VERSION = "rechnungsausgang-de-1.0"; // set default + } + INITIAL_TASK_ID = evalItemCollection.getItemValueInteger("task"); + if (INITIAL_TASK_ID == 0) { + INITIAL_TASK_ID = 5001; // set default + } + INITIAL_EVENT_ID = evalItemCollection.getItemValueInteger("event"); + if (INITIAL_EVENT_ID == 0) { + INITIAL_EVENT_ID = 980; // set default + } } - INITIAL_MODEL_VERSION = evalItemCollection.getItemValueString("model"); - if (INITIAL_MODEL_VERSION.isEmpty()) { - INITIAL_MODEL_VERSION = "rechnungsausgang-de-1.0"; - } - INITIAL_TASK_ID = evalItemCollection.getItemValueInteger("task"); - if (INITIAL_TASK_ID == 0) { - INITIAL_TASK_ID = 5001; - } - INITIAL_EVENT_ID = evalItemCollection.getItemValueInteger("event"); - if (INITIAL_EVENT_ID == 0) { - INITIAL_EVENT_ID = 980; - } - try { - // Datei einlesen List log = readData(workitem); workitem.setItemValue("import.log", log); } catch (ModelException e) { throw new AdapterException(PluginException.class.getSimpleName(), DatevImportAdapter.DATEV_IMPORT_ERROR, "Failed to import datev data!", e); - } return workitem; }