The values stored in the variables of the main voice application or the main component can be passed to the subcomponent. Similarly, the values stored in the variables of the subcomponent can be passed to the main component.
x is a dataStore variable in the main application that has to be passed to the subcomponent and y is a dataStore variable in the subcomponent that has to be passed to the main application. In simple words you want assign y=x and x=y.
Note
Ensure that all the variables that you create are of the same data type.
To do this, you need to follow the steps below:
1. Create a main application Main_App that has a voice model with the following entities:
Start Point connector
Any voice or non-voice entity
Atleast one subcomponent and name it as Sub_App
Note
To create a subcomponent use the Voice Component entity.
End Point connector
In the Main_App, work through the following steps:
Ensure that all the entities are connected
Create a variable ‘x’ in the dataStore
Double-click on the Sub_App voice component
In the Sub_App, create a voice model with the following entities:
Start Point connector
Any voice or non-voice entity
End Point Connector
In the Sub_app, create an interface variable for the Start Point connector. To do this, follow the steps below:
Select the Start Point connector
Using the secondary mouse button, choose Define Data
Create a variable ‘s’ in the Variable Manager
In the Main_App, select the Sub_App voice component and work through the following steps:
Using the secondary mouse button, choose In Mapping
Map the variables in the dataStore to the variables of the In repository
Assign s=x (The expression looks like ‘=@x’ in the assigned value column)
In the Sub_App, create a variable ‘y’ in the dataStore
In the Sub_App, select the Start Point element and work through the following steps:
Using the secondary mouse button, choose Out Mapping
Map the variables in the start repository to the variables in the dataStore of the sub-Component
Assign y=s (The expression looks like ‘=@s’ in the assigned value column. This ensures that you have assigned y=x.)
In the Sub_app, create an interface variable for the end point connector. To do this, follow the steps below:
Select the End Point connector
Using the secondary mouse button, choose Define Data
Create a variable ‘e’ in the Variable Manager
In the Sub_App, select the End Point element and work through the following steps:
Using the secondary mouse button, choose In Mapping
Map the variables in the dataStore of the Sub_App to the variables in the end repository
Assign e=y (The expression looks like ‘=@y’ in the assigned value column)
In the Main_App, select the Sub_App voice component and work through the following steps:
Using the secondary mouse button, choose Out Mapping
Map the variables in the Out repository to the variables of the dataStore
Assign x=e (The expression looks like ‘=@e’ in the assigned value column. This ensures that you have assigned x=y.)