how to Add a state to the change state model

suprakash
Giga Expert

I added two states draft and work in progress as the   process given in   Add a state to the change state model

in my case the first step is draft and second state will be work in progress after that there are other states

i have to do in a way that from draft the state will only be updated to work in progress. After it comes to work in progress then it may go to another state for . this is emergency change request type

But i cannot understand how to edit the script include ChangeRequestStateModel_emergency.

Need help

1 ACCEPTED SOLUTION

Hi Suprakash,



'Review' is a OOB Change request state, so you do not have to define 'canMove' or 'moving' function separately for review. In your case the code will below:



work_in_progress: {


              nextState: [ "review" ],


             


              review: {


                      moving: function() {


                              return this.toReview_moving();


                      },


                     


                      canMove: function() {


                              return this.toReview_canMove();


                      }


              },



I hope this helps.Please mark correct/helpful based on impact


View solution in original post

23 REPLIES 23

Hi Saptashwa,



Sitting over here, it is very difficult for me to debug what is causing the issue. All I can do is to show you how to achieve if you want to add newly generated states. The rest you have to do it by yourself.


Lastly, I can suggest to use the OOB ''ChangeRequestStateHandlerSNC' and modify whatever you want in 'ChangeRequestStateHandler', as I have mentioned many more times.


Can I share you my instance details so that you can look into the matter?


Hi Saptashwa,



Unfortunately, currently I am bit Busy with My work. I will try after some days on your personal instance once I get Time. In Between You can start Updating your script include as per my responses above in the Thread.


suprakash: If you have some time can you please help Saptashwa ...... as the issue for both of you are same


In my case also its not working Amlan.


I am working on it.


If its get solved I will let both of you Know.



Thanks


The thing i noticed after trying   is that if we want to add any particular or insert any particular states in between the ootb states   keeping the ootb states active , then its working fine. But if we want to deactivate the ootb states and create all the new states in that way, then its not working