Saturday 28 March 2015

Apps with workflows installation

While developing a SharePoint hosted app with workflows, it got deployed successfully from Visual Studio. Which means workflow was created as part of app and it got installed. The workflows got triggered successfully too in the development site. But when the app was installed in a different web application by uploading the .app file to the app catalog, there were issues. 

Problem:

The uploaded app properties say the app is valid. But ‘View details page’ displayed an error “Sorry, this app is not supported on your server”.

1.       But app without workflows had no issue
2.       App with workflow could be deployed using Visual Studio
3.       Only deployment through app catalog was not happening

Issue:

As per MSDN: https://msdn.microsoft.com/en-ca/library/jj819804.aspx , appprerequisites gets added to the Appmanifiest.xml file.

<AppPrerequisites><AppPrerequisite Type=”Capability” ID=”{CDD8F991-B459-4512-8048-03D5A03FF27E}” MinimumVersion=”15.0.0.0” /></ AppPrerequisites>

This is not seen in the VS studio -> (physical file) Appmanifiest.xml file. The above tag get added only after publishing the app.

Fix: Remove the prerequisites from the appmanifest file.

Steps:


1.     Rename the .app file to .zip
2.     Open the .zip file
3.     Copy and paste the appmanifest.xml file some where
4.     Remove the above highlighted tag  and save
5.     Drag and drop the above saved file to the zip file.
6.     Rename the .zip to .app and proceed with installation steps

Result:

App got installed and workflow got triggered for the associated item.

No comments:

Post a Comment