Create 3 sequential catalog tasks in workflow

John_123_Snow
Mega Expert

Can you share an example how to create 3 catalog tasks in workflow assigned to different assignment group? The logic should be:

Create task 1 - assign to group A

only if task 1 is completed

Create task 2 - assign to group B

only if task 2 is completed

Create task 3 - assign to group C

only if task 3 is completed 

Close complete the Request

 

1 ACCEPTED SOLUTION

Yash Agrawal1
Tera Guru

Hello John.

Requirment Fullfilled

You no need to write the code. Just simply create the new Workflow on the "Requested item table".And drag "Catalog Task ACtivity" on form as below

find_real_file.png

As you see above three catalog task is created asl note from the above workflow,2nd will generate only if 1st is complete.same as 3 will start when 2nd is complete.

YOu can configure the "Catalog task" activity as below

find_real_file.png

I hope my answer completed your requirement,I tried it on my personal instance.and it is working fine.

Please mark the answer As CORRECT and HELPFUL, if your query is solved.

Regards

Yash Agrawal

View solution in original post

4 REPLIES 4

Anil Shewale
Mega Guru

Hi

If you want to query only based on the resolved state  or completed 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;

}

}

If it help mark helpful or correct 

Thanks and regards

Anil

Yash Agrawal1
Tera Guru

Hello John.

Requirment Fullfilled

You no need to write the code. Just simply create the new Workflow on the "Requested item table".And drag "Catalog Task ACtivity" on form as below

find_real_file.png

As you see above three catalog task is created asl note from the above workflow,2nd will generate only if 1st is complete.same as 3 will start when 2nd is complete.

YOu can configure the "Catalog task" activity as below

find_real_file.png

I hope my answer completed your requirement,I tried it on my personal instance.and it is working fine.

Please mark the answer As CORRECT and HELPFUL, if your query is solved.

Regards

Yash Agrawal

Hello John,

I hope from the detailed provided solution,your query is resolved,if so then please mark my answer as CORRECT AND HELPFUL.

REGARDS

YASH K.AGRAWAL

Harshal Gawali
Giga Guru

Hello John,

You should go with @Yash Agrawal's approach. You can use "catalog task" activity in workflow to create task and you can assign it to any group.

In "catalog task" core activity related list there is UI action "condition". Using that UI action You can add  "Closed Complete" and "Closed Incomplete" condition. 

If you want more details about catalog task workflow activity, please go through below link.

Catalog Task workflow activity

 

Regards,

Harshal.