Creatio development guide
PDF
This documentation is valid for Creatio version 7.16.0. We recommend using the newest version of Creatio documentation.

Updating and committing changes to the SVN from the file system

Glossary Item Box

Introduction

Different developers can use the SVN to develop the functionality in the same file. The possible situation when one of the developers modifies the file first and the next developer could overwrite file with a new version and the modifications of the first developer will be lost. The modifications of the first developer are saved by the system, but these modifications will be lost in the last revision of the file. To avoid this, use one of the following versioning models: “Lock-Modify-Unlock” or “Copy-Modify-Merge” (see ”Working with SVN in the file system”).

Regardless of the chosen solution, the actions for updating and committing changes to the SVN are almost the same.

Case description

The sdkPackageInFileSystem custom package is implemented in the Creatio configuration (see “Creating a package in the file system development mode”). Update the package in the file system development mode and after that commit it to the SVN.

Updating the package

To get the latest package revision select the corresponding package in the ..\Terrasoft.WebApp\Terrasoft.Configuration\Pkg folder and perform the [SVN Update] action (Fig.1).

Fig. 1. Running the [SVN Update] action

After the action is executed, the window with update results will be displayed (Fig. 2).

Fig. 2. Update results

As a result the descriptor.json file (the package modification date has changed) and the UsrGreetingService schema were modified. The source code of the schema is available below:

namespace Terrasoft.Configuration
{
    using System.ServiceModel;
    using System.ServiceModel.Activation;
    using System.ServiceModel.Web;
    [ServiceContract]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    public class UsrGreetingService : System.Web.SessionState.IReadOnlySessionState
    {
        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Hello")]
        public string TestHello()
        {
            return "Hello!";
        }
    }
}

To implement changes to the application database, execute the [Update packages from file system] action in the [Configuration] section. If the schemas of an object or a source code were modified, execute steps 3 – 6 of the “Installing an SVN package in the file system development mode” article to apply changes.

Package contents modifications

After updating the package you can modify its contents. For example, add the TestHelloWorld() method to the source code of the UsrGreetingService.cs schema.

namespace Terrasoft.Configuration
{
    using System.ServiceModel;
    using System.ServiceModel.Activation;
    using System.ServiceModel.Web;
    [ServiceContract]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    public class UsrGreetingService : System.Web.SessionState.IReadOnlySessionState
    {
        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "Hello")]
        public string TestHello()
        {
            return "Hello!";
        }

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "HelloWorld")]
        public string TestHelloWorld()
        {
            return "Hello world!";
        }
    }
}

Committing a package to storage

To commit the modifications in the SVN select the corresponding package in the ..\Terrasoft.WebApp\Terrasoft.Configuration\Pkg folder and perform the [SVN Commit...] action. (Fig. 1).

After that the revision properties window with modified files (1) will be displayed (Fig. 3). In this window you can add the log message with description of changes for the current revision (2). Click the [OK] button to start committing.

Fig. 3. Revision properties window

Committing process is displayed in the information window (Fig. 4).

Fig. 4. Result of committing

See also

© Creatio 2002-2020.

Did you find this information useful?

How can we improve it?