Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Create Task activity in workflow is not creating task

Nithin21
Tera Expert

 I want Change task to be auto-assigned to assignment group selected in Change Request

 

I have added User approval to "Change Request - Normal" workflow

Once approved, there is a Branch task that leads to 2 "Create Task" activities. 

>> Wait for Completion is set to True

When I approve the change request ->Both the "Create Task" activities are in "Running" state

Expected result:
2 change tasks created for this change request

Assignment group is set as that of change request

Actual result:

Change task is not created . 

find_real_file.png

Script mentioned in both "Create Task" activity

find_real_file.png

1 ACCEPTED SOLUTION

Mike Patel
Tera Sage

Can you check type of task you have in each activity.

find_real_file.png

View solution in original post

9 REPLIES 9

Can you open approval activity can share screenshot? and also screenshot of whole task activity.

Sure am on my phone travelling back home ... Give me 45 mins , will share details

Hakim5
Kilo Contributor
  1. I have the same issue, I did check the task type, but I'm still not getting a newly created problem task
  2. Is an advanced script necessary?

find_real_file.png

No, advance script is not necessary. Does your workflow gets kicked off. Check workflow context.

Hakim5
Kilo Contributor

Thanks Mike, I was able to get the workflow working. I followed the steps of Automating Problem Management Workflow, hopefully, others will find it helpful as well

https://developer.servicenow.com/app.do#!/event/knowledge18/LAB0234/knowledge_18_LAB0234_automating_...

 

Will the workflow works and the guide helped tremendously, I am not getting the unexpected error where the tasks are not being moved to the viable state and I am getting the error message Error Message: Invalid state transition. Can not update from state '(-5)' to state '(1)' with given values.

I am currently troubleshooting this and believe it has something to do with the default business rule on the task table, but I am not sure as of yet.