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:
  1. List of possible tables and functions - GetCapabilities
  2. Table-Structure-DescribeFeatureType
  3. Data read GetFeature
  4. Data Filters
  5. Data Insert
  6. Data edit
  7. Data deletion
  8. and others base methods
It should represent single Customized Business Objects in XML Schema intended to be instantiate on Procesy5 storage database withi single table. If module is related to another Business Data Object than several modules should be separately created.

In scenario that Data Business Object Module will present structurized object based on

To be implemented and specified

Local Data Business Object Module Storage structure

Module Storage Definitions

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

Data Business Object Schema
Data Business Object Schema
Is file with XML-Schema with
  1. optionally applied Modelling Business Objects
    1. Derivation by extension of ComplexType or Derivation by restriction of ComplexType
    2. optionally Reference applied by Adding reference to Root Elements which are controlled by expected reference not occurs or expected reference occurs too much
  2. according to Namespace Binding to Storage with Namespace Binding Data Business Object to Local Storage
  3. 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 object
Top level schema example
<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"/>
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: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>

Ant Data Business Object Module structure

Project Tasks typical parameters

Properties

property name="uuid"
<property name="uuid" value="${uuid}"/> this contains UUID Unique System Call ID
property name="passwordBase64Basic"
<property name="passwordBase64Basic" value="${passwordBase64Basic}"/> this contains passwordBase64Basic User Password for API call
property name="php_session_id"
<property name="php_session_id" value="${php_session_id}"/> this contains php_session_id cookie

Instances, 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}&amp;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

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
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

GUI I/O Communication Tasks

Send GUI notifications Task