How to stop the execution of workflow on ritm

rakhi1234
Kilo Contributor

i am creating ritm here work flow is executing on this ritm ,i don't want to execute this workflow in this ritm ,ihow to stop that ,kindly suggest.

6 REPLIES 6

harishdasari
Tera Guru

you have 2 options to stop running the workflow.



1). Go to Workflow Editor and check out the workflow.


OR


2).Go to Maintain Items and select the required catalog form and here remove the workflow associated with this form.




Thanks


vinothkumar
Tera Guru

Canceling a workflow stops the workflow from executing further and sets the workflow context State to Canceled. Canceling a workflow attempts to stop the workflow gracefully by injecting a cancel command into the workflow engine.


To cancel an active workflow:


  1. Navigate to Workflow > Active Contexts.
  2. Select a workflow context record.
  3. Select the Cancel related link.
    A confirmation window appears.
    Confirm cancel window.png
  4. Click OK.
    • The Wait for Cancel window appears. The workflow engine attempts to cancel the workflow gracefully.
    Waiting to cancel wf.png
    • If the workflow does not respond to the cancel command, the Force Cancel window appears.
    Force cancel window.png
  5. Click Force cancel to interrupt the thread the workflow is actively executing, or click Continue waiting to continue waiting for the workflow to cancel gracefully.

hi vinoth,


thanks for your reply...here i am working on very tricky story..


i am creating REQ/RITM by using the scritp


see below


var rctask =new GlideRecord("u_rec_tassk");


//


//


//



var ritm=new GlideRecord("sc_req_item");


ritm.intialize();


ritm.cat_item =rctask.u_cat_item;


ritm.insert();


whenere i am referening catalog item therre was a workflow triggers again i want to stop that workflow


Hi Rakesh,



Please try below lines of code



var workflow = new Workflow();


workflow.cancel(ritm);



Thanks


Anantha Gowraram