Article - CS314121

Error "The parameter 'UserEventList' must not be null" while calling CompleteWorkItem endpoint from custom OData Connector in ThingWorx Platform

Modified: 15-Oct-2019   


Applies To

  • Windchill PDMLink 11.0 M030 to 11.2.0.5
  • ThingWorx Platform 8.1 to 8.5
  • Windchill Navigate (formerly ThingWorx Navigate) 1.6.0 to 8.5.0

Description

  • UserEventList is supplied but Windchill denotes it is null
  • Correct input parameter data type and format for a collection type Windchill parameter
  • Error while calling CompleteWorkItem endpoint from OData Connector
  • PTC Workflow Domain CompleteWorkItem endpoint does not work as expected
  • Collection type parameters from Windchill are being set to base type String in ThingWorx
  • Attempt to complete a Task in Windchill through OData Connector ThingWorx Service is failing
  • Windchill <Windchill Home>\logs\MethodServer log shows the following:
    • [Date Time] ERROR [ajp-nio-127.0.0.1-8010-exec-7] com.ptc.odata.core.entity.processor.ActionProviderProcessor [Username] - An exception occurred
      org.apache.olingo.server.api.ODataApplicationException: The parameter 'UserEventList' must not be null.
          at com.ptc.odata.core.entity.action.ActionProcessorData.getOperationParameters(ActionProcessorData.java:118)
          at com.ptc.odata.core.entity.processor.BasicEntityProcessor.getOperationParameters(BasicEntityProcessor.java:327)
          at com.ptc.odata.core.entity.processor.BasicEntityProcessor.callEdmOperation(BasicEntityProcessor.java:303)
          at com.ptc.odata.core.entity.processor.BasicEntityProcessor.processAction(BasicEntityProcessor.java:180)
          at com.ptc.odata.windchill.entity.processor.PersistableEntityProcessor.processAction(PersistableEntityProcessor.java:1509)
          at com.ptc.odata.core.entity.processor.ActionProviderProcessor.processAction(ActionProviderProcessor.java:346)
          at com.ptc.odata.core.entity.processor.ActionProviderProcessor._processActionEntity(ActionProviderProcessor.java:102)
          at com.ptc.odata.core.entity.processor.ActionProviderProcessor.processActionEntity(ActionProviderProcessor.java:90)
          at org.apache.olingo.server.core.ODataDispatcher.handleActionDispatching(ODataDispatcher.java:235)
          at org.apache.olingo.server.core.ODataDispatcher.handleResourceDispatching(ODataDispatcher.java:137)
          at org.apache.olingo.server.core.ODataDispatcher.dispatch(ODataDispatcher.java:113)
          at org.apache.olingo.server.core.ODataHandlerImpl.processInternal(ODataHandlerImpl.java:160)
          at org.apache.olingo.server.core.ODataHandlerImpl.process(ODataHandlerImpl.java:85)
          at org.apache.olingo.server.core.ODataHttpHandlerImpl.process(ODataHttpHandlerImpl.java:74)
          at org.apache.olingo.server.core.ODataHttpHandlerImpl.process(ODataHttpHandlerImpl.java:88)
          ...
      Caused by: Collection must not be null for parameter: UserEventList
          at org.apache.olingo.server.core.deserializer.json.ODataJsonDeserializer.createParameter(ODataJsonDeserializer.java:277)
          at org.apache.olingo.server.core.deserializer.json.ODataJsonDeserializer.consumeParameters(ODataJsonDeserializer.java:254)
          at org.apache.olingo.server.core.deserializer.json.ODataJsonDeserializer.actionParameters(ODataJsonDeserializer.java:212)
          at com.ptc.odata.core.entity.action.ActionProcessorData.getOperationParameters(ActionProcessorData.java:103)
          ... 78 more
  • Following error is seen in the ThingWorx UI when executing the associated Service:
    • Error executing service <Service Name>. Message :: Your route exchange has failed. Service operation failed [https://<Windchill Host>/Windchill/oauth/servlet/odata/v1/Workflow/WorkItems(ID='OR%3Awt.workflow.work.WorkItem%3A<Work Item ID>')/PTC.Workflow.CompleteWorkitem] with status [ - The parameter 'UserEventList' must not be null.] - See Script Error Log for more details.
This is a printer-friendly version of Article 314121 and may be out of date. For the latest version click CS314121