2017 June Release

Fabasoft app.ducx 2016 June ReleasePermanent link for this heading

Find out more about new features and improvements in the Fabasoft app.ducx 2016 June Release.

Keyword “obsolete” in Enumeration TypesPermanent link for this heading

The obsolete keyword can be used to disable enumeration entries. In the user interface, drop-down lists for enumeration values do not contain disabled entries.

Example

objmodel APPDUCXSAMPLE@200.200
{
  // Enumeration type consisting of four enumeration items with
  // exp
licitly assigned integer values, some of them disabled
  enum ShipType {
    ST_DESTROYER = 100,
    ST_CRUISER = 200,
    obsolete ST_BATTLESHIP = 300,
    obsolete ST_SUBMARINE = 400
  }

}

In rare cases it is necessary to specify some other attributes for the type. This is accomplished by using generic assignments before the block of enumeration values.

Example

objmodel APPDUCXSAMPLE@200.200
{
  // Enumeration type consisting of four enumeration items with
  // exp
licitly assigned integer values and some generic assignments before
  enum ShipType {
    typemultiple = true;
    typelistunique = true;

    ST_DESTROYER = 100,
    ST_CRUISER = 200,
    ST_BATTLESHIP = 300,
    ST_SUBMARINE = 400
  }

}

Defining an Expression PropertyPermanent link for this heading

An expression property is a string list property that stores the expression and has additional information regarding the evaluation context.

Example

objmodel APPDUCXSAMPLE@200.200
{
  import COOSYSTEM@1.1;

  class StatusLog : BasicObject {
    // Expression property
    expression logexpr {
      scope = PARSCOPE_OBJECT;
      type = BOOLEAN;
      parameters<actparname, actparmod, actpartype, actparretval> = {
         { “info”, PARMOD_OUT, STRING, true }
      }
  }
}

Defining an Access Control ListPermanent link for this heading

Syntax

acl reference {
  ace {

    audience = {

    };

    rights = [];

  }

}

Access control lists (ACLs) are used to specify the access rights of a user to a given object. An access control list can assign different lists of access types to different user groups.

The acl keyword is used to define an access control list. It must be followed by a reference and curly braces.

Within an acl block, there is a sequence of ace, specifying a unique set of access rights to a list of user groups, called audience. In the resulting access control list there is a line for each user group and the specified access types.

Each audience entry can define something that depends on the user, on a group the user belongs to and on the domain where the user is located. These three possibilities of specifying the user are modelled with the keywords user, group and domain. For each of these keywords, there are different possibilities to define the matching user group.

If one or more of the keywords are omitted, the line is filled up with default values.

Example

orgmodel APPDUCXSAMPLE@200.200
{
  import COOSYSTEM@1.1;

  acl SampleACL {
    ace {

      audience = {

         user SysAdm;

      };

      rights = [AccTypeRead, AccTypeChange];

    }

    ace {

      audience = [

        {

           user ACLUSER_DEFAULT;

           group ACLGROUP_OWNER if parent;

           domain ACLDOMAIN_DEFAULT;

        },

        {

        }

      ];

      rights = [AccTypeRead];

    }

  }
}

Audience elements can also be declared as constants and reused in all ACLs.

Example

orgmodel APPDUCXSAMPLE@200.200
{
  import COOSYSTEM@1.1;

  const audience[] AdministrationAudience = {

    user = SyAdm;

  }

  acl SampleACL {
    ace {

      audience = AdministrationAudience;

      rights = [AccTypeRead, AccTypeChange];

    }

  }
}

Expression TesterPermanent link for this heading

The expression tester works on all files in the project, either for expression files with the extension ducx-xp or inside of any expression element.

The expression can be executed by the current web service by selecting “Run as” > “Expression” from the context menu.

The result of the expression is sent to the expression tester console.

To use short references imports have to be done as in all other domain specific files, the context is the current project.

Extending PropertiesPermanent link for this heading

Extending properties can now be done by using the keyword extend, followed by the property. Using this syntax, object pointer properties can be extend in a simple way.

Example

userinterface APPDUCXSAMPLE@200.200
{
  import COOSYSTEM@1.1;
  import COODESK@1.1;
  import COOATTREDIT@1.1;
  import COOSEARCH@1.1;
  import COOTC@1.1001;

  extend property admobjchildren {
    allow {
      MySimpleClass;

    }
  }
}

Multiple Use Cases in Form AssignmentsPermanent link for this heading

The forms binding can now specify more than one use case in a single binding block.

Example

userinterface APPDUCXSAMPLE@200.200
{
  import COOSYSTEM@1.1;
  import COODESK@1.1;
  import COOATTREDIT@1.1;
  import COOSEARCH@1.1;
  import COOTC@1.1001;

  extend class Order {
    forms {
      OpenObject, ReadObjectAttributes, EditObjectAttributes {
        OrderAdminForm;
        OrderUserForm;
      }
      SearchObjects {
        OrderSearchForm;
      }
      ObjectConstructor {
        OrderCreateForm;
      }
    }
  }
}

Conditions in Form AssignmentsPermanent link for this heading

The condition in forms bindings can now specified by using the condition keyword.

Example

userinterface APPDUCXSAMPLE@200.200
{
  import COOSYSTEM@1.1;
  import COODESK@1.1;
  import COOATTREDIT@1.1;
  import COOSEARCH@1.1;
  import COOTC@1.1001;

  extend class Order {
    forms {
      OpenObject, ReadObjectAttributes, EditObjectAttributes {
        OrderAdminForm {

          condition = expression {

            coort.GetCurrentUserRolePosition() == #SysAdm;

          }

        }

        OrderUserForm;
      }
    }
  }
}

Additional Quick FixesPermanent link for this heading

There are some additional quick fixes available:

  • Quick fix for cast from multiple to single
  • Quick fix to declare variables with the correct type

Additional Object Model TemplatesPermanent link for this heading

There are some additional templates for the object model:

  • New operation in a new web service
  • New operation in an existing web service
  • New friendly URL

Additional WarningsPermanent link for this heading

There are some additional warnings generated:

  • Found cyclic dependency between <swca> and <swcb>
    This warning is issued if an added software component has dependencies to the current software component.
  • Invalid assignment: should not set property <property>
    This warning is issued if assignments to component objects cannot be marked as changes of the current software component. These are either simple values or assignments of other software components.

Additional ErrorsPermanent link for this heading

There are some additional errors generated:

  • Resolving: <class> <object> cannot be used. Missing component: <swc>
    This error message is issued if there is not enough information to check the contents of an object pointer property because of a missing software component

New FormatterPermanent link for this heading

We use a new formatter to format the source code. The new features include

  • better performance
  • increased flexibility with fixed syntax elements
  • conditional formatting
  • tabular formats