fixed customSerachController and DatevCargosoftImportAdapter
This commit is contained in:
parent
00566bbe62
commit
f76c21d1d5
3 changed files with 23 additions and 26 deletions
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
### 1.2.18 (Development)
|
### 1.2.18 (Development)
|
||||||
|
|
||||||
|
- Fix in Archiv Suche CustomSearchController.java - requestscoped
|
||||||
|
|
||||||
### 1.2.17
|
### 1.2.17
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import javax.enterprise.context.SessionScoped;
|
import javax.enterprise.context.RequestScoped;
|
||||||
import javax.enterprise.event.Observes;
|
import javax.enterprise.event.Observes;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Named;
|
import javax.inject.Named;
|
||||||
|
|
@ -51,7 +51,8 @@ import org.imixs.workflow.office.views.SearchEvent;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Named
|
@Named
|
||||||
@SessionScoped
|
// @SessionScoped
|
||||||
|
@RequestScoped
|
||||||
public class CustomSearchController implements Serializable {
|
public class CustomSearchController implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ import org.imixs.workflow.exceptions.PluginException;
|
||||||
import org.imixs.workflow.exceptions.ProcessingErrorException;
|
import org.imixs.workflow.exceptions.ProcessingErrorException;
|
||||||
import org.imixs.workflow.exceptions.QueryException;
|
import org.imixs.workflow.exceptions.QueryException;
|
||||||
|
|
||||||
import com.alexanderlogistics.CargosoftSplitAdapter;
|
|
||||||
import com.alexanderlogistics.InvoiceUtil;
|
import com.alexanderlogistics.InvoiceUtil;
|
||||||
import com.alexanderlogistics.KreditorDebitorService;
|
import com.alexanderlogistics.KreditorDebitorService;
|
||||||
|
|
||||||
|
|
@ -140,39 +139,35 @@ public class DatevCargosoftImportAdapter implements SignalAdapter {
|
||||||
throws AdapterException, PluginException {
|
throws AdapterException, PluginException {
|
||||||
|
|
||||||
logger.info("...parse datev file import...");
|
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
|
// Try to read the optional cargosoft import options...
|
||||||
// ("rechnungsausgang-de-1.0").task(5001).event(980);
|
|
||||||
ItemCollection evalItemCollection = workflowService.evalWorkflowResult(event, "datev-cargosoft-import",
|
ItemCollection evalItemCollection = workflowService.evalWorkflowResult(event, "datev-cargosoft-import",
|
||||||
workitem,
|
workitem, false);
|
||||||
false);
|
if (evalItemCollection != null) {
|
||||||
|
INITIAL_MODEL_VERSION = evalItemCollection.getItemValueString("model");
|
||||||
if (evalItemCollection == null) {
|
if (INITIAL_MODEL_VERSION.isEmpty()) {
|
||||||
throw new PluginException(CargosoftSplitAdapter.class.getSimpleName(), CONFIG_ERROR,
|
INITIAL_MODEL_VERSION = "rechnungsausgang-de-1.0"; // set default
|
||||||
"missing datev-cargosoft-import configuration in model event - please check model configuration");
|
}
|
||||||
|
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 {
|
try {
|
||||||
|
|
||||||
// Datei einlesen
|
// Datei einlesen
|
||||||
List<String> log = readData(workitem);
|
List<String> log = readData(workitem);
|
||||||
workitem.setItemValue("import.log", log);
|
workitem.setItemValue("import.log", log);
|
||||||
} catch (ModelException e) {
|
} catch (ModelException e) {
|
||||||
throw new AdapterException(PluginException.class.getSimpleName(), DatevImportAdapter.DATEV_IMPORT_ERROR,
|
throw new AdapterException(PluginException.class.getSimpleName(), DatevImportAdapter.DATEV_IMPORT_ERROR,
|
||||||
"Failed to import datev data!", e);
|
"Failed to import datev data!", e);
|
||||||
|
|
||||||
}
|
}
|
||||||
return workitem;
|
return workitem;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue