I have defined a new artifact type and am successfully creating new asset instances of it in the publisher - which works well. Recently I was experimenting with my own create_form.hbs under publisher/extensions/assets//themes/default/partials/ and then decided against continuing. After deleting the newly created '/themes/default/partials/create_form.hbs' I then found that when I now try to publish a new instance of the artifact I get the following error thrown:
[2016-11-11 11:17:06,833] ERROR - Failed to invoke action: Create for the asset of id: "9a3a4e55-a5a3-4c94-a2d0-152a10e4ab45".The following exception was thrown: JavaException: org.wso2.carbon.registry.core.exceptions.RegistryException: Preprequest action must be completed before Create {rxt.asset} [2016-11-11 11:17:06,833] ERROR - org.wso2.carbon.registry.core.exceptions.RegistryException: Preprequest action must be completed before Create {asset_api_endpoints}
org.mozilla.javascript.WrappedException: Wrapped org.wso2.carbon.registry.core.exceptions.RegistryException: Preprequest action must be completed before Create (eval code#1(eval)#87) at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148) at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:22
Despite this and the fact that I get the user friendly 'Error' message in the publication page telling me the asset was unable to be created, the new instance does in fact get created (I can see it when I go the the asset list page). I can also edit with no problems.
I'm unsure whether this error is related to the create_form.hbs page I previously created (and then deleted) or whether it is just a coincidence.
Is there a caching problem going on?
Any help on what the error means and how to resolve it would be greatly appreciated.
Thanks in advance.
The defaultAction value (under meta lifecycle) in the asset file was defined as "Create" which didn't match what was in the LifeCycle config. This action must match a valid lifecycle value otherwise the publish page displays an error message despite successfully creating the new asset.