@DeclareRoles(value="org.imixs.ACCESSLEVEL.MANAGERACCESS") @RunAs(value="org.imixs.ACCESSLEVEL.MANAGERACCESS") public class DatevWorkflowService extends Object
The import file must contain 2 header rows. The 1st row contains the object type, the 2nd row contains the filed names. *
The EJB reads a configuration entity with information how to assign a new object to a workflow model
to import datev data without assigne the data to a
workflow model.| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIG_ERROR |
static String |
DATEV_CONFIGURATION |
static int |
EVENT_FAILED |
static int |
EVENT_START |
static int |
EVENT_SUCCESS |
static String |
FILE_NOT_FOUND |
static String |
INVOICE_UPDATE |
static String |
IO_ERROR |
static String |
ISO8601_FORMAT_DATE |
static String |
ISO8601_FORMAT_DATETIME |
static String |
ITEM_DATEV_CLIENT_ID |
static String |
ITEM_DATEV_CONSULTANT_ID |
static String |
ITEM_DATEV_FISCAL_START |
static String |
ITEM_INITIAL_TASK |
static String |
ITEM_MODEL_VERSION |
static String |
LINK_PROPERTY |
static String |
MODEL_ERROR |
static String |
PROCESSING_ERROR |
static String |
REPORT_ERROR |
static String |
TYPE |
| Constructor and Description |
|---|
DatevWorkflowService() |
| Modifier and Type | Method and Description |
|---|---|
List<org.imixs.workflow.ItemCollection> |
findAllConfigurations()
returns a list of all existing datev Configurations
|
org.imixs.workflow.ItemCollection |
findWorkitemByName(String sKey)
This method finds a workitem by the attribute 'txtName'
|
org.imixs.workflow.ItemCollection |
importEntities(org.imixs.workflow.ItemCollection configuration,
int start,
int maxcount)
This method imports all entities from a csv file.
|
void |
init()
initial setup the magento client implementation
|
org.imixs.workflow.ItemCollection |
loadConfiguration(String id)
This method loads a datev configuration.
|
static void |
logMessage(String message,
org.imixs.workflow.ItemCollection configuration,
org.imixs.workflow.ItemCollection workitem)
Creates a new log entry stored in the item _scheduler_log.
|
List<String> |
parseFieldList(String data)
This method parses a DATEV field description (first line of the csv file)
|
void |
processInvoices(org.imixs.workflow.ItemCollection datevExport,
List<org.imixs.workflow.ItemCollection> invoices,
org.imixs.workflow.ItemCollection event,
org.imixs.workflow.ItemCollection configuration)
This method expects a list of Subprocess definitions.
|
void |
processSingleWorkitem(org.imixs.workflow.ItemCollection aWorkitem)
This method process a single workIten in a new transaction.
|
org.imixs.workflow.ItemCollection |
readEntity(String data,
List<String> fieldnames)
This method creates a ItemCollection from a csv file data line
|
public static final String DATEV_CONFIGURATION
public static final int EVENT_START
public static final int EVENT_SUCCESS
public static final int EVENT_FAILED
public static final String INVOICE_UPDATE
public static final String LINK_PROPERTY
public static final String ITEM_MODEL_VERSION
public static final String ITEM_INITIAL_TASK
public static final String ITEM_DATEV_CLIENT_ID
public static final String ITEM_DATEV_CONSULTANT_ID
public static final String ITEM_DATEV_FISCAL_START
public static final String REPORT_ERROR
public static final String MODEL_ERROR
public static final String PROCESSING_ERROR
public static final String CONFIG_ERROR
public static final String IO_ERROR
public static final String FILE_NOT_FOUND
public static final String ISO8601_FORMAT_DATETIME
public static final String ISO8601_FORMAT_DATE
public static final String TYPE
@PostConstruct public void init()
public List<org.imixs.workflow.ItemCollection> findAllConfigurations()
public org.imixs.workflow.ItemCollection loadConfiguration(String id)
public org.imixs.workflow.ItemCollection findWorkitemByName(String sKey)
public org.imixs.workflow.ItemCollection importEntities(org.imixs.workflow.ItemCollection configuration,
int start,
int maxcount)
throws DatevException
configuration - - the configuration entity for the DATEV importstart - - optional start positioncount - - optional count (default =-1)org.imixs.workflow.exceptions.PluginExceptionDatevExceptionpublic List<String> parseFieldList(String data)
public org.imixs.workflow.ItemCollection readEntity(String data, List<String> fieldnames)
data - fieldnames - public void processSingleWorkitem(org.imixs.workflow.ItemCollection aWorkitem)
throws org.imixs.workflow.exceptions.AccessDeniedException,
org.imixs.workflow.exceptions.ProcessingErrorException,
org.imixs.workflow.exceptions.PluginException,
org.imixs.workflow.exceptions.ModelException
aWorkitem - org.imixs.workflow.exceptions.PluginExceptionorg.imixs.workflow.exceptions.ProcessingErrorExceptionorg.imixs.workflow.exceptions.AccessDeniedExceptionorg.imixs.workflow.exceptions.ModelExceptionpublic void processInvoices(org.imixs.workflow.ItemCollection datevExport,
List<org.imixs.workflow.ItemCollection> invoices,
org.imixs.workflow.ItemCollection event,
org.imixs.workflow.ItemCollection configuration)
throws org.imixs.workflow.exceptions.AccessDeniedException,
org.imixs.workflow.exceptions.ProcessingErrorException,
org.imixs.workflow.exceptions.PluginException,
org.imixs.workflow.exceptions.ModelException
The definition is expected in the following format (were regular expressions are allowed)
<item name="invoice_update">
<modelversion>1.0.0</modelversion>
<task>100</task>
<event>20</event>
</item>
The method runs wit TransactionAttributeType.REQUIRES_NEW so that in case than one of the invoices could not be processed all updates are rolled back.
This is important to avoid inconsistency during a DATEV exportdatevExport - - datev export workiteminvoices - - list of invoicesevent - - current datev export event containing the invoice_update
definition.org.imixs.workflow.exceptions.AccessDeniedExceptionorg.imixs.workflow.exceptions.ProcessingErrorExceptionorg.imixs.workflow.exceptions.PluginExceptionorg.imixs.workflow.exceptions.ModelExceptionorg.imixs.workflow.engine.plugins.SplitAndJoinPlugin.javapublic static void logMessage(String message, org.imixs.workflow.ItemCollection configuration, org.imixs.workflow.ItemCollection workitem)
message - configuration - Copyright © 2021 Imixs Software Solutions GmbH. All rights reserved.