Change state value to closed when rejected for change request

k_jayanth
Tera Contributor

I have to change the state value of change to 'close' when it is rejected but i am unable to do it through workflow activity. Should i write any business rule for this or is there any other easy way?

Many thanks,

- Jayanth

1 ACCEPTED SOLUTION

I think the problem is more of that if it's rejected, it should move to canceled, since it haven't been implemented. And for that there already is a method you can reuse the code from perhaps. On change request there is a UI Action called "Cancel change", look at the code there and you should be able to pretty much copy paste that to get it to work without going through all the different stages.



And I would avoid using closed on changes that isn't implemented and use cancel instead, sorry I missed that in the original question, to focus on the workflow activity I guess


View solution in original post

11 REPLIES 11

DilipKumar DJ
Kilo Guru

Hi Jayanth,



You should be able to do using Workflow activity. Are you using Set Value activity? Could you pls post your workflow details.


Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

This should easy be doable with the set value activity. Is that what you have tried?


k_jayanth
Tera Contributor

I had tried using setValue and i tried assigning current.state to 'close' and current.update() . But none of them are working.


Here is the screenshot of the workflow.



find_real_file.png



find_real_file.png


The change is closed using the 'Closed' UI Action button which calls script include.


When you look at a workflow that has been rejected, does it take the path through this set value activity?