How to abandon a Workflow using an Automation Chain

I have the following Automation Chain:

  1. Fetch -> Context documents
  2. Execution Flow -> Run Chain | id = @{Document[“dcns-common:comments”] == empty ? “WF_Show_Warning_Chain” : “WF_Do_Something_Chain”}
  3. Workflow Context -> Cancel Workflow | id = @{workflowInstanceId}

I want to cancel this workflow, but I've got the following error:

Not allowed to follow transition from stateCaused by: org.nuxeo.ecm.core.api.ClientException: Unable to follow transition at org.nuxeo.ecm.core.api.AbstractSession.followTransition(AbstractSession.java:2774) at org.nuxeo.ecm.core.api.impl.DocumentModelImpl$7.run(DocumentModelImpl.java:1023) at org.nuxeo.ecm.core.api.impl.DocumentModelImpl$7.run(DocumentModelImpl.java:1020) at org.nuxeo.ecm.core.api.impl.DocumentModelImpl$RunWithCoreSession.execute(DocumentModelImpl.java:427) at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.followTransition(DocumentModelImpl.java:1020) at org.nuxeo.ecm.platform.routing.core.impl.GraphNodeImpl.setState(GraphNodeImpl.java:173) … 160 more Caused by: org.nuxeo.ecm.core.lifecycle.LifeCycleException: Not allowed to follow transition at org.nuxeo.ecm.core.lifecycle.impl.LifeCycleServiceImpl.followTransition(LifeCycleServiceImpl.java:138) at org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentLive.followTransition(SQLDocumentLive.java:326) at org.nuxeo.ecm.core.api.AbstractSession.followTransition(AbstractSession.java:2745) … 165 more


securityError : false org.jboss.seam.faces.validation : org.jboss.seam.faces.Validation@5b9649f1 org.jboss.seam.transaction.synchronizations : org.jboss.seam.transaction.SeSynchronizations@67d09c30 org.jboss.seam.web.requestContextPath : /nuxeo btn_action : done org.nuxeo.ecm.platform.ui.web.binding.alias.AliasVariableMapper_MARKER : {} nuxeo.disable.redirect.wrapper : true org.jboss.seam.core.conversationPropagation : org.jboss.seam.core.ConversationPropagation@30be488f userManager : org.nuxeo.ecm.platform.computedgroups.UserManagerWithComputedGroups@5b91d2b3 org.ajax4jsf.application.AjaxStateManager.AJAX_VIEW_SEQUENCE : j_id7 currentServerLocation : org.nuxeo.ecm.platform.util.RepositoryLocation@5c13d641 user_message : ocorreu um erro inesperado currentDocument : DocumentModelImpl(3acc11a2-34db-45bd-a146-b5447d79a90c, path=/default-domain/media-container/Deletar, title=Deletar) NuxeoExceptionHandlerMarker : true org.jboss.seam.transaction.transaction : org.jboss.seam.transaction.Transaction@1c8dbd49 lockActions : org.nuxeo.ecm.webapp.edit.lock.LockActionsBean@1d861244 exception_message : Not allowed to follow transition org.jboss.seam.web.servletContexts : org.jboss.seam.web.ServletContexts@4d193d80 org.jboss.seam.web.requestServletPath : /view_documents.faces org.jboss.seam.core.events : org.jboss.seam.core.Events@3414c60b

0 votes

0 answers

1517 views

ANSWER

Hello Sergio,

One simple question, do you have started the workflow just before?

It seems to be a problem related to the lifecycle state of the workflow node that cannot update its state to "suspended" because its lifecyclestate rules doesn't fit to this change (so my guess is that the workflow is not started or in another state that cannot be stopped)

03/05/2014

Yes, this Automation Chain was called by a workflow node (the first node). Actually, I'm trying to restart the node/task, but I don't know how. As I don't know how, I'm trying to cancel the workflow and the next step will be the Start command. How can I restart the Node Task? How can I solve this problem?

Thanks

03/05/2014