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)