tsgrp / HPI

OpenContent Management Suite (OCMS)
http://www.tsgrp.com/products
17 stars 5 forks source link

Create AW form fails on Alfresco #2366

Closed gsteimer closed 3 years ago

gsteimer commented 3 years ago

Creating an AW form on edge2 (Alfresco) fails with the following error:

Note - it also is taking significantly longer to fail than I would expect. It sits spinning for ~30 seconds before the error pops up...

2021-02-11 15:46:12,195 50468659    ajp-apr-8009-exec-6 ERROR   Wizard2Impl Error updating the autoNumber object for 'Simple CR' with ID: 'workspace://SpacesStore/aafc5842-7873-4d90-b756-e3f11de83e71 | result of cancel checkout attempt: true
2021-02-11 15:46:12,195 50468659    ajp-apr-8009-exec-6 ERROR   RESTService Error updating the autoNumber object for 'Simple CR' with ID: 'workspace://SpacesStore/aafc5842-7873-4d90-b756-e3f11de83e71 | result of cancel checkout attempt: true
com.tsgrp.opencontent.core.exception.OCRuntimeException: Error updating the autoNumber object for 'Simple CR' with ID: 'workspace://SpacesStore/aafc5842-7873-4d90-b756-e3f11de83e71 | result of cancel checkout attempt: true
    at com.tsgrp.opencontent.wizard.core.Wizard2Impl.getNextAutoNumber(Wizard2Impl.java:906)
    at com.tsgrp.opencontent.wizard.core.Wizard2Impl.createPageSetInstance(Wizard2Impl.java:424)
    at com.tsgrp.opencontent.wizard.action.executer.FinishAndSubmitPSIActionExecutor.executeImpl(FinishAndSubmitPSIActionExecutor.java:108)
    at com.tsgrp.opencontent.core.action.executer.AbstractActionExecuter.executeImpl(AbstractActionExecuter.java:239)
    at com.tsgrp.opencontent.core.action.executer.AbstractActionExecuter.execute(AbstractActionExecuter.java:226)
    at com.tsgrp.opencontent.core.action.executer.AbstractActionExecuter.evaluateAndExecute(AbstractActionExecuter.java:156)
    at com.tsgrp.opencontent.core.action.service.CoreActionService.execute(CoreActionService.java:475)
    at com.tsgrp.opencontent.core.action.service.RESTAction.executeActionPost(RESTAction.java:226)

@dgrumieaux @jharkins2 - could this be related to the recent updates around updating an object with the same version label?

gsteimer commented 3 years ago

Removing the Alfresco label as creating a form fails on edge1 as well

gsteimer commented 3 years ago

Actually, taking the above back. The failure was due to another issue. Reverting this back....

gsteimer commented 3 years ago

Doing some digging with @engerernoah - it seems that this is only a problem on forms that have an existing autonumber object. In other words if you:

Then form creation works fine. For examples, see the Driving History (new autonum) and the Simple CR (deleted autonum and recreated) forms on edge2.

Need to do some more digging before we say that "delete and recreate" is the solution. I'd rather not have that as an upgrade step unless we can automate it, which isn't ideal.

engerernoah commented 3 years ago

Fixed with OC Revision: 26768 Needed to enable the versionable behavior for the checkin service in the case we do not want to create a new version. The checkin service fails on the autonumber object for AW forms with that behavior disabled. Auto number configs were previously versioning each time a form was created, this is fixed with this update and revision 26699.

CR: gsteimer, jharkins