Skip to main content
14-Alexandrite
December 12, 2023
Solved

OData - CompleteWorkitem returns the error "This task cannot be updated..."

  • December 12, 2023
  • 1 reply
  • 3956 views

Dear all,

 

I have a question regarding completing the work items. I have a work item which includes a custom EnumeratedType attribute "MySize". 

 

xolomon_0-1702374258679.png

When I try to complete the activity using the OOTB Endpoint from Workflow Domain, I am getting an error that the enumerated type is not supported like below:

 

"This task cannot be updated.Variable type ext.dropdown.MySize is  not supported."

 

xolomon_1-1702374687893.png

URL: {{baseUrl}}/WorkItems('{{WorkItemId}}')/PTC.Workflow.CompleteWorkitem

Request Body: 

{
    "AutomateFastTrack"false,
    "UserEventList": ["Yes"],
    "VoteAction""",
    "WorkitemComment""Dummy",
     "Variables":[{
        "Name":"MySize",
        "Value":"Small",
        "TypeName":"ext.dropdown.MySize",
        "DisplayName":"MySize"
    }]
}
Does anybody have a solution / workaround regarding this? 

 

Thanks in advance!

Best answer by HelesicPetr

Hi @xolomon 

I can see just only one workaround.

extends existing site, with own custom REST API function that does exactly what you need.

PetrH

1 reply

HelesicPetr
22-Sapphire II
22-Sapphire II
December 12, 2023

Hi @xolomon 

Be careful if you use display value or the internal value of the enumeration. 

I guess that you should use the internal value.

And the question of the day, Is the internal value real;y "Small" ? 

PetrH 

xolomon14-AlexandriteAuthor
14-Alexandrite
December 12, 2023

Hi @HelesicPetr,

 

thanks for the remark, I have been trying with both internal and external values. But unfortunately this is not the main problem.  It seems that OOTB only allows primitive, string and date variables in this area. 

 

Cheeers,

Xolomon

xolomon14-AlexandriteAuthor
14-Alexandrite
December 20, 2023

Hi @HelesicPetr and @joe_morton,

 

thanks for your messages. The example that I have provided was exactly based on the article mentioned by @HelesicPetr for the discussion. The real life example is similar to the example but with customer specific enumeration. I also think that it is a supported customization as the example was provided us by the technical support.