@DeclareRoles(value="org.imixs.ACCESSLEVEL.MANAGERACCESS") @RunAs(value="org.imixs.ACCESSLEVEL.MANAGERACCESS") public class MagentoSchedulerService extends Object
pending=1010
processing=1050
This example defines the a new order with the magento status 'pending' should
be mapped to a ProcessID 1010 in the imixs workflow model.
All new imported Workitems will be automatically processed with the
ActivityID 800.
If for a magento order an imixs workitem still exits but the item is not
equal then the Service will update the magento data and process the workiem
with also the ActivityID CTIVITY_MAGENTO_UPDATE=800.
NOTE: It is important that in every workflow state defined by the
txtOrderStatusMapping the ActiviyEntity ACTIVITY_MAGENTO_UPDATE=800. If not a
WorkflowException will be thrown during the import process.
The Magento ID will be stored in the proeprty 'txtName'. As this property
need to be unique the method. createMagentoID of the MagentoPlugin will be
used to generate an unique id.| Modifier and Type | Field and Description |
|---|---|
static String |
IMPORT_ERROR |
| Constructor and Description |
|---|
MagentoSchedulerService() |
| Modifier and Type | Method and Description |
|---|---|
List<org.imixs.workflow.ItemCollection> |
findAllConfigurations()
retruns a list of all existing Magento Shop Configurations
|
void |
importOrders(org.imixs.workflow.ItemCollection configuration)
This method imports all orders or update existing workitems.
|
void |
processImport(javax.ejb.Timer timer)
This is the method which processes the timeout event depending on the running
timer settings.
|
void |
processSingleWorkitem(org.imixs.workflow.ItemCollection aWorkitem)
This method process a single workIten in a new transaction.
|
org.imixs.workflow.ItemCollection |
saveConfiguration(org.imixs.workflow.ItemCollection configItemCollection)
This method saves the timer configuration.
|
List<org.imixs.workflow.ItemCollection> |
searchArtikel(String searchPhrase)
Liefert die trefferliste nach einem Suchbegriff für Artikel zurück
Wenn der suchbegriff eine zahl ist, dann wird das ERgebnis nach der ID
sortiert.
|
org.imixs.workflow.ItemCollection |
start(org.imixs.workflow.ItemCollection configItemCollection)
This Method starts the TimerService.
|
org.imixs.workflow.ItemCollection |
stop(org.imixs.workflow.ItemCollection config)
Cancels a running timer instance.
|
org.imixs.workflow.ItemCollection |
updateTimerDetails(org.imixs.workflow.ItemCollection configuration,
boolean reload)
Update the timer details of a running timer service.
|
public static final String IMPORT_ERROR
public List<org.imixs.workflow.ItemCollection> findAllConfigurations()
public org.imixs.workflow.ItemCollection saveConfiguration(org.imixs.workflow.ItemCollection configItemCollection)
throws org.imixs.workflow.exceptions.AccessDeniedException
org.imixs.workflow.exceptions.AccessDeniedExceptionpublic org.imixs.workflow.ItemCollection start(org.imixs.workflow.ItemCollection configItemCollection)
throws org.imixs.workflow.exceptions.AccessDeniedException,
ParseException
org.imixs.workflow.exceptions.AccessDeniedExceptionParseExceptionpublic org.imixs.workflow.ItemCollection stop(org.imixs.workflow.ItemCollection config)
throws Exception
Exceptionpublic org.imixs.workflow.ItemCollection updateTimerDetails(org.imixs.workflow.ItemCollection configuration,
boolean reload)
configuration - reload - - if true the confiugration will be reloaded from the
databasepublic void processImport(javax.ejb.Timer timer)
timer - public List<org.imixs.workflow.ItemCollection> searchArtikel(String searchPhrase)
searchPhrase - public void importOrders(org.imixs.workflow.ItemCollection configuration)
throws MagentoException
configuration - - the configuration entity for the magento shop systemorg.imixs.workflow.exceptions.PluginExceptionMagentoExceptionpublic 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.ModelExceptionCopyright © 2019 Imixs Software Solutions GmbH. All rights reserved.