The next concept that we are going to discuss about is how to use in walkable process.
So what is in local loop process and how are they different from the other processes that we created.
In fact in our previous sessions and we created a number of processes right.
We created processes to auto create regards auto update regards sending out email alerts.
We created various processes.
So how are they different from those in walkable process.
The main difference is that the other processes that we created they get triggered whenever a car change
happens in the system right.
So if you remember whenever we create a process that is an option for us to select and we choose then
add a car change happens so that track or change maybe creation of record adaptation of a record.
So when that happens those processes get good.
However this ineluctable process is different in a way that does ineluctable process gets triggered
by another process which is already present in this system.
This process basically begins say that it isn't really dependent on the master process.
They good very good only by another process so that is the whole concept of this in process
so to better understand this is a workable process have just created a business use case then a newly
constructed record gets created in the system for this trainee.
These sort of actions are to take place and if it does not their trainee then these are tough actions
to take place let's take a quick look of this object in a letter.
Say this was application does instruct that object we created while we grieve while we created our custom
objects we created multiple custom objects to understand the custom objects and relationships.
We basically created other data more Lanois so during that time we created this custom object well.
So this instructor custom object it's good to let a guard.
This is an instructor and a guard and it has some details like the first name last name categories trainee.
It is basically a checkbox feel so then we create a new instructor Ricard.
We need to say if the instructor was a trainee or not a trainee.
All right.
So when we create a instructor record we can create a trainee instructor record but a non Training Instructor
record.
So the distance requirement does that if the instructor that we create is a trainee then a specific
set of actions should take place.
If the instructor required that we create is not a trainee then under then set off actions should take
place.
So this is our business requirement.
So far does a Gladman.
We can we can all make the concept of design work of the process we can actually solve this business
requirement using the regular process that we know.
That is why we are creating the process we can choose that a car change happens and then we can create
a regular process but if you notice the actions that are repetitive actions say for example if it's
a trainee then notify department owner create an event and then send out an email to instructor with
instructor guidelines and then create dusk for trainer and if it's not done start training then notify
the department owner create an event and send out an email to the instructor.
So these three actions are the same and this one is additional right.
So if it's training the same three actions to take place plus one additional action not trainee the
same three actions should take place.
So if you see that as a repetition so then these kind of repetitions happen that time the use in walkable
process.
So basically for us to be created in local loop process and the Immokalee process they do all these
actions and the ineluctable process will be called another master process.
So basically have a mastered process will configured it in such a way that we check the condition of
training and that will call the workable process which will handle the first three actions and will
create another action that is a forward action for the create task for training and if not trainee we'll
just call them workable forces which will manage all these three actions so I directly will be creating
two processes.
One is a workable process and the other is a master process that calls the invaluable process perfect.
Now that we know how the overall solution structure is going to be we should also understand why we
do that right.
This isn't the first solution that does we create a regular process and we can incorporate all these
actions very much yes it will work fine right.
We can create a regular process and then we can create four actions for this and then we can create
three actions for if not training so that we very much work.
But why is that we are using this concept of unworkable process the first main reason for us to using
workable process is to a white rework.
So basically when we do the notify department owner the game recreate that action notified department
owner when the condition is not training and we create an event here we are going to do that here because
I note an e-mail we again create that action here.
So basically we are doing a lot of rework rapid to do work so you look at process a whites that of a
particular work.
The second main reason why we are doing this why we are using in workable process is far easier and
better maintenance in the future.
Say for example today the requirement is this if this trainee training then these four actions if not
training then these three actions perfect.
And then assume that if you have used a regular process and we have created all the forward actions
out to you and we have created three actions out to you but after a couple months time the business
come back to us and say Is that a couple of other options also to be incorporated something like this
if training then it remains the same.
The four actions should take place but if not trainee and then category one.
So they are changing the conditions a little bit if you'll see the instructor record.
They have category and subcategory so category you define and then based on that subcategory also you
can choose.
So they say if it is not a trainee OK but in Category 1 then they want additional action to take place
at the sending out email instructions and they also say if it does not address anybody in category 2
send out email instructions for Category 2 so if we had used a regular process for this scenario then
now what what what we would do ideally we would actually go and it is all this out and then we would
create two more conditions and then we would basically again and again create done notify department
or create even sending out an e-mail to instructor.
So basically we are doing a report to do work so as mentioned earlier this will go to process is very
much used for a widening these sort of repetitive work and also the second thing that we said was for
easier maintenance right.
Like a later point of time business come back to us and they say let's take off the send out an email
to the instructor instead let's create a task to the instructor that is some change or they say this
instead of creating an event will look a different feel a bit all right.
So they are changing the actions.
So in that case if we had constructed a regular process then we have to go and update that in every
single place we have to update it here we have the updated here and we have the updated here but in
case if we had to use the local process we just updated in one single place that does that in lockable
process and that would automatically take care of all these because we update a local process and very
very discard it is updated so that is a main reason for using lockable process.
Why did I put it to work and for easier and efficient maintenance in the future.
So that is the reason I chose this kind of a business scenario so that we can understand the concept
better now that we have the basics ready let's go ahead and create the process incestuous so go for
process builder.
So the first thing what we are going to do is we will be creating that in walkable process and once
we are done creating a workable process let's use that in our master process.
So first let's create a very workable process so I have created this unworkable process so give a meaningful
name and also a more meaningful description.
And here we know this is a workable process.
So we need to choose.
It is invoked by another process but in a regular process that we created all these days.
We chose a car change right.
But this is a workable process.
So we need the tools.
It's invoked by another process only.
These processes created this way can be used in other processes safe effect.
Now let's define our object in our case it is instructed.
So tools instructor and if you notice in our regular process that we already created or during that
our car changes we also get an option off.
Now the tasks are pretty good at the time of creation or creation or update.
But he had we do not get that because this gets a triggered by another process.
So we don't get that act options.
So just choose the object save and now let's add criteria in our scenario that is basically no criteria.
As such whenever this process is triggered all the actions are to take place.
So let's say no criteria but based on the business requirement if there is any criteria they can very
much should define it here so that is an all criteria.
Now we have to define the actions so the actions are three actions.
Basically notifying department or not creating an event and sending out email to instructor so let's
create our fullest action that does notify the department owner
I've already created the other email alert.
So let me use that the fullest action is defined what effect.
Now let's define our second action that is creating an even for the Department owner.
So creating an event it is basically creating at a card
and then that a card type would be event and I said the field values I've assigned it to the Department
owner.
So I have used that type US field reference and here and the instructor tools department can then choose
the one that I really feel and the start date and the end date I have given some random values.
So save.
We have defined our second action and the third action is sending out an email instructing with instructor
guidelines.
So that does again another email alert fill in the details choose appropriate email log and save
perfect.
So now that we have created a workable process with all these three actions out here as you can see
all the three actions are out here.
So now we'll be activating this invaluable process and will use this in local processing our master
process activated the effect it is ready to use.
And now let's create a master process click on Neil give a meaningful name and give a meaningful description
and a more more meaningful description than this.
And the process starts whenever the car changes.
Right.
So this process starts basically whenever a new instructor record gets created in the system.
So does that a car changes.
And this is the master process.
So once we are done let's define our object.
This is instructor and here then that a is created safe and the criteria.
So the first criteria is he for design trainee that card.
So in that case
we'll say we'll pick the trainee feel
it's a checkbox for you.
So I say yes.
So if it's a trainee a card then what has to happen.
We have to add all the actions.
So when the actions the first action should be processes.
So processes here mean the various processes that we have created using process.
So all of it first action name let's say new instructor actions and the unworkable process.
So they look a bit process should already be present and active in the system for you to choose it here.
So choosing lockable process and the tools the variables here in either case we have to select the instructor
because that does what basically is going to far.
There have been no process.
So if it is at a later record you can choose that also based on the business requirement.
So here let me choose the instructor a car seat.
So first off we have created over invaluable process and f you stood here so that in workable process
will automatically handle the first three actions and then the next one this creating task for the trainer.
So that like the way we created regularly I created a glide task to train the and then find that task
object said the field value assigned to I.T. I've chosen the trainer and the priority and the status
as part of the data.
We can define them safe so we have basically configured our first dissection.
That does if training.
Then we have configured this so in the place of creating for actions we have created only to one day
and lockable process and the next is the creating task for trainer so as we have used in local process
we have only created two actions out here so completely using main lockable process in the whole configuration
will only be creating six actions in total to here to here to here.
But otherwise if he had not used in workable process then we would end up creating like about two actions.
All right so that is the concept of workable process creating a workable process and then using it wherever
applicable.
Now let's create a second and third if the second criteria is if not draining button Category 1 so I
have picked the trainee feel and I've said it to be false and I've picked the category feel and equals
Category 1 save the second criteria is ready and for the actions here again choose the local process
here and then the second action will be to send out email instructions for Category 1
give a name call the process and set the variables the very same way how we did for the first criteria
save our first action is ready create a second action.
This is a basic email alert.
Choose the appropriate email alert save so the second action is defined.
So we have we are done with configuring these second criteria.
That is if not training button Category 1.
And did you see how simple that was just called a workable process and then also create this additional
action right.
So similarly let's do for the third category as well so that this criteria is if not trainee button
Category 2 once you are done defining the conditions save
and then define the actions again first as a workable process so choose processes and then give the
action name to is already created workable process
so we have defined our first in workable processes and we have called it here and then let's also create
the second action that does an email alert.
So that is pretty straightforward.
Choose email I don't give a name and choose the email alert all these e-mail alerts I've already created.
Prior to doing this process.
So just to have selected those ones you are done safe Buffett.
So did you see the solution.
Right.
How would we have configured it in a much more efficient and better way using in workable process.
So in the future if you get any change in the requirement you just simply have to go and update the
local bid process.
So once you are updated in the local bid process automatically the master process which causes local
the process the changes will be applicable in all the places.
So if you remove this event and replace it with a task automatically that will get updated in all the
places where our design workable processes being called.
So this is the powerful thing that we can do using any workable process in fact this is a very much
efficient way of configuring business logic says but
so the only step that the spending is to activate the process and then test it out.
So that is pretty straightforward.
I mean we have no configured the solution.
So once we activated we can go create a department a garden and we can see if all those actions are
happening and that should ideally happen.
So no I think based on this video.
The concept of local processes clear.