If current change state is review and close code is failed how to change the state to implement
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2024 01:12 AM
Hello Experts,
My requirement is If current change state is review and close code is failed how to change the state automatically from review to implement...?
I have crated business rule but it is not working because of one script include.
How can i add above logic without disturbing existing script on script include.
The script include is
var ChangeRequestStateModel_normal = Class.create();
ChangeRequestStateModel_normal.prototype = Object.extendsObject(ChangeRequestStateModelSNC_normal, {
draft: {
nextState: [ "assess" ],
assess: {
moving: function() {
return this.toAssess_moving();
},
canMove: function() {
return this.toAssess_canMove();
}
},
canceled: {
moving: function() {
return this.toCanceled_moving();
},
canMove: function() {
return this.toCanceled_canMove();
}
}
},
assess: {
nextState: [ "authorize" ],
draft: {
moving: function() {
return this.toDraft_moving();
},
canMove: function() {
return this.toDraft_canMove();
}
},
authorize: {
moving: function() {
return this.toAuthorize_moving();
},
canMove: function() {
return this.toAuthorize_canMove();
}
},
scheduled: {
moving: function() {
return this.toScheduled_moving();
},
canMove: function() {
return this.toScheduled_canMove();
}
},
canceled: {
moving: function() {
return this.toCanceled_moving();
},
canMove: function() {
return this.toCanceled_canMove();
}
}
},
authorize: {
nextState: [ "scheduled" ],
draft: {
moving: function() {
return this.toDraft_moving();
},
canMove: function() {
return this.toDraft_canMove();
}
},
scheduled: {
moving: function() {
return this.toScheduled_moving();
},
canMove: function() {
return this.toScheduled_canMove();
}
},
canceled: {
moving: function() {
return this.toCanceled_moving();
},
canMove: function() {
return this.toCanceled_canMove();
}
}
},
scheduled: {
nextState: [ "implement" ],
implement: {
moving: function() {
return this.toImplement_moving();
},
canMove: function() {
return this.toImplement_canMove();
}
},
canceled: {
moving: function() {
return this.toCanceled_moving();
},
canMove: function() {
return this.toCanceled_canMove();
}
}
},
implement: {
nextState: [ "review" ],
review: {
moving: function() {
return this.toReview_moving();
},
canMove: function() {
return this.toReview_canMove();
}
},
canceled: {
moving: function() {
return this.toCanceled_moving();
},
canMove: function() {
return this.toCanceled_canMove();
}
}
},
review: {
nextState: [ "closed" ],
closed: {
moving: function() {
return this.toClosed_moving();
},
canMove: function() {
return this.toClosed_canMove();
}
}
},
closed: {},
canceled: {},
type: "ChangeRequestStateModel_normal"
});
Best Regards,
Nani