Automating Workfront Request Approval Workflows error 422 | Community
Skip to main content
August 23, 2023
Solved

Automating Workfront Request Approval Workflows error 422

  • August 23, 2023
  • 1 reply
  • 1377 views

I've been trying to build an automated approval workflow in Fusion by following the "Automating Workfront Request Approval Workflows" chapter within the Adobe Workfront Fusion Cookbook but have stumbled upon an error which I can't get beyond. I'm pretty new to Fusion so I may be making a rookie error.

 

I've followed the instructions as best as I can and have build the workflow as closely to the example as possible.

 

When I get to the Custom API Call (POST: Create Approval Process), I'm getting the following error: The operation failed with an error. [422] APIModel V16_0 does not support field shouldCreate (ApprovalPath)

 

This is the overall output:

 

This is the body:

  • {"name":"Fusion Test_64df7da80032fe753f9eb4a3bcacbc7c","objCode":"ARVPRC","approvalPaths":[{"name":"ApprovalPath","objCode":"ARVPTH","shouldCreate":false,"targetStatus":"INP","approvalSteps":[{"name":"Head of Tech","objCode":"ARVSTP","approvalType":null,"stepApprovers":[{"userID":"605a06fe007acd798aaebadef50895a0"},{"userID":"633d90620004540cf20c730878d45f1c"},{"userID":"633d8e1e004eb0e3e993d22fa15497e3"}],"sequenceNumber":null}],"rejectedStatus":"REJ"}],"approvalObjCode":"OPTASK"}

 

What am I getting wrong here?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ChrisStephens

The "shouldCreate" key isn't a thing. Take that part out.

Edit: IIRC you also need to provide a value in the approvalType field, and I don't think sequenceNumber should be sent either.

1 reply

ChrisStephens
Community Advisor
ChrisStephensCommunity AdvisorAccepted solution
Community Advisor
August 23, 2023

The "shouldCreate" key isn't a thing. Take that part out.

Edit: IIRC you also need to provide a value in the approvalType field, and I don't think sequenceNumber should be sent either.

DarshAuthor
August 23, 2023

Thanks for the response.

 

I've removed the "shouldCreate" and "sequenceNumber" elements from the JSON module but still keep getting the "The operation failed with an error. [422] APIModel V16_0 does not support field shouldCreate (ApprovalPath)" error (even after replacing the surrounding modules).

 

I'll have a go at creating the JSON again from scratch and see if I have any luck.

DarshAuthor
August 23, 2023

After some more playing around, I finally managed to get the workflow to work. Thanks so much for your help!