Cannot invoke workflow documentworkflow action publishBranch: action not allowed or undefined

Hi,

I am facing below error on frequent basis, we have our own authoring and from there through api we create content, while doing that some time we face this issue,

18.01.2024 10:39:29 ERROR Hippo JCR Quartz Job Scheduler_Worker-2 [ScheduleWorkflowTask$WorkflowJob.execute:132] Execution of scheduled workflow operation publish on /content/documents/myapp/xyz failed
org.hippoecm.repository.api.WorkflowException: Cannot invoke workflow documentworkflow action publishBranch: action not allowed or undefined
        at org.onehippo.repository.scxml.SCXMLWorkflowExecutor.triggerAction(SCXMLWorkflowExecutor.java:302) ~[hippo-repository-workflow-14.5.0.jar:14.5.0]
        at org.onehippo.repository.scxml.SCXMLWorkflowExecutor.triggerAction(SCXMLWorkflowExecutor.java:278) ~[hippo-repository-workflow-14.5.0.jar:14.5.0]
        at org.onehippo.repository.documentworkflow.DocumentWorkflowImpl.triggerAction(DocumentWorkflowImpl.java:493) ~[hippo-repository-workflow-14.5.0.jar:14.5.0]
        at org.onehippo.repository.documentworkflow.DocumentWorkflowImpl.publishBranch(DocumentWorkflowImpl.java:456) ~[hippo-repository-workflow-14.5.0.jar:14.5.0]
        at org.onehippo.repository.documentworkflow.DocumentWorkflowImpl.publish(DocumentWorkflowImpl.java:337) ~[hippo-repository-workflow-14.5.0.jar:14.5.0]
        at sun.reflect.GeneratedMethodAccessor226.invoke(Unknown Source) ~[?:?]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_342]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_342]
        at org.hippoecm.repository.impl.WorkflowManagerImpl$WorkflowInvocationHandler.invoke(WorkflowManagerImpl.java:382) ~[hippo-repository-engine-14.5.0.jar:14.5.0]
        at com.sun.proxy.$Proxy238.publish(Unknown Source) ~[?:?]
        at org.onehippo.repository.documentworkflow.task.ScheduleWorkflowTask$WorkflowJob.execute(ScheduleWorkflowTask.java:127) [hippo-repository-workflow-14.5.0.jar:14.5.0]
        at org.hippoecm.repository.quartz.RepositoryJobJob.execute(RepositoryJobJob.java:50) [hippo-repository-engine-14.5.0.jar:14.5.0]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.3.2.jar:?]
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.3.2.jar:?]

Can you please help me, we are using 14.5.0.
Thanks,
Manish

This means the user performing the publish action doesn’t have the authorization to publish, or the document is not in a state that allows a transition to the publish state.

@kumamanish You need to provide more context to this problem.
From the error above, we can only know that the logged-in user does not have permission to publish or the document is not corrupted state like @jasper.floor said.