2022 June Release

app.ducx Object Model LanguagePermanent link for this heading

This chapter outlines object model language features that are relevant for Folio developers.

Defining the Base ClassPermanent link for this heading

There is no restriction for defining the base class.

Updating an Existing Component Object InstancePermanent link for this heading

Syntax

update instance <reference> {
  ...
}

Using the update instance keywords, it is possible to update selected properties of an existing component object.

The update instance keywords must be followed by the reference or the object address of the component object to be updated. You can use generic assignment statements inside the update instance block to assign values to properties of the instance. The values of the referenced properties are replaced by the values inside the block.

Example

objmodel APPDUCXSAMPLE@200.200
{
  import COOSYSTEM@1.1;

  // Exclude exclusively order and invoice objects from the list of objects allowed
  // on the user's desk

  update instance objchildren {
    attrnotallowed<attrallclass, attrallcomponent> = {
      { Order, APPDUCXSAMPLE@200.200 },
      { Invoice, APPDUCXSAMPLE@200.200 }
    }
  }
}

Defining Proprietary Types and Property ClassesPermanent link for this heading

In some rare cases it is necessary to define special type instances. This is done by creating an instance of a type class. Properties using this type can be declared by using a special syntax, specifying the property class and the new type.

It is even possible to declare a special property class to be able to specifiy new property attributes. This class has to be a subclass of an existing property class.

The software component NUMERATOR@1.1001 uses this method to define special property types for key numerators. See the sample code how to use these.

Note: Using proprietary types and property definition classes might result in unexpected behavior of the generic UI controls, so the general advice is not to use this feature unless you are really familiar with the existing object model.

Example

objmodel APPDUCXSAMPLE@200.200
{
  import COOSYSTEM@1.1;
  import NUMERATOR@1.1001;

  /*
   * new type to be used in this project
   */
  instance TypeStringDef ZIPCODE {
  }

  /*
   * property definition class for properties of new type
   */
  class AttributeZipcodeDef : AttributeStringDef {
    programmatic = true;
    attrinitobjs<attrobjmember, attrinitobjval> = {
      { attrtype, ZIPCODE }
    }
    boolean digitsonly;
  }

  /*
   * class using the new property and type definitions
   */
  class Location {
    AttributeStringDef<ZIPCODE> anyzipcode;
    AttributeZipcodeDef<ZIPCODE> germanzipcode {
      digitsonly = true;
    }
    KeyNumerator<INTEGER> locnumber {
      KeyEntryList<NUMERATOR@1.1001:objclass, keyattrlist> = {
        { Location, objowner }
      }
    }
  }
}

Software Products, Software Editions and Software SolutionsPermanent link for this heading

Software products, software editions and software solutions are defined as instances within a Fabasoft app.ducx project. To export a software edition or software solution open the “File” menu, click “Export” and click “Fabasoft app.ducx” > “Extract Solution”. Click “Next”. Select a project that contains a software edition or software solution, specify a folder and click “Finish”. All files of the software edition or software solution are exported as a single ZIP file. Alternatively, an Apache Ant task can be used.

Note: Software products and software editions are for Fabasoft internal use only. Software solutions are designed for packaging software projects of Fabasoft partners and customers.

Available properties can be found in the following chapters.

Software ProductPermanent link for this heading

  • COOSYSTEM@1.1:prodname
    Defines the name of the software product.
  • COOSYSTEM@1.1:prodverscode
    Defines the version of the software product.
  • COOSYSTEM@1.1:prodstate
    Defines whether the software product is in development (PRODST_DEVELOP) or is in production (PRODST_INSTALLED).
  • COOSYSTEM@1.1:prodcopyright
    Defines the copyright of the software product.
  • COOSYSTEM@1.1:prodcopyrightbmp
    Defines the copyright image of the software product.
  • COOSYSTEM@1.1:prodcomponents
    Defines references of software components that are contained in the software product.
  • COOSYSTEM@1.1:proddemocomponents
    Defines references of demo software components that are contained in the software product.
  • COOSYSTEM@1.1:produnselcomponents
    Defines references of software components that are not installed by default when installing the software product.
  • COOSYSTEM@1.1:prodexcomponents
    Defines references of software components that are not contained any longer in the software product.
  • COOSYSTEM@1.1:prodadminfiles
    Contains administrative COO files.
  • COOSYSTEM@1.1:prodconfigexpr
    Contains app.ducx Expression Language to customize the Fabasoft Folio Domain.
  • COOSYSTEM@1.1:compcontents
    Contains content files like help files.

Software EditionPermanent link for this heading

  • COOSYSTEM@1.1:prodbaseprodobjs
    Contains the software products, the software edition is based on.
  • COOSYSTEM@1.1:editallowedbaseeditions
    Contains the references of allowed base software editions for this software edition. At least one of the allowed base software editions must be installed in the Fabasoft Folio Domain to be able to install this software edition. Leave this property empty, if the software edition should be a stand-alone edition instead of an add-on edition. Fabasoft Folio Compliance is a typical stand-alone edition and Fabasoft app.ducx is a typical add-on edition. Keep in mind that only one stand-alone software edition or software solution can be installed in a Fabasoft Folio Domain.
  • COOSYSTEM@1.1:proddemodata
    Contains the references of demo data objects.

Note: Additionally, properties of the software product are also available in a software edition.

Software SolutionPermanent link for this heading

  • COOSYSTEM@1.1:prodbaseprodobjs
    Contains the software products the software solution is based on.
  • COOSYSTEM@1.1:solallowedbaseeditions
    Contains the references of allowed base software editions for this software solution. At least one of the allowed base software editions must be installed in the Fabasoft Folio Domain to be able to install this software solution. Leave this property empty, if the software solution should be a stand-alone solution instead of an add-on solution. Keep in mind that only one stand-alone software edition or software solution can be installed in a Fabasoft Folio Domain.
  • COOSYSTEM@1.1:proddemodata
    Contains the references of demo data objects.

Note: Additionally, properties of the software product are also available in a software solution.

ExamplePermanent link for this heading

A solution may look like the following example.

Example

instance SoftwareSolution SolutionSample {
  prodname = "Sample Solution";
  prodverscode = 1005;
  prodstate = PRODST_INSTALLED;
  prodcopyright = file("resources/copyright.txt");
  prodcopyrightbmp = file("resources/copyright.bmp");
  prodadminfiles<ncname, nccont> = {
    { "baseaclcfg.coo",  file("resources/config/baseaclcfg.coo") },
    { "baseguicfg.coo",  file("resources/config/baseguicfg.coo") },
    { "baseseccfg.coo",  file("resources/config/baseseccfg.coo") }
  }
  proddemodata = "APPDUCXSAMPLE@200.200:DemoDataForSampleSolution";
}

instance DemoData DemoDataForSampleSolution {
  ddcustomizingexprs<ddename, ddeexpr> = {
    { "FolioDataExpression.exp",
      file("resources/imports/FolioDataExpression.exp")
    }
  }

  ddimports<ddidatasource, component> = {
    {
      file("resources/imports/FOLIOIMPORT_00_Group.csv"),
      APPDUCXSAMPLE@200.200
    }
  }
}