Using advanced Virtualization configuration

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Process wizard > Data Modeling > Connecting to external data sources > Data Virtualization >

Using advanced Virtualization configuration


Bizagi presents a Virtualization Wizard which will assist the configuration to connect to an external SQL Server database (and automatically create any necessary components).


However, for more sophisticated scenarios, you may want to use the Advanced configuration option, which is an alternative way to set Virtualization in your project.


Such scenarios involve mainly: 

The use of a data source using Custom Virtualization.

The requirement for advanced configuration 

The need to manually adjust the configuration. This may happen in sophisticated scenarios where you have a whole set of tables which are related to each other. This may involve relationships with virtualized entities, and therefore this configuration requires that all of these tables are replicated and virtualized with some considerations. 


The following article illustrates how to set Virtualization in Bizagi by using the Advanced configuration options. 


If you wish to view further detail and an example about visualizing a MySQL data source, refer to Customizing Virtualization..


Using the Advanced configuration options

In order to set Virtualization through the Advanced options, make sure that you have already created the necessary Master Entities and their attributes (to store the incoming values from the external data source).

For further information about creating entities in Bizagi, refer to the Creating your data model article.


Notice that the entities created in Bizagi should have a similar data structure to those in the external data source (for example, the corresponding data types to store the columns' values of the external tables).


To use the Advanced options for Virtualization, go to the Systems module view in Bizagi Studio.




What you need to do

Configuring Virtualization through the Advanced options is done by:


1. Creating the entities in Bizagi with their attributes to match data at the source

This is done through Data modeling


2. Defining a System

Define the information for the system where the external data source is found.


3. Defining a Data Provider

Specify details for the Data Provider (the connection information to the external data source).


4. Registering the Virtualization class (the component having the implementation)

We need to explicitly define if we will be using a custom implementation.


5. Including Master Entities for the Replication

Include one by one, each of the Master Entities to be replicated for this connection (Data Provider).


6. Matching attributes in Bizagi to the sources' columns

Map each of the attributes in the virtualized entity to correspond to a column at the source.


7. Using additional configuration options

Finally, there is the possibility to use additional options for each virtualized entity set, such as: Defining filters for records incoming from the external table, indicating if an attribute (column) of those entities will be disregarded, etc.


Once we have done these configuration steps, we may also run an initial import for these tables or views, so that we can test that the integration was properly set (checkpoint).



In this example, the external SQL database has the following tables that are going to be virtualized: Employees and PurchaseOrder.




The first step is to create the Master Entities in Bizagi with the attributes that you want to virtualize.


1. Creating the entities in Bizagi with their attributes to match data at the source

Create Employees and PurchaseOrders as Master Entities in Bizagi. Define only the attributes that you want to virtualize.


Employee entity and attributes in Bizagi:




In this example, the Adress, Code, Extension, First Name, Last Name, Phone and Postal Code attributes are going to be virtualized.


PurchaseOrder entity and attributes in Bizagi:




In this example, the Code, Customer Code, Employee, Freight, Order Date, Ship Address, Ship City, Ship Name, Ship Postal Code, Shipped Date and Shipped Via attributes are going to be virtualized.


2. Defining a System

To define a new System to be used in this integration, right-click on Systems and select New System.




In the New System window, define the information for the system where the external data source is.

Enter the detail for this new system: Display Name and Description.




Make sure you also check the Enable data providers for this System option.

Click on OK.


3. Defining a Data Provider

Once you have defined and created the new system in Bizagi, enter the details for the Data Provider used by this System and its Virtualization configuration.


To do so, right-click on the Providers node located under the newly created system, and select the New Provider option.




In the Provider Setup tab of the New Provider window, enter the detail for this new provider: Name, Display Name, and Description.

Make sure you mark the Enable data virtualization option.




Then, in the Provider Development Properties tab, click on the OLEDB Config button.

Notice you may set different values for your different project environments (Development, Test and Production).


In this example, set the Development Environment properties.




For configuring your external data source as a SQL Server database, select the SQL Server radio button and specify the following details. 

Authentication: The authentication method used for accessing the Database. You can choose between SQL Server Authentication or Windows authentication. You don't need to provide the Database User and Password if you select Windows authentication.

Database Server: The name of the Database Server containing the SQL Server instance.

Login Name: A login account to access that Database. Take into account that this account requires read and write access to the tables or views to virtualize.

Password: The password for the previous Login Name.

Database: The name of the Database where the tables or views to virtualize are held.





Windows authentication and Oracle databases are not supported for Bizagi Automation cloud service.



Click OK to save this connection. 

Click OK again when returned to the New Provider window.



Take into account that you may define the properties and connection values for this integration for the different environments separately (Development, Test, Production).

However, the definition for the Test and Production environments can only be done before this system and provider is deployed into that target environment. Edition of the values in Test or Production has to be done after the first deployment by using the Management Console.


4. Registering the Virtualization class

Next, we need to create a Virtualization class in Bizagi which can be defined to use Bizagi's default components (Implementation Class), or to use a custom component (e.g. to connect to MySQL, PostgreSQLl, DB2, etc). 


Here we need to define if we will be using a custom implementation.


In this example, we will use Bizagi's default components.

To do so, we define a Virtualization Entity Class by right-clicking on the Virtual Entities node and selecting the New Data Virtualization Class option.


Leave the defaults and click OK.




5. Including Master Entities for Virtualization

Now we will include our Bizagi Master Entities and match them to the external data source's tables.


To do this, include one by one each of the Master Entities used in this Data Provider's Virtualization.

For instance, we will add our PurchaseOrder entity and match it to the Orders table from the source.


Right-click on the newly created Virtualization Class, and select the Add Entity to Virtualization... option. 




In this step, along with the source's table definition, you may also define which of the source's columns will be taken as business keys for the values in the entity.



The business keys should correspond to the primary key of the source's table.


Do this for each of the Master Entities (Employees and PurchaseOrder in our example).


Orders table mapped for Virtualization (added as PurchaseOrder entity):




Employees table mapped for Virtualization (added as Employee entity):




When adding entities to Virtualization, in that same window you may define additional cache settings, as specified below:


Entity: Entity to be virtualized.

External Source: Table or view at the source to be virtualized.

Business KeyAttribute or attributes that make up the primary key for that table or view.

By using the >> button, select into the right-hand list the definition of the values' business key.

Instance (Cache Timeout): The quantity set in seconds, that indicates the time that must be met before Bizagi looks up for a value at the source. This works as an optimization parameter, useful when having recently queried information for a given record (so that Bizagi uses the cached information for that record). When specified as zero, there will be no cache used for instances (queried records).

Global (Cache Timeout): The quantity set in seconds, that indicates the time that must be met before Bizagi performs a search in that table or view. This works as an optimization parameter, useful when having recently queried that table or view (so that Bizagi uses the information stored in its cache). When specified as zero, there will be no cache used for that table or view.


Configuration Validations

When you add a new entity and click Ok, Bizagi performs a connection to the external table and executes the following validations:


External provider credentials: If the credentials set in the provider configuration are not correct, Bizagi alerts the user.


SQL reserved words: If the name of the external source contains a SQL reserved word, Bizagi displays the following message.




The Table does not exist: If the table named in the External source does not exist in the external database, Bizagi warns the user.




There are no tables to virtualize in the external database: If there are no tables to virtualize, Bizagi shows the following message.




6. Matching attributes in Bizagi to the sources' columns.

Once we have added entities to Virtualization, they will be listed under the Provider.

By clicking on a specific entity (in our example, we need to do this for both of our 2 Master Entities), in the right panel you will be presented with the entities' current attributes.


Map each of the attributes in the replicated entity to correspond to a column at the source, by right-clicking on the attribute to be configured and choosing the Properties option.




In the Edit Attribute window, type the name of the column in the External Source that will match to that attribute in Bizagi. 

For the Employee Code, we enter that its source is EmployeeID.




Select the checkbox labeled as Attrib Auto-Fill (Auto-numeric) on Source to indicate that that column on the source table is configured as Primary key auto-generated, as a Unique Identifier or as an Identity. If you select the option, when you create a new record of the entity, The external source generates the subsequent number to store in that attribute. For further information see Considerations with Primary and Business Keys.


Repeat this for all attributes in each virtualized entity.


Configured attributes for Employees are:




Configured attributes for PurchaseOrder are:




Should there be any attribute which you don't want to consider in the Virtualization, refer to the next section.

Notice that all listed attributes need to have matching information in their External Source property.


At this point, we completed the Virtualization setup done through the Advanced configuration options.

You may use additional configuration options as described in the section below, and verify that the values for these Master Entities are properly synchronized.


7. Using additional configuration options.

Finally, there is the possibility to use additional options for each configured virtualized entity, such as: Defining filters for the records in those tables to be replicated, defining if an attribute (column) of those entities will be disregarded, etc.


View more information about these options at the Additional configuration options article.


To view a specific example on configuring Virtualization for a set of tables which are related, refer to how to configure Virtualization for related entities.


Verifying Virtualization (Checkpoint)

Once Virtualization is set, you may choose to verify that it properly synchronizes the Master Entities with the external tables.


Take into account that with Virtualization, Processes in Bizagi access information stored across multiple data sources in execution time (run-time).

This functionality is transparent to end users in the Work Portal; therefore you need to verify that Virtualization is working correctly. This is done by checking that the Activity's form in your Processes use information from virtualized entities. 


In addition to this, to explicitly check that the values are being synchronized with the source, you may choose to see these values displayed in the specific entities through the Entities module (available for the Development environment).


To view how to verify that the Virtualization was set up correctly (it is running properly), refer to Verifying Virtualization.