Init form container interface

  1. Interface object representing the Init Form container will be known in JavaScript as window.wzp.container.
  2. The Init form container object must have the following fields and methods:
    • string baseUri
    • Base URI of web site containing services required by form, namely: OData and Process control services.

    • string locale
    • Current locale of the client (e.g. en-GB, da-DK).

    • string processDefinition
    • Global unique identifier of definition of process to be started.

    • object context
    • Description of the context where process to be started.

      • string register
      • name of the context entity register.

      • string key
      • identifier of the context entity within the register.

      • string[] tags
      • additional descriptors of the context.

    • void openItemContent (string register, string systemKey, string title)
    • Opens item`s content in an app/client responsible for showing the content. Where register is SOM register.

    • void openItemMetadata (string register, string systemKey)
    • Opens item`s metadata in an app/client responsible for showings the metadata. Where register is the SOM register.

    • void close (bool success, string processid)
    • Tells the container that init form should be closed, supplies overall result (success parameter) and identifier of newly started process.

    • object notifications
    • Service providing the unified interface for displaying and further handling of notifications.

      • void info (string message) tells user something important.
      • void error (string message) notifies user about error.
      • void warning (string message) warns user about something.
      • bool confirm (string message) asks user to make a binary decision.
    • void contentLoaded (bool success)
    • Informs container that form and its content was loaded successfully or not.

    • bool showTitle (string message)
    • Method that allow container to show form Title on the level of container presentation. Should return true , is container will show title, or return false , if showing title is responsibility of form itself. Message is form Title (already localized).

    • bool showHelp (string url)
    • Method that allows container to open help url on the level of container presentation. Url is localized. Should return true, is container want to show help itself, or return false, if showing help is responsibility of form itself.

    • object formats
    • Description of different formats. Allows container to customize visual presentation of data. If not defined corresponding formats will be taken from localization resources of basis package. Date\Time format should use JQuery Date\Time specification. (See below)

      • string longdate
      • definition of Long Date format

      • string shortdate
      • definition of Short Date format

      • int timezone
      • definition of client timezoneoffset value in minutes. TimezoneOffset should be calculated as UTC-localtime, in minutes.

      • string shorttime
      • definition of Short Time format

      • string longtime
      • definition of Long Time format

    • string odataUri
    • URI of oData service required by form. If not provided, default baseUri property is used as fallback.

      Example:

      http(s)://[endpoint]/odata/

    • string processUri
    • URI of Process service required by form. If not provided, default baseUri property is used as fallback.

      Example:

      http(s)://[endpoint]/Process.Process.svc/

    • object AuthorizationHeader
    • The AuthorizationHeader object must contain an Authorization property with the token for OAuth authentication.

      Example:

      AuthorizationHeader

      {

      Authorization: "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6Ijg3NTlhMmViNDEwZjI1NTE1ODMwZWQxZWU2MDhlZmY2IiwidHlwIjoiSldUIn0.eyJuYmYiOjE1OTM2MDM1NTUsImV4cCI6MTU5MzYwNzE1NSwiaXNzIjoiaHR0cDovL2RiMDEvb2F1dGgyIiwi"

      }