How to access the catalog task number within the Workflow Activity creating the task?

Zod
Giga Guru

HI,

within a Workflow on RITM we create a catalog task via the normal activity.

Beside setting the variables accordingly I need to update the activity stream with the task number created.

I also activated the "wait for completion" .. so I don't nee d the number later - I need it directly with the activity.

Sure I could add a business rule etc. to add it, but I wonder how to do WITHIN the activity.

 

This way it does not work ... The Text will show up, but not the number ... 

find_real_file.png

 

 

1 ACCEPTED SOLUTION

Thanks for your help and effort.

I added workflow.scrachpad.task_number = task.number within the task activity.

Then I added a parallel part, with a wait condition to be sure the scratchpad exists ... then I just used it to add the comment ... 😉

Works 😉

 

find_real_file.png

 

View solution in original post

7 REPLIES 7

Can you explain your approach so that it benefits future readers

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Khalid5
Tera Expert

I have similar kind of use case, where I need to fetch the task number and task sys_id at create task workflow step.

Any suggestion to get these values ?

@Ankur Bawiskar - how it can be done through business rule ? Can you please explain the approach ?

Thanks for your help!

Regards,

Khalid

 

Khalid5
Tera Expert

I need the task number and task sys_id to send it to the REST Message - Post Method at create task workflow step

I don't think Business Rule approach will help here.

Please let me know if you have any suggestion to get the task number and sys_id 

Thanks,

Khalid