Creation
Introduction to Creation
The Creation screen allows you to easily deploy a new or updated version of your application. Creating and deploying an application requires a number of steps that are explained in the following paragraphs.
It is important to know that:
- All jobs are performed by Indicium. So, generation, validation, etc., will continue even if you close the Software Factory GUI.
- Since all jobs are performed by Indicium, it is possible to automate the entire process.
- All developers can track a job's progress. For example, if one developer starts generating the definition of a project version, another developer can see this in their Creation screen. This behavior extends to the validation- and unit test tabs in various modelers, and to the Validation and Unit test screens that can be opened directly from the menu.
You can create all steps at once or each step separately.
Create steps seperately:
Configure the file storage location
The platform's system flows for writing code files, program objects, the manifest, and the IAM synchronization script use process actions that need a file storage location.
The file storage location path needs to be configured in IAM:
IAM > menu Authorization > Applications
Select your SQLSERVER_SF application in tab List.
Navigate to tab File storage locations.
In column File storage, select the file storage location
generated_scripts_location
.Edit field Path or change the file storage type using the task Switch file storage location type
.
If the file storage type is File system, you can use variables in the path. For example
D:\files\%FileLocation%\file.txt
, where%FileLocation%
is:thinkwise\textfiles
.
Execute the complete Creation process
By executing the complete Creation process at once, you do not need to run each step separately. Consult the next chapters in this manual for more detailed information about each creation step.
menu Deployment > Creation > tab Generate definition
Execute the Execute complete creation
task.
In field Execute creation, select whether you want to run the complete Creation process or only the selected steps.
Define for each step whether it should be executed and what the error handling should be.
For the source code, you can define the Upgrade method (Full or Smart).
Select Execute.
Settings for executing the complete creation
1. Generate definition
If you choose to run each Creation step seperately, you start with generating the definition.
menu Deployment > Creation > tab Generate definition
- Execute the Generate definition
task.
Now, the application model is composed and extended using the defined generic concepts (for example, for trace functionality and logging), and the platform-specific definition is created. The generation strategy is set in the control procedures.
If an error occurs at one of the control procedures, the generation will halt. You have several options to either skip the control procedure and continue execution or abort the definition generation.
To easily find the failed steps, select tab Generation steps > navigate to the Start ribbon or the context menu > Prefilters > Status 'Failed'.
Generation definition
Generation is locked
Only one generation for each project version can be carried out at the same time. This avoids conflicts during the generation. If during a generation a second generation is started, a message is displayed that the generation of the respective project version is locked.
If desired, the project version lock can be removed via the Reset lock task in the ribbon or via the context menu.
During this step, the project version is locked. To inform the development team of the start and end of this locked state, it is possible to automatically send an email. Add a notification email address at Project overview to activate this feature.
Reset project version lock
Errors while generating the definition
If an error occurs during the generation of the definition, you are prompted with various options to either continue or abort code execution. This choice may also be made by a different developer than the developer initiating the definition generation.
Skip the code file and continue with the next code file.
Abort the execution completely.
Continue with the next statement in the current code file.
2. Validate definition
After the generation, the definition must be validated.
menu Deployment > Creation > tab Validate definition
Execute all validations.
Execute the validation for the selected group.
Executes the selected validation.
It is important to resolve all Error and Validation messages before generating the source code. If this requires modifications to the model, you need to generate the definition again.
See Validation for more information about the validation.
3. Generate source code
After the definition has been generated and validated, the actual source code can be generated.
At the start and finish of this step, a notification email is sent to the notification email address set in Project overview.
menu Deployment > Creation > tab Generate source code
Select Generate source code
.
Select an Upgrade method.
If you want to write Code files to disk, check the box. The code files are written to the
\Source_code\Groups
folder. A field containing the exact location appears on the screen. You can navigate to this folder using the button. The code on the disk is not used when executing code files on the database from this screen. Changes to the code files on disk have no effect.
If you want to write Program objects to disk, check the box. The code files are written to the
\Source_code\Program_objects
folder. A field containing the exact location appears on the screen. You can navigate to this folder using the button.
Select Execute.
Upgrade method
The generated code is stored in the Software Factory.
To easily find the failed steps, select one of the generated steps on the right > navigate to the Start ribbon or the context menu > Prefilters > Status 'Failed'.
Generate source code
Generation method
There are two options for generating the code, depending on the situation.
For cherry-pick execution of specific pieces of logic, use the Functionality modeler or the Code overview screen.
Full
This option is desired when the end product database still has to be created or still has to be brought in line with the model, and the end product database does not correspond with a previous version of the model.
The program code of all the objects is assembled. Subsequently, all program objects are used to compile the code files.
All the database objects that are not defined in the model, for example, indexes and procedures, are removed.
Smart
With this option, only modified objects are reapplied to the database. However, this option can only be used when the end product database is the same as the previous version of the model. This is often the case when upgrading a production version. The smart way of generating significantly speeds up the upgrading process, for example because unmodified indexes are not rebuilt and it reduces the chance of an upgrade.
The program code of all the objects is assembled. An analysis is performed to determine which program objects are actually used during the compilation of the code files.
The condition for performing the analysis is that the program objects of the previous version of the model are available and compiled to code. This is because the analysis looks among other things at the modified code in program objects.
If you perform a smart upgrade, make sure that the previous version is fully generated. For example, generated objects may have been deleted during the implementation of a branch. These then appear as newly installed objects during the difference analysis.
4. Execute source code
When all source code is generated, it must be deployed to the database. This is done in the Execute source code tab.
Make a backup of your end-product before executing this step.
You can execute the source code in several ways.
menu Deployment > Creation > tab Execute source code
Connect
- Select a runtime configuration. The server and database of this runtime configuration will be used to create or upgrade the database and deploy the business logic code. Use this task also to reconnect to a different runtime configuration.
The connection remains available until a new Generate definition or Source code job has been started for this project version or if a timeout of 5 minutes has been reached. You can also close the connection manually.
The default selection of code files to be executed may vary depending on whether or not the database exists and the current versioning information stored in the database. You can change the default selection by selecting or clearing the checkboxes, or with the tasks Select all code filesand Deselect all code files
.
- The db code file is selected automatically if the database does not yet exist.
- The create code file is selected automatically if the database does not exist or is empty. For example, when you connect to a manually created database on Azure SQL Database.
- The upgrade code file is selected automatically if the database exists and the product information in this database indicates that an upgrade is required.
Execute selected code files
- As long as the connection to the database is available, you can select and execute code files.
Execute all code files
- Only available if the connection to the database has not yet been established. Select a runtime configuration. The server and database of this runtime configuration will be used to create or upgrade the database and deploy the business logic code.
No further input is asked, and all the code files are executed directly on the runtime configuration.
Execute source code
When all code has been executed and/or compiled, your end-product is ready for use.
After the database has been created, no more data model modifications should be done in the current project version. You will have to make a new version.
Errors while executing source code
menu Deployment > Creation > tab Execute source code
The log in this tab shows the errors together with the run query.
While the source code is being executed, only the last error is shown. After the job completes, the full log is shown with all errors and informative messages.
You are prompted with various options to either continue or abort code execution. This choice may also be made by a different developer than the one initiating the code execution.
Ignore the error and continue the current code file execution.
Skip the code file and continue with the next code file.
Abort the execution completely.
Error in executing source code
Unexpected source code
Is the source code not what you would expect or like to achieve? Then check if you need to add tags.
Upgrade an existing database
When the model of a table is changed, the old table will be renamed and a new table will be created. The upgrade script ensures that the data is imported from the renamed table to the new table. Lastly, the (now superfluous) renamed table is deleted. Next, the business functionality is immediately reapplied.
When an existing database is upgraded, it is possible that not all data conforms to the (new) checks and constraints. To check the database, the base project SQLSERVER_VERIFICATION, DB2_VERIFICATION or ORACLE_VERIFICATION can be linked. After having carried out all of the steps again, an extra code file with controls will have been generated, which can be executed on the database.
5. Run unit tests
After an upgrade, you can execute all unit tests as a regression test, to ensure that further changes have not broken any units that were already tested.
menu Deployment > Creation > tab Run unit tests
You can run the unit tests in two ways. In both scenarios, you are first prompted to select a runtime configuration. The server and database of this runtime configuration will be used to create or upgrade the database and deploy the business logic code.
Execute all unit tests.
Execute the selected unit tests.
Unit tests as a regression test
Creation job overview
An overview of all Creation jobs for all projects and project versions is available in the Log menu.
menu Maintenance > Jobs > tab Job
The following prefilters are available:
- View only jobs that have been executed by you.
- View only jobs for your projects.
To cancel or abort a job:
- Click
to cancel a queued or active job.
- Click
to abort a job. Only abort a job if Indicium is no longer running it, for example, due to a restart. By aborting the job, you inform Indicium that it is no longer running and therefore new jobs can be started.
Example: two active jobs for two projects, and one queued job
Automate the Creation process
See Automate deployment.
Troubleshoot the Creation process
Indicium error
If Indicium throws an error about creating a folder for a job in the creation or synchronization process, the file storage location probably has not been configured.