Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-2550

CreateContentFunction saves all JCR session after creating the content

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major Major
    • 4.2.0
    • None
    • Workflow
    • None

      CreateContentFunction saves all JCR session after creating the content.
      It's a bit harsh and can lead to some unwanted errors, for instance when a batch of contents are created while modifications are made by other contributors:

      Item cannot be saved because it has been modified externally: node /
      
      javax.jcr.InvalidItemStateException: Item cannot be saved because it has been modified externally: node /
      at org.apache.jackrabbit.core.ItemImpl.getTransientStates(ItemImpl.java:245)
      at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1091)
      at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:915)
      at org.ametys.web.workflow.CreateContentFunction.execute(CreateContentFunction.java:167)
      at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.ametys.runtime.plugin.component.PluginsComponentManager$ComponentInvocationHandler.invoke(PluginsComponentManager.java:159)
      at $Proxy3.execute(Unknown Source)
      at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:869)
      

            Unassigned Unassigned
            ngavalda Nicolas Gavalda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: