Workflows- set values activity not working

Gergely5
Kilo Contributor

Hi,

I am going through the learning plans provided by the ServiceNow developer portal.

I find it very useful and easy to follow but now I stuck at a challenge.

I have created a workflow to automate approval and task creation process.

If the approval is rejected then I set the state to "Closed Complete", this part works fine.

If the approval is given then I set the state to approved, then I create a task, wait for completion and depending on the result I either go to the end directly, or if it is 3 (Closed Complete) then I go to the same activity as after rejection to set the state to Closed Complete on the record in context.

But this last part doesn't work. When I check the actual context it shows that it was going through the right activities but the state remains Approved. So either the last set values activity was not executed or the record is not saved somehow.

But if I reject the approval then the same activity works fine, and the record is saved.

Any Idea?

Thanks.

14 REPLIES 14

Hi Gergely,

SO which means there are two tables right one is "Needit"second one "Needit Task". 

1. Workflow is running on needit table and creating new needit task

2. Now you wanted to set the status of needit task record .

 

Please confirm if the above two statements are correct.

Regards,

Harish Murikinati.

No 🙂

1. Workflow is running on needit table and creating new needit task

2. The workflow is paused here until I set the task complete MANUALLY

3. After the task is closed MANUALLY the workflow should set the needit record closed complete

Hi,

Its weird , activity is running same direction in both case but the state is not getting updated in once case. 

1. IS the workflow getting attached to the new task

2. Can you send the screen shot what have you written on create needit task activity.

 

Regards,

Harish Murikinati. 

Yes, this is what confuses me. It works fine if I arrive from the approval activity.

Here is the content of the create task activity:

find_real_file.png

aaronbartosch
Tera Contributor

What table are you running this workflow against?  

Also, please include a screenshot of your "set value" workflow activity configuration.