CreateItemTask Deprecated ???

1128
2
08-30-2011 07:21 AM
PrashanthSukumaran
New Contributor II
Hi,

I did see earlier in the REST API that the CreateItem Endpoint is deprecated.  Our app uses the 2.0.1 flex api.  On upgrading to the new 2.1 flex api and see that CreateItemTask does not exist any more. Please update the "Whats New" section with the classes that have been deprecated.

Earlier while using the 2.0.1 api, at the end of my workflow i would do the call
1) CreateItemTask
2) UploadFeatureTask

Does the UploadFeatureTask handle the creation of the Item and hence CreateItem is not required?
What other classes are deprecated?
0 Kudos
2 Replies
MehakSujan
New Contributor
The CreateItemTask has been deprecated in the underlying services (REST/SOAP) since BA Server SP1 and is marked as deprecated in the REST/SOAP Reference documents. In SP2, this has been removed and 2.1 works with SP2. I am not sure whether you have any Busness Analyst Server 10 Service Packs yet on your instance. 

CreateItemTask used to create an empty item which could not be opened, so if an item is created using this task and another task is executed that tries to save the output as this item, the task will fail since the already created empty item cannot be overriden. Instead, folder items should be created by specifying the output parameters of tasks (e.g. using the outputAnalysisItem parameter for feature layers) through which they are created automatically. Use this approach instead where you use CreateItem.
0 Kudos
PrashanthSukumaran
New Contributor II
We are using BA Server 10 SP1.  Like i mentioned the CreateItemTask along with UploadFeatureTask worked just fine for BA Flex API 2.0.1.   I did not face any issues with empty folder issue you mentioned.

For the new BA Flex API 2.1 i commented out the CreateItemTask from the workflow and  the UploadFeatureTask handles the task of creating the Project Item.
0 Kudos