2017 June Release

Use case wrappersPermanent link for this heading

Syntax

usecase(prewrapper of ObjectCreate) {

  expression {

    …  

  }

)

usecase(postwrapper of ObjectCreate) {

  expression {

    …  

  }

)


Fabasoft app.ducx allows you to add a use case wrapper to an existing use case that is invoked whenever the wrapped use case is executed.

Note: Wrappers are only allowed if the software component has a 1.* domain ID (e.g. DUCXSAMP@1.1001).

Two types of use case wrappers are supported:

  • The prewrapper keyword is used to assign the action as prewrapper to an existing use case. A prewrapper is invoked before the wrapped use case.
  • The postwrapper keyword is used to assign the action to an existing use case. A postwrapper is invoked after the wrapped use case has been executed successfully.
  • The parameter list is derived from the wrapped use case, modifying the parameter mode to reflect the usage of the parameters:
  • For pre wrappers input parameters become inout parameter
  • For post wrappers output parameters become inout parameter

Cloud profile note: The definition of use case wrappers is not allowed.

Example

usecases APPDUCXSAMPLE@200.200
{
  import COOSYSTEM@1.1;

  VerifyContent(postwrapper of AttrContentSet) {
    variant Object {
      java = APPDUCXSAMPLE.Object.VerifyContent;
    }
  }

}