 Hello everyone, I am Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. So today we are going to have day five of this Appian Bootcamp and I have Ankit with me. So welcome Ankit on the channel. So Ankit will be delivering a few more concepts related to Appian in today's session and I hope like you have gone through the previous sessions as well. So please join this session with Ankit and try to understand all the concepts related to Appian so that you can become an expert in this technology. And like if you want to know more about Appian and other technologies, so you can follow Sanjay Gupta Tech School on YouTube, LinkedIn, Instagram and Telegram. And like if you follow these social media platforms, so you will get all the session reminders timely. Okay, so with this note, I hand over Mike to Ankit. So Ankit, please proceed with the session. Yeah, sure, sure. Thanks, Sanjay sir. Good morning, good afternoon, good evening everyone. So if you have, you know, anything else in Appian, if you want to learn more Appian so you can go through this, you know, the CodeMestros YouTube channel. And there you will get, you know, the all the sessions recording as well as other topics as well. Okay, and then we have one Telegram group as well the code with the name of CodeMestros. So if you have any query, you can post there and we will revert back on that particular query. So in our last session, we learn about data types in Appian. Okay, so there were two type of, you know, data types, one is in build data types and other is custom data types. So in custom data types also we learn like there are four ways to create a particular custom data type, create from scratch, duplicate existing data types, create from database table or database view and forthcoming import XSD. So first three we already learned. So today we will go learn the import XSD one. Okay, so to import the XSD. Okay, so we have one template I can show you. So you have to go to new. Okay, click on data type. It is same like others. And then you can select import XSD. Okay, so here you can upload the XSD file. And once you upload the XSD file, just and click on create, this API will automatically create your CDT. Okay, so this is the way of, you know, to create the CDT using XSD. So first we will learn what is XSD. Okay, so XSD is a XML schema definition. Okay, so it's a, that it's a pattern of XML language only. So XSD generally used to define the structure of XML document, like the content of an XML document, the attributes of an XML document. So whatever needed for a particular XML document, it defines that. So we can say XSD is a blueprint of XML. Okay, so in terms of APN, like you can see here we have an image of XML file or XSD file. So here you can see that we have name space of a particular CDT, right? So in last session also we discussed about name space or name space is like a URL or you know, uniquely, you know, it used to uniquely define the particular XSD or a CDT or a custom data type. So it generally used, you know, the application initials. So suppose my application name is APN bootcamp. So it is taking the, you know, initials of the applications. It can be anything else, but it's best practice to use the initial of an application, like, you know, the other objects also we use as initial of the application to start with. Okay, then other is like, you know, that the name of the CDT, okay, or custom data type, we are, we are using here, you can see her name equals to AB underscore employee details. So AB underscore employee details is the name of CDT. So that we define here. Okay. And in this one, we are defining that field of the particular custom data type. So we have one field that is employee ID, we have other field that is company ID, third field is employee name. So all these are the fields of a particular CDT or a custom data type. Okay. So in this xml file or xsd file, we define this field as the sub component of xml file. Okay. So this is a master component, and we are defining all of the fields as sub component. Okay. And not only the name, but we define the particular fields property as well, like me label equals to true. That means it will, it can accept nil and type equals to xsd, xsd integer. Okay. So it will accept the integer type of value. Same for company ID as well. So it, it's type is also integer. You can see here employee name is a string. Okay. So in APN, we have, you know, for text, we use a string data type. So we are using string here. And in our last session, we discussed more about, you know, that uses of CDT. So one of the CDT use was to define the structure of a database table. Right. So to define the database table structure, we have to, you know, associate a particular database table field or database table name with the CDT tape, CDT name as well. Okay. So here you can see xsd column complex type name equals to AB underscore employee details. It's the name of CDT. Now I want to define the corresponding table name for this one. So for that, we use app info source. Okay. App info is like, you know, that define the additional info that is not directly related to the XML file, but it's, it might be related to the application. Okay. The additional info. And in this one, we are using the source at apn.jpa. Okay. So apn.jpa like, you know, Java persistent. So in this one, we are configuring the, configuring the relational database mapping. Okay. So you can see here, there is one command that is at the rate table. Okay. So in at the rate table, we are defining the name of the table. Okay. So name equals to AB underscore employee underscore details. Okay. So this particular CDT that is AB underscore employer details will record to the table AB underscore employee underscore details. Okay. Now we define the fields of that particular table. Okay. So in this one, you can see here we have xsd sequence sequence means like order. So each will have a particular order. So in xsd column element name equals to employee ID. So employee ID is the field of CBT. Okay. And then I have to define the corresponding table field also. So here also, we will use the same app info and the JP annotation. Okay. So for that, you can see here, there are two parameters at the rate ID at the rate generated value that I will explain you. But before that, you can see here, we have one more attribute that is at the rate column. Okay. And at the rate column, we are defining the name of particular field. So the name of the field is employee underscore ID. Okay. So the employee ID of CBT will be configured with the employee underscore ID of table. Okay. Then we are not defining its attributes also like null label equals to all that mean it won't accept any null value. Okay. If you are passing any null value, it will break then unique equals to true. Okay. So each and every value must be unique. Okay. Then column definition equals to integer. So it will accept integer value only. Okay. So its data type will be integer in database. Okay. Now come to this two parameter at the rate ID and at the rate generated value. Okay. So this employee ID is nothing but a primary key of this particular table. Okay. So AB employee details primary key is employee ID. So at the rate ID attribute is to define the primary key. Okay. So if I am using employee ID at the rate ID column, so it will be automatically primary key of this table. Okay. Of the table AB underscore employee underscore details. Now second is attribute is at the rate generated value. So at the rate generated value we use to auto-incremented values like suppose first value of this you know employee ID is one. So second will be automatically two. Okay. Third will automatically be three. You need no need to set that value. Database will automatically auto-increments this value and will set the values. Okay. In the particular column. So at the rate ID is to to define the primary key and at the rate generated value is to define the property of auto-incremented. Okay. So these are some property that we set. So same line here we have other field that is company ID. Right. And company ID for company ID also we are defining the table field. Right. In the same APN JPN notation. Okay. So here you can see we are defining the name of company ID. Okay. That is company underscore ID. Okay. And the type of field that is integer. Right. So here we are not using the at the rate ID and at the rate generated value. Right. Or company ID. Why? Because this is not the primary key and this is not the auto-incremented value. Okay. It will auto know it will be set manually. Then next column you can see that is employee name. Okay. That this is CDT field name employee name and we have its property here. So if I want to check the corresponding table field name. So I have to you know we have here also same APN JPN notation and we are defining the column name that is employee underscore name and column definition we are defining here the type of like data type in database table. So we string or text that's why we are using it. Okay. And we define that size also like 255 size and defining here. If I do not define it will automatically take 255. Okay. So if I'm taking other than 255 I must define here. Okay. So if I if suppose that the employee name and I want that employee name should be like 50 characters maximum. So I will define at 50. Otherwise it will take 255 automatically. Okay. So this is the template to create an XSD. Okay. So here we no need to create a complete template again and again. We have to just focus on name space. So suppose if I suppose I'm working on employee onboarding application. Okay. So employee onboarding applications the initials are EO. Okay. So the type the name space will be EO here. Okay. And then I were to define this CDT name. Okay. That I can define simply here. I have to define the table name. So I will simply change. I won't change anything else. I will simply change this table name CDT name and this name space. Okay. Then I will I will change this field name only like employee ID. Suppose instead of employee ID if I'm having customer ID. So I will just simply change customer ID. Okay. And the field type or the table field name that it will be customer ID. Okay. So I have to just change that which is dynamic. Other things are static. So you no need to care of it. So I can show you the sample XSD file. So this is simple XSD file. Okay. That you can see here. If I want suppose I'm working on employee onboarding application, I will go simply here. I will change this EO. I will change here EO like the table name is something different. I can say like table name is E sorry CDT name is EO address details or customer details. So I will simply change customer details. I will change its table name. I will change its field name like suppose here the field name is customer ID. Okay. So I will change the field name if table field name is different. I will change this table field name at the rate. So also a primary key. So I won't remove this. I will demand it like this at the rate. It is also a auto incremented value. So I won't change this one as well. Okay. Now if I need to change that you know instead of company ID suppose I'm using customer name. So I will simply change customer name. Okay. And customer name it will be string. So I will change its type. And suppose at the rate column name also will be like customer name in column definition. It will be where can write because it's a string type of value. So I will change it here. And suppose I want to give the size like 50. So I will use this instead of employee name if I want to use like employee age or customer age. So I will simply add like this. It's also integer. So I will use integer if it's a decimal. So I will use decimal here or plot. Suppose I want to add one more field in this new table or new CDT. So I will just copy this from element to element. And I will paste here. Okay. So you can see here we have two columns with customer age. I will change like current date. Suppose there is a column current date that time. So I will add this. Now current date time type will be date time. Right. So I will use date time here. And column name in table might be like current date time. So I will use current date time here. And its type also will be date time. Right. So I will use date time. And once my CDT or XHD is completed, I have to just go to file. I have to save edge. Okay. And I can simply give the name like this one. And I have to save with XHD. Okay. Extension. So simply I will save this like this. Okay. And then I will go to this APN template. Okay. CDT creation template. Like I can open this one. Data type. I will click on this import XHD. I will click on upload. Okay. And I will select this XHD file. Okay. Now you can see it is not giving any error. It is showing me the message data type to be created or updated. So it is showing the name of data type and its name space. Okay. And it is showing that there is no any dependence. So no any other artifacts in APN is using this particular CDT. Right. Because we are creating new one only. So there is no no it is not using by anything any other objects. So now I will click on create. And you can see here it is created CDT. Right. Same like we were creating we have created in last session with access with like no that is scratch in that case also we were you know adding the fields manually from here. And we created you know duplicated the existing CDT and then we used database. So it's also similar bit. Okay. To create the CDT. But now in in this one we uploaded one XHD file. Okay. To create the XHD. So and to create you know XHD creation is not a complex task. So if you have if you create one XHD you have to just copy this one and change your field name field properties and CDT and table name. You do not need to do anything else. Okay. So this is very simple way. Now we read about this property like what is CDT's target name space that we learn like you know that CDT name target name space is to you know define uniquely define that CDT. So or if you can see it is a it's a container. Okay. That have multiple CDT. Okay. So with the help of name space or and the CDT name it will be unique. So there there cannot be two CDT with same name space and same CDT name CDT name. So we define the CDT name like this as we learn and we define the table name like this. Okay. And then we configure the CDT field like this. Right. So if it's a customer ID field so we define like this and then we define the corresponding table field name and its properties. Okay. So you can read about other type of columns as well like you know we have we read about you know the inbuilt data types in our last lesson. So we can use in there we can use string we can use decimal or you know date date and time or Boolean as well. Okay. So we can create column of any type. Right. And then we learn about you know at the rate ID and at the rate generated value like at the rate ID is to define the primary key. So if we define at the rate ID for a particular column it is a primary key. Right. And if we define at the rate generated value that means it the value will be auto incremented. So this was the last way or the fourth way to create CDT using XSD. Okay. So now we can create CDT. Right. We can use or you know as we can create by scratch. We can create by duplicating the CDT. We can create by database and we can use the XSD. But in first two methods or in first method you know where we were creating the CDT using from scratch in that case we cannot define the table field name. Right. Because there was only one way. So in this one there was only one option to define the CDT field name. There is no any way to define the corresponding table field name or table name. So in that case APN you know the database automatically you know create the table with its predefined names. Okay. So if there is some difference between CDT field name and table field name. So we create using XSD. So it's the best practice in APN to create the table or create the CDT where we are using that CDT for a particular table. Okay. Because there are other uses also you know to create the custom data type. But there is one use that we mostly use in our APN application that is to define the structure of a table. Okay. So if our CDT is defining the structure of a table you know it's the best practice to create the CDT using XSD or from database table. Okay. Because in both of the cases or in both of the ways it automatically you know it you know it provides the functionality to create the or associate the table field name okay with the CDT field name. So that is the best practice and right suppose if I'm creating XSD and if I do not define this column name. Okay. It won't give you the error but it will create the field. Okay. With its predefined naming convention. Okay. So suppose there is a table field name customer name. Okay. That is table already exist. Okay. And we have one field name that is customer underscore name. But if I'm not defining then APN will think that there is no any column name. Okay. In the CD in the table and it will automatically create with a new new column and that's name will be customer name. Okay. That's why it's best practice to create the CDT with the help of XSD or database table. Right. Suppose this is the way to create the CDT. Right. Create from scratch create from using XSD or database table or duplicate. Now suppose I created the CDT. Right. I created the CDT with the three field name. Okay. Now I want to update or I want to update one new field. Okay. And then I want to rename this particular field. Okay. So in that case how we can do so for that I have to open this particular CDT. Then I will go here. I will download the XSD. Okay. Now you can see this is the XSD which is downloaded. Okay. I will open this one and it will open like this. Suppose I'm updating the name of this customer name field. I will simply update here. Okay. I will upload update the corresponding field name in table. Okay. And I if I want to add new field I will simply copy this. I will add new field here suppose modified by. Okay. I will use here as well. Modified by. And its type is suppose string because it will be username and here we are there. Okay. Like I will give the size 50. Okay. Then I will simply save this file. Okay. I will go to here and I will create on create new version from XSD. Okay. So here also I'm getting you know I'm having the upload build. I will upload that particular file here as well. And it will upload update that XSD or the CDT. Right. And in the CDT update the field name it will add the new field. Okay. But you know that first time when we were you know created we created the particular CDT and it was going to map the database table. So at the time in database table the field name was something like that. Right. Customer name. Okay. But because initial initial XSD the field name was customer name. Now we are updating customer name to customer. So in that case we have to update into database table this particular field name manually. Okay. So first I will go to database. I will run this way like update table name is like this one and the field name. Okay. So I will update the field name first in table. Okay. Like if I'm using MySQL or MariaDB I will use the altar query and I will update the particular field name. And once this field name is updated into database table then I will update this particular field name here as well like in XSD then I will create the new version of the XSD. Okay. If you do not update the field name in database table. Okay. And you simply try to create the new version of this particular CDT. Okay. In the in that case it will display the error like this particular field does not exist in the table because in table is still the field name is the old name. Okay. So first you know whenever we are updating any field name first we need to update in database table then we have to create download the XSD and we have to update in the XSD and save the XSD and then we can create the new version. Okay. So in that case it won't give you any error. Okay. But if you are creating a new field either you can create direct first in database table that field name and then you can map or you can simply create in CDT. Okay. In XSD you can upload the XSD and it will create that particular field in database table as well. There is some more steps that we will learn in our next session like you know there are component in APN that to define or to connect with database like data source and data store that we will learn but using those data source publishing you know publishing the data store we can create additional fields also in database table with directly using CDT. Okay. We now need to go and you know insert the query or write the insert query okay or write the DDL to add the particular column but we can directly you know create the column using CDT only right because in CDT we already defined the table field name. So if we are creating this you know publishing this particular CDT it will automatically create the field name this modified by field name. Okay. If that this field name is not there in database if it is already there it won't create new one but if it is not there it will create this field name. So first it starts like if any of the field is not there it will create if all of the fields are there it won't create the new field. Okay. So this is the way to create the update the XSB. Okay. And you see that you know other artifacts that we learn in our last sessions like you know process model or expressions or you know documents we have some document folders or like no rule folders or process model folder to store but CDT we do not store in these folders. Okay. And we do not define the security also for the particular CDT. You can see here we do not have any security configuration or even if I open the property there is no any option to change the name and name space. So we cannot change the name and name it says for the CDT because these are part of its UUID universal key that's why APN does not provide the property you know functionality to update the properties like name and name space. So if you want to change the name first you have to delete the CDT then only you can upload the new XSB with the new CDT name you know then only you can update but in that case you have to change check you know it's dependent also because independent the deleted CDT was already using. So we have to do that very carefully. Now in next sessions we will learn about like data store data source and other components of APN but till that if you have any query you can ask in the session and you can comment on the if you are you know watching the recorded session so you can comment on the particular YouTube video. You can email also us on training at the rate the code nestro.com or you can comment on our you know telegram group as well. And we got adding APN in community environment access. So we have no as you know that we have requested but it might take one week more because the request is in queue so they are feeling you know the full feeling that request that was created before us. So once those all other requests are completed then our request will also process and you will get the environment. And as well as you also all of you guys also tried because we have explained you the steps to you know raise the request for community account. So if your request is already you know approved so you can access the environment and you can feel that your status of environment also in our seed that your request is already already approved. So you can put the comment on this recorded session also that you already have the APN environment. So thanks everyone so hand over to Sanjay sir now. Okay so thank you Ankit for sharing the insight about APN and guys I think you need to wait for one more week for the instance so soon it will be available then you can do some hands-on as well. Okay so we'll be having one more session tomorrow and please do join that and if you have not gone through previous sessions so session tracker is available in the description of this video so from there you can have all the previous session recordings so you can go through those as well and please share a review or feedback about the bootcamp so that it will give some motivation to Ankit he is doing lots of efforts for you. Okay so with this note we take your leave thank you so much for joining the session thank you Ankit for sharing your knowledge with the community. Thank you. Thank you.