Events & Actions
As mentioned in our architecture overview , Scipio ERP relies on a event driven SOA (service oriented architecture). This means that it is possible to define events which will trigger an action. This concept is particularly useful if you want to chain events together. Say you want to create an invoice once an order is completed, then you could chain these to together using events.
Within Scipio ERP we seperate between different types of events:
- Entity Events
- Service Events
- Controller Events (Pre- & Post-Processors, or events triggered by a Requests)
- JobSandBox (Cron jobs: time scheduled tasks)
Depending on your usecase, you can either chain entity events together, or call a service depending on a request, or perform a daily clean-up of your database.Each of which are defined within XML files and are used to trigger actions. All but the Controller events are included through the ofbiz-component.xml, e.g.:
<?xml version="1.0" encoding="UTF-8"?>
<ofbiz-component name="mycomponent"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
<!-- Entity definitions -->
<entity-resource type="eca" reader-name="main" loader="main"
location="entitydef/eecas.xml"/>
<!-- Service definitions -->
<service-resource type="eca" loader="main"
location="servicedef/secas.xml"/>
<!-- JobSandbox -->
<entity-resource type="data" reader-name="seed-initial" loader="main"
location="data/ScheduledServices.xml"/>
<!-- Other definition -->
</ofbiz-component>#
Literature#
- OFBiz Beginners Guide
- Entity Events
- Service Events
- Controller Events (Pre- & Post-Processors, or events triggered by a Requests)
- JobSandBox (Time based cron jobs)
EECAs
Entity Event Condition Actions (EECAs) are actions that are triggered by events on the database level. You can …
SECAs
Just like entity event condition actions, services can be interlinked by the event condition action model. On …
Controller Events
Requests can be used as to trigger events. Like all request definitions, these are defined within the …
JobSandbox
JobSandbox works like a time-based scheduler. It is used to schedule Tasks periodically at fixed times, dates …