 Okay, hello everyone. I am Sanjay Gupta. I welcome you on Sanjay Gupta Tech School Today we are having day 14 of this Appian bootcamp. So I have Ankit with me one more time he will be delivering few more things about Appian and I hope you have gone through Yesterday's session if you have not attended life. I hope you have gone through the recording so Do do proper practice and one thing I just want to highlight if you need instance or environment Just reach out to us in the telegram group that we have created for this and if you want to receive timely notification, so You can just follow Sanjay Gupta Tech School on YouTube, LinkedIn, Instagram and Telegram and the session tracker link and Telegram group link where you you can send the request So those links are available in the video description Okay, so over to you Ankit. Please proceed with the session Thank you So if you want to check all of the recorded sessions You can check on the code Mestro YouTube channel And if you have any query and just a mention or if you have I know if you want the instance of the Apian environment So you can put your request on the code Mestro Telegram group and we will reward on that. So Yesterday, you know that we discussed about process model some basic component of process model some of the gateway some of the Variables and all that we discussed in yesterday's session So we will continue to today on this and we will create, you know, the end to end workflow Where user will input the data and we will store the data into database Okay So the first one is like create CDT type process variables in process model Okay, so like how we can create process variables. That's the type is CDT Yesterday, we created some process variables that type are like text or integer Okay, so today we will create the process variables of CDT type and we will create an interface Okay, and we will configure that in the interface into the process model And we will pass the ruling put data from interface to activity class parameters that we discussed yesterday that Activity class parameters are like the local variable. Okay for a particular node And then we will save those activity class parameters data to process variables because if you want to use that data Into the next node or other node, we have to save that into process variables Because we cannot use ACs into other nodes so So you know that Someday back we created one interface like this So this was So, you know, this is an interface that we created In our last essence So in this one, you can see we have one variable that is Employee details and it's type is AB employee details that is CDT, right? And it is single type it because the checkbox is not checked And we have other variable that is button action in which we will save The action that will user will take like if user is clicking on cancel button So we'll say cancel if your user is clicking on submit, so we will save some Okay, like like suppose if I'm typing something here When you check in right side, you can see here we have values for all of these Variables right? employee name, junkie department, technical, street jam throughout country, United Kingdom, city London They are two other variable, you know other parameters created by created on we do not have values Because we will set this value by system. Okay user won't fill the created by and created on System it will automatically take it and employee ID is a primary key of this table that is auto incremented So once we write into the database database will create this ID Okay, so some of the data will take from the user and some of the data system will automatically set Okay, so like this we created the interface and we Took the input from the user and save that into rule input Now we will pass these rule inputs value into process model. Okay, so how we can do that we will Work on that part So now I will go to new and I will create process model. Okay, I can see AP Employee data I will create These things we have already discussed in yesterday's session. So I'm just so now you can see we have process Model here with two nodes when it starts not and one is and so whatever we will do We will you know do between these two nodes So like now I have to take the input from user, right? So I will use user input task or wherever we need users, you know activity in any of the Process I have to use user input task Okay, I can change its name like employee data Now I will click on this double click Okay, and I will go to data. We can we do not have any input and output that you can see here Okay, that we discussed yesterday that what we input and what is output so you can check in last session This is form tab where we know configure the interface. Okay, so I will click on this dictionary Directly and There is such box here. Okay, so in this one I will type the name of that interface so the name of Of the interface here this one right So I can simply copy this name and I will type here And now I will click on search so you can see we have this interface So I will select and I will click on okay Now it is asking me do you want to automatically create node input node inputs are activity class parameters to match your interface input So if I click on yes system will automatically create the you know activity class parameters as well Yes, now you can see in left side. These are rule inputs, you know, which were configured on Interface and that this is the type so it is cdt type and the second one is text type and These are activity class parameter that is mapped to do this rule input So whatever user will type in this rule input it will come into this particular Variable that is activity class parameter and if we I Use a type something or you click on this button action and whatever button action value is there It will come into this particular activity class parameter and this activity class parameters are created. Okay So now We define okay, we configure the interface and we define the duty class parameters But suppose if I want the value of this activity class parameters You know other than this node I cannot look right because activity class parameter is a local variable or the particular node If I have other node here, like suppose if I this not in in this node If I want to use that activity class parameters value, I cannot use. Okay, so do that Do that we create process variables Okay, so we have two ways to create process variables either I can go to properties and I can create from here Variables I can click on this at variable side and I can create. Okay, or this is other way I Can go to data. I can click on this employee details and there is plus sign right here so I will click on this plus and This is the name. This is the type and I will click on okay So it will automatically create the process variables similar thing we can do for button action as well For button action also, I will click on button action You can see here its name is button action and it is text type. I will click on okay, and Now if I go to properties So you can see these two variables are created Okay, and this second one style page. It is a CDT type and this one is text type Now you can see here. We have question mark on top of this Okay, so question mark like we did not you know assign the particular interface to someone if I want to assign this particular interface to a particular group I have to you know pick a group from here If I want to give it a particular user I can have to select that user from here and if I want to give you know the excess of this particular interface to the user Who initiated the initiating the process model? So I will give that to process initiator Okay, and for that we have one function that is process initiator. This is process initiator. Now I will click on okay Now you can see the question mark is not here right So like this we configure the interface into the particular process model Okay, and we define we create the input that automatically says, you know apn also create and we save the inputs value into the Save into okay into the process variable. So how it works first user type into Interface then it save into rule input. Okay From rule input it come to the activity class parameter Okay And then it come to process variable. Okay, so whatever you are typing we First is the store into rule input Then when we configure it with the process model it come to activity class parameter and from activity class parameter We save this to process variables. So like this, you know the flow works now Whenever user will type something it will come to in this one. So if I show you So I can go to file and can save and publish this one. Okay Now I can debug So to start I will click on this start process for debugging Or control d also you can click. So now you can see the part that is completed already completed will come in blue color And the you know the active part will come in green color and the pending is gray color So now this is blue part. So that means this is completed. Okay, and this is green. That means it is active and this is pending So I will select this one. I will click on right and I can Click on view form to check the form So now you can see we have form here. I can type Okay I can type technical I will click on submit So now you can see if I refresh this one It is completed because we completed the interface. Okay. Now if I want to check the value of the process variable I can go to here and I can click on this process variables. Okay Now you can see here In this employee details, we have employee ID is null employee name is Ankit department is technical Is treaty gems road country is uk city is london and created by created on null Okay, and button action value is submit So now we have value in process variables, right for this particular instance So now we can use this process variables value anywhere in the particular process instance. Okay So now We know that we can take the input from user and we can process this to process variables. Okay Now suppose I want to write the data into data base So I have to use To write to data store entity. This is smart service. Okay to write the data into database So now first you can check we have one query entity, right that we created last time Query entities to get the data from database. Okay So if I want to pass the data from this particular table the employee details table I have to create this query entity and I can click on this test rule So now you can see there is no any data in this table, right? This table is completely blank This table is completely blank Okay Now I will write one row and I will fetch that So here I'm writing into this particular table. So in table to write into the table we use Data store entity constant, right that we discussed in our older sessions So I can check The data store entity type of constant at this one, right? A B D S E employee details. This is data store entity type constant So I will have to copy this one And what I will do I will double click on this one I will go to data and I will configure here data store entity Okay, I can click on this pencil sign and for constant we use prefix cons, right c o n s And then the name of the constant. Okay, so this is constant Uh for the data store entity that means for table, right? So if I have to insert something into a table I use insert into table name and then you know the columns and values So here we have you know table now we will we are needed data, right that we need to Write into the particular table. Okay, so we I will create Input here. Okay, this input is also activity class parameter Oh, I can figure here Employee details Okay, and what will be type cdt type, right that is ep employee details And this is variable and it is type now we are needed value of that variable, right that we Want you know want to store into the database. So I will select this value So the value is already stored into the process variable. Okay, so I will copy this Okay, now It will run the query like insert into the particular table name and then the value of this value, okay So in apn we can write and update Sorry insert and update the data into database using same smart service that is write to data store entity. So if Primary key is not there. It will insert the data into database But if primary key is already there then it will update the data into The particular road, okay If I want to have the Uh output or the result of that query I can click on this stored value and I will select here Okay, so I will store the particular output into the same variable Now I will again see when publish Okay, and I will again debug this one So I will go to file Debug now it is here. I will right click and view form So like I will click on submit Okay, and I'm repressing this one. So you can see here it is Completed because uh, it was stopped here because there was some user activity needed, right? But in the write to data store, we do not need any user activity. So it is simply completed. Now if I check the value Of course, it's very good. Then you can see here We have details that user field other than that we have employee ID as well. Okay, that is auto Incremented or primary key of this particular table Now if I go to this query entity and I can click on this test shoot Okay, so it should have some values. I think uh, it is in different table That I can check Yeah, I think it is in different table. But yes, uh, it is stored into the database. Okay, so now The two columns that you can see are null here Right because user is not typing anything for this these two columns these two columns or two parameters will be set by process model, okay And there is one more thing suppose we are directly writing to into the database So Suppose there is a case where user is clicking on cancel instead of submit in that case also it will be in No, it will write the data into database that is not correct So for that what we do We put a gateway here. Okay So and we will put a condition that if user clicking on submit then only we write into data store If user is not clicking on to the submit and user clicking on cancel we won't write Okay, so we can configure the Gateway that is XOR. I will just try this one I can put this between two lines Okay, now we have So I can put it submit and if user is not clicking on submit on clicking on cancel I will directly map to the end now. I have to put the condition here decision New condition. Okay, and then So I will click on pencil icon and here you can see we have process variable So I will check if button xn equals to submit Okay, so this is condition So if button xn value is question to submit then if this expression will return true If it is where its value is not equals to submit then this Uh expression will return false. So if it return true That means if user is clicking on submit, so we will go to this not write to the test Or entity. Okay, but if it is not correct I know returning true then it will go to the other node that is end node now again Even publish and I will again debug this process. Now if I click on cancel So You can see it is going no following this path. It is not going to this one, right? So it is following the blue color part. So from top So it is keeping this particular right to data store entity. No, so it won't write the data into database Okay, but if I click if I click on submit I will again again debug and right click view phone. I will click on some now this time So Depress so you can see here now it is going to this path because of this condition Okay, so it will write the written to database in this case So if you check the variables value, you can check from here And the employee ID each to Employee name is john department is finance It is street one and something like that. Okay But still you can see here. We have those two parameters values null created by and created on Now we will set the values for those Okay, so as we discussed yesterday, like if I want to set any of the data if I want to calculate something by system or if We have to pass something and we have to store into a process variable We use script task, right? Because you script task calculations, you know, uh, then by apn itself So I can see that Okay, I will click on this one Data outputs and I will click on new custom output. Okay, the new custom output is created. I have I will configure this one So, uh, if I'm talking about created by so created by I can say that who is initiating the process is completing the interface, right? So, uh, it the process variables value will be Or I can see I can simply use process initiator. Okay that we used in Uh, pro uh task assignment as well. Okay Now I will save this one into target employee details created by okay Similarly, if I want to store The value of created on so I will use now function that we discussed in our you know orders sessions So now return the current date and time and I will save this one into created on Okay, I will click on okay and then why Now if I debug this one, okay, it is completed. I have to go to process variable People and now you can see we have uh, all of these employee ID name and all and created by And created and on both so created by is the uh user name of the user who is initiating the process and created on is the current date and time Okay, that we have now So there is one more property that we can check here That is process history. So in process history, I can check like, uh, how the process variables value is updated so from here you can see this, uh Start node is started that is completed. Then there is user input task that is started And it is assigned to this user because we used process initiator right there in the assignment And then it modified the variables that is employee details and in employee details You can see here We do not have employee ID because initially it's original and user filled these details employee name department street country city Right and created by and created on was also null When we submit the form and second variables value is submit after submission of the form Then this user input task the node is completed Okay, and completed by this demo user one Then there was other node that is set data right after this you can see here This is set data in this one if this is started Then in this one also we are you know updating the employee details right because we are update Adding the created or uncreated by on this node. So you can see here We do not have have employee ID. We have other details and then Created by and created on right now this set data is also completed Then we have at Joe right where we are checking the path So in this one if submit is start and come between this there is no any variable updated because we are not saving We do not save anything you're using. Okay, we will just decide the path Then the next node is right to data show entity it started Okay, and the employee it updated the employee details that is employee ID three and other details are same So like this we can check the history of the whole process instance Like what all nodes and when they when these nodes Run and what values are updated Okay, so that we can check from here So even pro it has the whole history of the particular process instance that we can check at any time So like this we store the data into database using User input task. Okay. Similarly, we can configure the Start form also. Okay. Start form also is there Similar to user input task here. Also, we can select the form and we can fill the no Configure the interface and we can ask user to fill the details. So that is also same Okay, and this end node you also have you know Uh We can create it as terminate node as well. So we can just go to result and we have to create terminate node So if terminate node can only be one in a process model, but end node can be multiple So if there is any active, you know Component and if we click on end node And if there are so the process won't be completed But if you are clicking on terminate node in that is that active Component or active node will automatically be completed and This process will be completed. Okay. Now, suppose The value is already there into the you know that process variable and if I want to pass the value into Interface, okay So now, uh, we were not passing any value into the interface, right? We were just taking the input from user But if I want to pass the existing value into the interface so that user can update that value In that case we use the Value part here, right? We have value and save into both two part two parameter Save into we use to save the value of the ac parameter And if I want to you know pass any of the value into the ac then I use value part, okay Like I can select this one. I can do the manipulations or data calculations. Okay, whatever I want I can do So it pass like this. So first the value will be pb Okay, using value parameter. We copy that value into the activity class parameter and through activity class parameter We pass this to rule input. Okay. So it is opposite Parts so if I want to take the any input from user I will first it will save into rule input that in then it will come to activity class parameter and then process variable If I want to pass the cross, you know, uh rule input value from process model Then I first it will come to process variable then activity class parameter and then rule input. Okay, so like this it works Now, uh, there are a lot of smart services similar to write to data store entity To, you know, perform different different activities Like if I want to store Do you know if I want to generate document like dog dog x or excel file or Some other type of document I can use these documents and this and type of smart services There are other like if there are some related to ai skills Some are related to all the integrations. Okay for web services So there are a lot of smart services that we can use according to our requirement If I want to send email Okay to any of the user using apn what I can do I can use this smart service Okay, that is send email So in send email That I can do I have to configure I have to go to setup and I have to configure from his life from where we are sending the email Okay, it can be process name process model name process initiator name Process designer name and if I want some custom sender I can use this one So it will I can configure the display name of the user and email send us email ID Okay, so that will be displayed into the email box of the user Now here we can define the you know multiple users To whom we want to you know Send the email so that we can configure here if I want to add cc I can add from here if I want to be cc then I can add from here if I want to attach any, you know Number of documents I can add this from this add attachments parameter Then if I want to define the subject of the email I can define if I want to Have that body part of that particular email that we can define here if I want to patch No, create that Estimal template for the email I can use this estimal template. Okay, and this estimal template can also be dynamic and So if I want to pass some values, I can create some keys in that estimal template like this triple has Okay, like triple has employee name triple has something like that So even will automatically read those keys and will we can pass the dynamic values to replace those keys Okay, and it will send the email to the user Okay, so it is very simple to use the send email smart service in apn Similarly, we can use the other smart services as well so This is all about a process model like how what all parameters process model have and how we can Store the data into database using process model how we can calculate the data how we can Set the some of the fields by system automatically or How we can take the input from user then we can save into the database we can check the history We can check the process variables. Okay, that all we can done using process variable. So this is very important and Very powerful feature of apn that we can So using that we can create the whole workflow So this is one of the simple workflow But suppose if I want to assign some task to some user like if I'm filling the inform Form of law and approve, you know Launch request and then I can save into the database I can send the email to the user that you request to submit it then I can assign the task to the manager and approvers of the bank that Please review that, you know data and you can Approve or reject the task or ask user to again Do some changes so for that also we can create the process and we can create the interface So whole You know workflow like it can be approval workflow or other type of work. So we can creating apn with the help of Process model. Okay. This was all about process model If you want the community environment access So you can put your request on telegram group or you can fill this google form So we will check and we will Provide you the access if you have any questions or query you can Put on our telegram channel or you can Email on this training at the read the code mesh to.com So Thank you everyone and I want to hand over to sign this up Okay, and Thank you uncle. So I think Whoever needs instance or environment They can reach out to this email and then we can send this google doc link and they can fill That way. Yes, it would be better and like next week. What topics we are going to cover So we'll cover records in next week next week Till then see you Bye everyone Bye everyone. Thank you