Packages basics

Beginner
PDF

Any Creatio product is a set of packages.

A Creatio package is a collection of configuration elements that implement certain functionality. On the file system level, packages are directories with subdirectories and files.

Package classification 

  • Simple packages:

    • – preinstalled packages. They are part of Creatio. Predefined packages are available in the workspace by default. They cannot be modified.

      Preinstalled package types:

    • – custom packages. They are created by other Creatio users. Custom packages are locked in the version control system. They cannot be modified.
    • – custom packages. They are created by the current user or retrieved from the version control system. They can be modified.
  • Project package is a package that enables you to develop functionality similarly to a standard C# project. Learn more: Project package.
  • Assembly package is a package whose source and automatically generated code is compiled into a separate assembly. Assembly packages are available in Creatio version 7.18.3 and later. Creatio IDE depicts assembly packages as custom packages (). Read more: Assembly package.

Compare Creatio packages using the table below.

Creatio package comparison
Links to other packages
Package configuration elements
File content
Development in Creatio IDE
Code compilation path
Package
+
+
+
+
...\Terrasoft.WebApp\Terrasoft.Configuration\Terrasoft.Configuration.dll
Project package
+

(use an external IDE)

For .NET Framework: ...\Terrasoft.WebApp\Terrasoft.Configuration\Pkg\[Package name]\Files\Bin\[Package name].dll

For .NET Core: ...\Terrasoft.WebApp\Terrasoft.Configuration\Pkg\[Package name]\Files\Bin\netstandard\[Package name].dll

Assembly package
+
+
(with restrictions)
+
+

For .NET Framework: ...\Terrasoft.WebApp\Terrasoft.Configuration\Pkg\[Package name]\Files\Bin\[Package name].dll

For .NET Core: ...\Terrasoft.WebApp\Terrasoft.Configuration\Pkg\[Package name]\Files\Bin\netstandard\[Package name].dll

This article covers simple packages.

To expand or modify functionality, install the package with the desired features. Development of additional functionality or modification of the existing functionality is only possible with custom packages.

Primary packages 

Creatio's primary packages include packages available in all products.

Primary packages
Package name
Description
Base Base schemas of the primary objects and Creatio sections, as well as connected objects, pages, process schemas, etc.
Platform Modules and pages of the Section Wizard, List Designer, Dashboard Designer, etc.
Managers Client modules of the schema managers.
NUI Functionality connected to the Creatio UI.
UIv2
DesignerTools Schemas of designers and their elements.
ProcessDesigner Process Designer schemas.

[Custom] package 

The Section Wizard and Detail Wizard create various schemas that must be saved to a custom package. A fresh Creatio installation has no packages open for modification with the exception of the Custom preinstalled package. You can add schemas to this package manually or using the Wizards.

The Custom package specifics:

  • The Custom package cannot be added to the version control system. As such, you can transfer the package's schemas to a different environment only using the export and import functionality.
  • Unlike the other preinstalled packages, the Custom package cannot be exported to the file system via the WorkspaceConsole utility.
  • The Custom package has all of the other preinstalled packages as dependencies. If you create or install a custom package, the new package will become a dependency for the Custom package automatically. Therefore, always place the Custom package the last in the package hierarchy.
  • Custom packages cannot have the Custom package as a dependency.

We recommended using the Custom package if:

  • You are not going to transfer changes to a different environment.

    Not only do the Section Wizard and Detail Wizard create various schemas, they also bind data to the current package. The Custom package does not support the standard package import mechanism. Therefore, if the Custom package is your current package, you can only transfer the bound data to another custom package via database queries. We strongly recommend against this method as the changes may affect the database structure and render Creatio inoperable.

    If you have to modify Creatio functionality significantly, create a custom package and use a version control system.

  • You customize Creatio either manually or using Wizards, and the changes are minor.
  • You do not need to use a version control system.

Custom package 

To develop in a custom package, specify the name of the relevant package in the Current package (CurrentPackageId code) system setting.

Package structure 

If you upload the package to the version control system, the directory that matches the package name will be created in the package repository.

The structure of the package directory:

  • The branches directory.

    Stores the versions of the current package. Each version is a subdirectory whose name matches the package version number in Creatio. For example, 7.18.0.

  • Tags directory

    Stores tags. The tags in the version control system are a snapshot of the project, i. e., a static copy of files made to preserve a development stage.

SVN integration is enabled in Creatio by default. To set up SVN integration, modify the value of the defPackagesWorkingCopyPath setting's connectionString attribute in the ConnectionStrings.config configuration file. This setting contains the path to the directory that stores working copies.

ConnectionStrings.config
<add name="defPackagesWorkingCopyPath" connectionString="TEMP\APPLICATION\WORKSPACE\TerrasoftPackages" >

Creatio makes and uses a working copy of each custom package with versioning enabled in SVN integration mode. The working copy contains custom packages organized as a set of directories and files. The Creatio SVN client synchronizes this data with an SVN repository. We recommend specifying the path to a permanent directory in the defPackagesWorkingCopyPath system setting. The OS may clear the temporary directory specified by default. Do not specify ...\Terrasoft.WebApp\Terrasoft.Configuration\Pkg as the repository of working package copies in Creatio .NET Framework.

The package directory structure in the file system:

  • The Schemas directory contains the package schemas.
  • The Assemblies directory contains third-party builds bound to the package.
  • The Data directory contains data bound to the package.
  • The SqlScripts directory contains SQL scenarios bound to the package.
  • The Resources directory contains the localized package resources.
  • The Files directory contains the package file content.
  • The Descriptor.json file stores the package metadata in JSON. The package metadata includes the identifier, title, version, dependencies, etc.

Dependencies and package hierarchy 

Creatio application development follows the basic principles of software design, including the “don't repeat yourself” (DRY) principle.

Creatio architecture implements this principle using package dependencies. Each package contains certain Creatio functionality, which the other packages should not duplicate. If a package requires functionality from a different package, set up dependencies between the corresponding packages.

Dependency types:

  • If the current package must inherit the entire Creatio functionality, set the package next to the Custom package in the hierarchy as the parent package.
  • If the current package must inherit the functionality of a package, set the package with the functionality to inherit as the parent package.

Packages can have multiple dependencies. For example, package C depends on packages A and D. Thus, the functionality of packages A and D is available in package C.

Package dependencies form hierarchical chains. This means that the package contains the functionality of the inheritor package and the functionality of all packages that depend on the inheritor. The closest analogy to the package hierarchy is the class inheritance hierarchy in object-oriented programming. For example, package E contains not only the functionality of package C on which it depends, but also the functionality of packages A, B, and D. In addition, package F contains the functionality of packages B and D.

As of version 8.0.1, Creatio adds dependencies of custom packages automatically. Dependencies are added based on the entire package hierarchy. This allows you to add fewer dependencies manually. For example, if a business process uses configuration elements of the Base, UIv2, and Completeness packages, only the Completeness package is added as a dependency of the current package, since it depends on the UIv2 package, which, in turn, depends on the Base package.

Creatio package hierarchy 

View the package hierarchy and dependencies on the package dependencies diagram. To open the diagram:

  1. Go to the Configuration section.
  2. Select Package dependencies diagram in the Packages group of the Actions dropdown list on the toolbar.

The dependencies diagram will open in a new tab.

Click a diagram node with the package name to view the package dependencies as animated arrows. For example, the SalesEnterpriseSoftkey_Obsolete package in the SalesEnterprise product depends only on the SalesEnterpise package and its parent packages. Also, the SalesEnterpriseSoftkey_Obsolete package is a parent package to the Custom package.

Add package dependencies 

You can add dependencies to a custom package at any time.

To add dependencies:

  1. Go to the package page.
  2. Click Add on the Depends on packages detail in the Dependencies tab. This will open the package lookup box.
  3. Select the desired package in the box and click Select.

As a result, Creatio will display the selected package in the current package's list of dependencies. If you add other dependencies to the current package, Creatio will hide the packages you have already selected from the lookup.

Creatio adds new packages to the dependencies of the Custom preinstalled package automatically.

List of dependencies in the package metadata 

Creatio stores the list of dependencies in the package metadata. View the metadata in the DependsOn property of the object defined in the descriptor.json file.

The DependsOn property is an array of objects that contain the package name, version, and unique identifier. Use the identifier to define the package in the Creatio database. Creatio adds separate descriptor.json files for each package version.

Descriptor.json file
{
    "Descriptor": {
        "UId": "51b3ed42-678c-4da3-bd16-8596b95c0546",
        "PackageVersion": "7.8.0",
        "Name": "UsrDependentPackage",
        "ModifiedOnUtc": "\/Date(1522653150000)\/",
        "Maintainer": "Customer",
        "DependsOn": [
        {
            "UId": "e14dcfb1-e53c-4439-a876-af7f97083ed9",
            "PackageVersion": "7.8.0",
            "Name": "SalesEnterprise"
        }
        ]
    }
}

Bind data to the package 

Developers often need to provide certain data together with the developed functionality when transferring changes between environments. For example, lookup values, new system settings, demo section records, etc.

If you create a section in the Section Wizard, Creatio will bind data the section requires to get registered and operate correctly to the package automatically.

Bind data to the package that contains the developed functionality in the Configuration section.

As of version 8.0.1, Creatio adds package dependencies automatically when performing data binding in the current package. Dependencies are added for bindings performed in the Configuration section and in the advanced configuration mode of the Application Hub section. When data is bound, the user can select any objects and their columns. This mechanism is based on the app’s package hierarchy rather than the dependencies of the current package. After the binding is done, Creatio automatically adds the packages with the objects used in the binding as dependencies of the current package.