Ant Data Business Object Module (IN DEVELOPMENT)
Ant Data Business Object Module
Ant Data Business Object Module - inherits base options from Ant Data System Module
Typical options are applicable from Ant Data System Module
Ant Data Business Object Module - database/api communication default tasks
It is intend to provide Business Data Object Object relations
capabilities in Procesy5 APISystem API for such actions like:
- List of possible tables and functions - GetCapabilities
- Table-Structure-DescribeFeatureType
- Data read GetFeature
- Data Filters
- Data Insert
- Data edit
- Data deletion
- and others base methods
In scenario that Data Business Object Module will present structurized object based on
Standard Local Data Business Object
It is module intend to work on local storage ad standard data object by using default_db objects which are intend to be instanded in default database.
- It can use Defining Foreign Dictionary Relation Schema Specification to provide verifying using Data Relation Handling subsystem subsystem
- It can use Customized simpleType to verify correct data using Data Instances Handling subsystem subsystem
Remote Data Business Object
When Business Data Object is Namespace Binding Data Business Object to Remote Foreign Storagethis Module should provide
- Data Relation Handling subsystem by using definied in Defining Foreign Dictionary Relation Schema Specification or mainly in Namespace Binding Data Business Object to Remote Foreign Storage type Custom
- Provide Ant task sync tasks which should:
- execute
- produce Transaction for Data Insert
To be implemented and specified
Functionality
Provide ACL Process Controll
Optional can handle Procesy5 Process (BPMN) Database with assocaition info
about requesting user
Local Data Business Object Module Storage structure
Module Storage Definitions
Local Data Business Object Module Storage
Module should have its own data-storage file repository for provide such task
like Cron/Event jobs
Install path ROOT_INSTALL_DIR/schema/ant-object/default_db.in7_dziennik_koresp/(Business Object Name)/(Business Object
Name).xsd
and build_xml
Note: TODO (this is old localisation) Install path
ROOT_INSTALL_DIR/schema/ant-url_action/default_db.in7_dziennik_koresp/Storage
Storage for Local Sync Cache Info
For storage for Save Sync Cache Info
Storage for Local Template Triggers
It should install templates LocalTemplateTriggersfor execute them
easily when using this Module
Storage for Foreign Template Triggers
It should not delete some existient Foreign Modules Template Triggers and use
them in expected execute template order
Local Data Business Object Module Storage file structure
Local Data Business Object Module Storage file structure
This describes Local Data Business Object Module Storage file structure
Note: Local Data Business Object Module Storage is referenced in
Local Data Business Object Module Storage structure in main
glossary.
Data Business Object Schema
Data Business Object Schema
Is file with XML-Schema with
- optionally applied Modelling Business Objects
- Derivation by extension of ComplexType or Derivation by restriction of ComplexType
- optionally Reference applied by Adding reference to Root Elements which are controlled by expected reference not occurs or expected reference occurs too much
- according to Namespace Binding to Storage with Namespace Binding Data Business Object to Local Storage
- contaning definition of one Namespace Object Instance Table Definition
Note: example
xmlns:default_db__x3A__CRM_PROCES="https://biuro.biall-net.pl/wfs/default_db/table/CRM_PROCES.xsd
is using the following informations: xmlns:default_db__x3A__CRM_PROCES="https://biuro.biall-net.pl/wfs/default_db/table/CRM_PROCES.xsd
example Ant Data Business Object Module Schema File
This is example file name
TestPermsAnt.xsd
defining TestPermsAnt
objectTop level schema
example
default
ComplexType for applying
Modelling Business Object describing also
tables structure for Procesy5 Local Storage database to by supported for this Business Data Object<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml"
xmlns:p5="https://biuro.biall-net.pl/wfs"
xmlns:default_db="https://biuro.biall-net.pl/wfs/default_db"
xmlns:default_objects="https://biuro.biall-net.pl/wfs/default_objects"
elementFormDefault="qualified" targetNamespace="https://biuro.biall-net.pl/wfs/default_objects"
version="1.0.0">
<xsd:import namespace="http://www.opengis.net/gml"
schemaLocation="https://biuro.biall-net.pl/dev-pl/se-master/schema/gml/2.1.2/feature.xsd"/>
<xsd:complexType name="TestPermsAntType">
<xsd:complexContent>
<xsd:extension base="gml:AbstractFeatureType">
<xsd:sequence>
<xsd:element minOccurs="1" maxOccurs="1" name="ID" type="xsd:integer"
nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="L_APPOITMENT_USER"
type="xsd:string" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="KATALOG_LINK" type="p5:www_link"
nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="WWW" type="p5:www_link"
nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="ADM_ADMIN_LEVEL"
type="xsd:string" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="ADM_PASSWD" type="xsd:string"
nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="A_STATUS" type="xsd:string"
nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="EMAIL" type="xsd:string"
nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="ADM_NAME" type="xsd:string"
nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="PARENT_ID" type="xsd:integer"
nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="OPIS" type="xsd:string"
nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="the_geom"
type="gml:PolygonPropertyType" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="A_ADM_COMPANY" type="xsd:string"
nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="A_CLASSIFIED" type="xsd:string"
nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="A_RECORD_CREATE_AUTHOR"
type="xsd:string" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="A_RECORD_CREATE_DATE"
type="xsd:string" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="A_RECORD_UPDATE_AUTHOR"
type="xsd:string" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="A_RECORD_UPDATE_DATE"
type="xsd:string" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="test_date" type="xsd:date"
nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="test_datetime"
type="xsd:dateTime" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="test_price" type="p5:price"
nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="test_time" type="xsd:string"
nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="__instance">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="instance_name"
type="default_objects:TestPerms__instanceType"/>
<xsd:element name="instance_type" type="xsd:string"/>
<!-- 'instance', 'waiting', 'derived', 'matching' -->
<xsd:element name="create_author" type="xsd:string"/>
<xsd:element name="create_date" type="xsd:dateTime"/>
<xsd:element name="update_author" type="xsd:string"/>
<xsd:element name="updage_date" type="xsd:dateTime"/>
<xsd:element name="verified" type="xsd:integer"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element minOccurs="0" maxOccurs="1" name="__backRef">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="default_db__x3A__CRM_PROCES"
type="default_objects:TestPerms__backRefType"/>
<xsd:element name="default_db__x3A__CRM_WSKAZNIK"
type="default_objects:TestPerms__backRefType"/>
<xsd:element name="default_db__x3A__BUILDINGS"
type="default_objects:TestPerms__backRefType"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="instance" type="default_objects:TestPerms__instanceType"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
Root Schema Element<xsd:element name="TestPermsAnt" type="default_objects:TestPermsAntType"
substitutionGroup="gml:_Feature"/>
Data Instances Handling subsystem information
structure <xsd:simpleType name="TestPerms__instanceType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="TestPerms"/>
<xsd:enumeration value="TestPermsDoUzgodnienia"/>
<xsd:enumeration value="TestPermsUzgodniony"/>
<xsd:enumeration value="TestPermsOdrzucony"/>
<xsd:enumeration value="TestPermsAktywny"/>
</xsd:restriction>
</xsd:simpleType>
Note: To
be verified
Timestamp handling and Modification History handling with also Data Relation Handling subsystem information
structure<xsd:complexType name="TestPerms__backRefType">
<xsd:sequence>
<xsd:element name="primaryKey" type="xsd:string"/>
<xsd:element name="create_author" type="xsd:string"/>
<xsd:element name="create_date" type="xsd:dateTime"/>
<xsd:element name="update_author" type="xsd:string"/>
<xsd:element name="updage_date" type="xsd:dateTime"/>
</xsd:sequence>
</xsd:complexType>
Data Business Object Module build.xml
this file contains main exectution file interpreated by System API as Procesy5 API-Extension modules to be
executed when Association By Business Object was set Procesy5 ProcessEditor and than
saved to Procesy5 Process (BPMN) Database
Ant Data Business Object Module structure
Project Root element
project attributes
INPUT
This property is set by STDIN input by System API calls
basedir
basedir="."
name
example:
name="test default_db/TEST_PERMS"
according to Namespace Object Instance Table DefinitionProject Tasks typical parameters
Properties
property name="uuid"
<property name="uuid" value="${uuid}"/>
this contains
UUID Unique System Call IDproperty name="passwordBase64Basic"
<property name="passwordBase64Basic"
value="${passwordBase64Basic}"/>
this contains
passwordBase64Basic User Password for API callproperty name="url"
<property name="url" value="${url}"/>
this contains
API URL conforming to Adresses and versions of APIproperty name="php_session_id"
<property name="php_session_id" value="${php_session_id}"/>
this contains php_session_id cookieproperty name="webRootUrl
<property name="webRootUrl" value="${webRootUrl}"/>
this
contains webRootUrl which is URI for access Local Data Business Object Module Storage from externalInstances, references and triggers handling structure
xsd:simpleType name="TestPerms__instanceType"
xsd:complexType name="TestPerms__backRefType"
xsd:complexType name="TestPerms__triggersType"
WFST API Call Tasks
WFST API Call Tasks
WFST API Call Tasks are default tasks to be parsed by System API
target name="DescribeFeatureType"
This task should respond with XML-Schema od current Business Data Object.
example:
<echo message="OUTPUT__TYPE__XML"/>
<echo message="OUTPUT__START"/>
<echoxml>
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:gml="http://www.opengis.net/gml"
xmlns:p5="https://biuro.biall-net.pl/wfs"
xmlns:default_db="https://biuro.biall-net.pl/wfs/default_db"
xmlns:default_objects="https://biuro.biall-net.pl/wfs/default_objects"
xmlns:p5_objects="https://biuro.biall-net.pl/wfs/objects"
elementFormDefault="qualified"
targetNamespace="https://biuro.biall-net.pl/wfs/default_objects"
version="1.0.0">
<xsd:import namespace="http://www.opengis.net/gml" schemaLocation="https://biuro.biall-net.pl/dev-pl/se-master/schema/gml/2.1.2/feature.xsd"/>
<!--typeName 'p5_default_db:TEST_PERMS'-->
<xsd:complexType name="TEST_PERMSType">
<xsd:complexContent>
<xsd:extension base="gml:AbstractFeatureType">
<xsd:sequence>
<xsd:element minOccurs="1" maxOccurs="1" name="ID" type="xsd:integer" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="L_APPOITMENT_USER" type="xsd:string" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="KATALOG_LINK" type="p5:www_link" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="WWW" type="p5:www_link" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="ADM_ADMIN_LEVEL" type="xsd:string" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="ADM_PASSWD" type="xsd:string" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="A_STATUS" type="xsd:string" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="EMAIL" type="xsd:string" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="ADM_NAME" type="xsd:string" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="PARENT_ID" type="xsd:integer" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="OPIS" type="xsd:string" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="the_geom" type="gml:PolygonPropertyType" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="A_ADM_COMPANY" type="xsd:string" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="A_CLASSIFIED" type="xsd:string" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="A_RECORD_CREATE_AUTHOR" type="xsd:string" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="A_RECORD_CREATE_DATE" type="xsd:string" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="A_RECORD_UPDATE_AUTHOR" type="xsd:string" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="A_RECORD_UPDATE_DATE" type="xsd:string" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="test_date" type="xsd:date" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="test_datetime" type="xsd:dateTime" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="test_price" type="p5:price" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="1" name="test_time" type="xsd:string" nillable="true"/>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="__instance">
<xsd:sequence>
<xsd:element name="instance_name" type="default_objects:TestPerms__instanceType"/>
<xsd:element name="instance_type" type="xsd:string"/><!-- 'instance', 'waiting', 'derived', 'matching' -->
<xsd:element name="create_author" type="xsd:string"/>
<xsd:element name="create_date" type="xsd:dateTime"/>
<xsd:element name="update_author" type="xsd:string"/>
<xsd:element name="updage_date" type="xsd:dateTime"/>
<xsd:element name="verified" type="xsd:integer"/>
</xs:sequence>
</xsd:element>
<xsd:element minOccurs="0" maxOccurs="1" name="__backRef">
<xsd:sequence>
<xsd:element name="default_db__x3A__CRM_PROCES" type="default_objects:TestPerms__backRefType"/>
<xsd:element name="default_db__x3A__CRM_WSKAZNIK" type="default_objects:TestPerms__backRefType"/>
<xsd:element name="default_db__x3A__BUILDINGS" type="default_objects:TestPerms__backRefType"/>
</xsd:sequence>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="instance" type="default_objects:instanceType"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="TEST_PERMS" type="default_objects:TEST_PERMSType" substitutionGroup="gml:_Feature"/>
<xsd:simpleType name="TestPerms__instanceType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="TestPerms"/>
<xsd:enumeration value="TestPermsDoUzgodnienia"/>
<xsd:enumeration value="TestPermsUzgodniony"/>
<xsd:enumeration value="TestPermsOdrzucony"/>
<xsd:enumeration value="TestPermsAktywny"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="TestPerms__backRefType">
<xsd:sequence>
<xsd:element name="primaryKey" type="xsd:string"/>
<xsd:element name="create_author" type="xsd:string"/>
<xsd:element name="create_date" type="xsd:dateTime"/>
<xsd:element name="update_author" type="xsd:string"/>
<xsd:element name="updage_date" type="xsd:dateTime"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</echoxml>
<echo message="OUTPUT__END"/>
target name="GetFeature" description="URL_TASK Target GetFeature"
This contains task to be executed by call from System API when executed Data read GetFeature requests.
This is example code to proxy-api
support this operation to Procesy5 storage database for retrieve data from
Namespace Object Instance Table Definition
<target name="GetFeature" description="URL_TASK Target GetFeature">
<echo message="FETCHING '${url}' ..."/>
<exec executable="curl" outputproperty="wfs_output" errorproperty="wfs_error" resultproperty="wfs_result">
<arg line="--cookie 'PHPSESSID=${php_session_id}' '${url}&REQUEST=GetFeature'"/>
</exec>
<echo message="OUTPUT__TYPE__XML"/>
<echo message="OUTPUT__START"/>
<echo message="${wfs_output}"/>
<echo message="webRootUrl"></echo>
<echo message="${webRootUrl}"></echo>
<echo message="OUTPUT__END"/>
<echo message="RESULT__START"/>
<echo message="${wfs_result}"/>
<echo message="RESULT__END"/>
<echo message="ERROR__START"/>
<echo message="${wfs_error}"/>
<echo message="ERROR__END"/>
</target>
Install Tasks
Install Storage Tasks
Install Local Template Triggers
Installs template triggers Storage for Local Template Triggers
Install Foreign Template Triggers
It should make action to create expected another related And Data Business
Object Module - create dir and its folder Storage for Foreign Template Triggers according to Foreign Template Trigger
Local Database Storage Install Tasks
Local Storage Get Structure Task
Local Storage Add Structure Task
Local Storage Modify Restrict Structure TaskLocal Storage Modify Restrict Structure Task
Local Storage Modify Extend Structure Task
Local System Install Tasks
System Modules Install Task
System Modules Update Task
Resources Install Task
Resources Update Task
Insert some Cron / Event jobs
Supply information about certain expected exec of this module to be run for do
Actions
Data Modify/Copy install task
Update - Modify Data Before Modify Restrict StructureUpdate - Modify Data Before Modify Restrict Structure (strike)
Task have
to Modify data before Local Storage Modify Restrict Structure TaskLocal Storage Modify Restrict Structure Task to allow it
to be done (strike)
Install - Modify Data
Module have to read information from object definition about needed template
to produce Transaction to API to be evaluated. It can be several actions to be done
for instance - ReadFeature, apply template to find exact records to modify, which
produce Modify Transaction to be evaluated.
Install - Copy Data
Like Modify Data, but it is intended to read some data from another objects
and save to this module. Such actions could be needed in case of never version of
object which is much different from previous one, which is planned to be
disabled.
Rebuild references
Can check correctness of system #ref from child or parent side
Rebuild instances info
Can check for correct instances based on filters or also aliased instances if
are correct
Note: To be specified
which instances could be aliased togeher
Cron/Event Job Tasks
Ant task sync
This task should allow execute sync process for schema bind to foreign
namespace, which ant should simulate data as local. For such scenario it should use
correct method and template to represent it to API correctly.
Sync Tasks
Get All External Data
When first time used mainly. Shouls produce Data Insert
Save Sync Cache Info
Should save to Storage for Local Sync Cache Info:
- Last Local Timestamp Timestamp handling
- Last Remote Timestamp Configuring Timestamp Element
- Last Local Primary Key key Primary xs:unique
- Last Remote Primary Key Setting unique Primary Key
Get Increment Data
When used Get All External Data.
Should:
- use Storage for Local Sync Cache Info for retrieve
- Remote Data
- Local Data
- send data to Parse Increment Data
Parse Increment Data
Should get data from Get Increment Data and
- For new
- Make Transactions Data Insert to Remote
- Call Sync Data Tasks
- For not conflict modified
- For conflict
- If ok
- Call Save Sync Cache Info
- If fail
- Rollback Data for changed records
Sync Data Tasks
External to Local Aliases for Conflicted Objects
Call Alias Instance od Confliced Remote Synced Objects to
allow User intervention for fix problems
External to Local Input Task
This task should expect Get All External Data or
Parse Increment Data
External to Local Modify Task
This should Make Transactions Data edit from Parse Increment Data