Sequential task generation

sunny13
Giga Expert

I want to develop a workflow such a way that i want my workflow to wait till one task is Resolved/Closed complete and then move to next task.

I'm trying to achieve   this with a "wait for condition" since i also want to check the state = Resolved.

find_real_file.png

Also what happens is when i Resolve one task it "Resolve" my RITM as well it did not wait for another task to get generated   but as per i requirement i want my RITM not to get resolved / closed until all my tasks are resolved / complete

I'm not sure whether the issue is clear let me know if you require more details

1 ACCEPTED SOLUTION

yes I know that, What you have mentioned in the question was "I want to develop a workflow such a way that i want my workflow to wait till one task is Resolved/Closed complete". So this can do that trick if closed complete is fine.


If you want to query only based on the resolved state then wait for condition should be used.


Slightly modify your code like,


var gr = new GlideRecord('sc_task');


  gr.addQuery('request_item',current.sys_id);


  gr.query();


  gs.log('TASK1 count:'+gr.getRowCount());


  while (gr.next()) {


  gs.log('TASK1 state:'+gr.state);


  if(gr.state != 6)


  {


  gs.log('TASK1 inside if');


  answer = true;


}


}


View solution in original post

11 REPLIES 11

Hi Ajai,



I also want to set the delivery date accordingly.



For eg : If i'm resolving Catalog task 1 on 5/30




I want to add 2 more days to the next catalog task delivery date which got generated.



If possible i would like to check the scheduled dates also .