Workflow rename bug

Hello, guys!

I'm having problems renaming a workflow that has rules. After renaming the workflow, my rules stopped working. I have this error:

It doesn't describes anything and I have logs in my rules:

Processing issue *****-170:
Script *****-******-workflows-test-env/issue-comment-added not found
 
            jetbrains.youtrack.scripts.internals.ExceptionsProcessingKt$withScriptingAndDBExceptionsProcessing$1.invoke(ExceptionsProcessing.kt:28)
            jetbrains.youtrack.scripts.internals.ExceptionsProcessingKt$withScriptingAndDBExceptionsProcessing$3.invoke(ExceptionsProcessing.kt:61)
            jetbrains.youtrack.scripts.internals.ExceptionsProcessingKt.withScriptingAndDBExceptionsProcessing(ExceptionsProcessing.kt:86)
            jetbrains.youtrack.scripts.internals.ExceptionsProcessingKt.withScriptingAndDBExceptionsProcessing$default(ExceptionsProcessing.kt:17)
            jetbrains.youtrack.scripts.persistent.AbstractScriptRunner.doEvaluate(AbstractScriptRunner.kt:71)
            jetbrains.youtrack.scripts.persistent.AbstractScriptRunner.doEvaluate$default(AbstractScriptRunner.kt:69)
            jetbrains.youtrack.workflow.model.RuleRefresher.refreshRule(RuleRefresher.kt:30)
            jetbrains.youtrack.workflow.model.StatelessRule$doHandle$1.invoke(StatelessRule.kt:29)
            jetbrains.youtrack.workflow.model.StatelessRule$doHandle$1.invoke(StatelessRule.kt:5)
            jetbrains.youtrack.workflow.model.Rule.withLogging(Rule.kt:256)
            jetbrains.youtrack.workflow.model.StatelessRule.doHandle(StatelessRule.kt:26)
            jetbrains.youtrack.workflow.model.Rule$handle$1.invoke(Rule.kt:80)
            jetbrains.youtrack.workflow.model.Rule$handle$1.invoke(Rule.kt:39)
            jetbrains.youtrack.scripts.internals.RunInContextKt.runInContext(RunInContext.kt:17)
            jetbrains.youtrack.workflow.model.Rule.runInContext(Rule.kt:312)
            jetbrains.youtrack.workflow.model.Rule.handle(Rule.kt:79)
            jetbrains.youtrack.workflow.ext.RulesRunner.handleBeforeFlush(RulesRunner.kt:171)
            jetbrains.youtrack.workflow.ext.RulesRunner.callRules(RulesRunner.kt:132)
            jetbrains.youtrack.workflow.ext.RulesRunner.run(RulesRunner.kt:79)
            jetbrains.youtrack.workflow.ext.WorkflowIssueListenerImpl.beforeFlushBeforeConstraints(WorkflowIssueListenerImpl.kt:63)
            com.jetbrains.teamsys.dnq.database.TransientSessionImpl$notifyBeforeFlushListeners$2.invoke(TransientSessionImpl.kt:752)
            com.jetbrains.teamsys.dnq.database.TransientSessionImpl$notifyBeforeFlushListeners$2.invoke(TransientSessionImpl.kt:45)
            com.jetbrains.teamsys.dnq.database.TransientSessionImpl$forAllListeners$1.invoke(TransientSessionImpl.kt:1309)
            com.jetbrains.teamsys.dnq.database.TransientSessionImpl$forAllListeners$1.invoke(TransientSessionImpl.kt:45)
            com.jetbrains.teamsys.dnq.database.TransientEntityStoreImpl.forAllListeners$dnq_transient_store(TransientEntityStoreImpl.kt:319)
            com.jetbrains.teamsys.dnq.database.TransientSessionImpl.forAllListeners(TransientSessionImpl.kt:1307)
            com.jetbrains.teamsys.dnq.database.TransientSessionImpl.notifyBeforeFlushListeners(TransientSessionImpl.kt:752)
            com.jetbrains.teamsys.dnq.database.TransientSessionImpl.beforeFlush(TransientSessionImpl.kt:708)
            com.jetbrains.teamsys.dnq.database.TransientSessionImpl.flushChanges(TransientSessionImpl.kt:510)
            com.jetbrains.teamsys.dnq.database.TransientSessionImpl.flush(TransientSessionImpl.kt:190)
            jetbrains.charisma.main.YouTrackTransactionalFilter.filter(RestFilters.kt:109)
            org.glassfish.jersey.server.ContainerFilteringStage$ResponseFilterStage.apply(ContainerFilteringStage.java:196)
            org.glassfish.jersey.server.ContainerFilteringStage$ResponseFilterStage.apply(ContainerFilteringStage.java:163)
            org.glassfish.jersey.process.internal.Stages.process(Stages.java:171)
            org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:442)
            org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:434)
            org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:329)
            org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
            org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
            org.glassfish.jersey.internal.Errors.process(Errors.java:315)
            org.glassfish.jersey.internal.Errors.process(Errors.java:297)
            org.glassfish.jersey.internal.Errors.process(Errors.java:267)
            org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
            org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
            org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
            org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)
            org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
            jetbrains.youtrack.webapp.servlets.GapRestServlet.service(GapRestServlet.kt:82)
            org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)
            org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)
            org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:763)
            org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1651)
            jetbrains.youtrack.webapp.filters.SecurityResponseHeadersFilter.doFilter(SecurityResponseHeadersFilter.kt:18)
            jetbrains.youtrack.webapp.filters.FilterAdapter.doFilter(FilterAdapter.kt:26)
            org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1638)
            jetbrains.youtrack.webapp.filters.LoggingServletRequestFilter.doFilter(LoggingServletRequestFilter.kt:33)
            jetbrains.youtrack.webapp.filters.FilterAdapter.doFilter(FilterAdapter.kt:26)
            org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1638)
            jetbrains.youtrack.gaprest.filters.HttpContextAccessorFilter.doFilter(HttpContextAccessorFilter.kt:22)
            org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1638)
            webr.framework.controller.BaseApplicationServletFilter.doFilter(BaseApplicationServletFilter.java:24)
            org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1638)
            jetbrains.youtrack.webapp.filters.MdcProviderServletFilter.doFilter(MdcProviderServletFilter.kt:17)
            org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1638)
            jetbrains.youtrack.webapp.filters.CorsRequestFilter.doFilter(CorsRequestFilter.kt:57)
            jetbrains.youtrack.webapp.filters.FilterAdapter.doFilter(FilterAdapter.kt:26)
            org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1638)
            jetbrains.youtrack.webapp.filters.InitOrderFilter.doFilter(InitOrderFilter.kt:37)
            jetbrains.youtrack.webapp.filters.FilterAdapter.doFilter(FilterAdapter.kt:26)
            org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1638)
            com.jetbrains.bundle.proxy.jetty.AllowOriginOneTimeFilter.doFilter(AllowOriginOneTimeFilter.java:37)
            org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1638)
            org.eclipse.jetty.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:319)
            org.eclipse.jetty.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:273)
            org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1638)
            org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:567)
            org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
            org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:767)
            org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
            org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
            org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
            org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610)
            org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
            org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1377)
            org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
            org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:507)
            org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580)
            org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
            org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1292)
            org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
            org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:234)
            org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
            org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
            org.eclipse.jetty.server.Server.handle(Server.java:501)
            org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
            org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
            org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
            org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
            org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
            org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
            org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
            org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
            org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
            org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
            org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
            org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
            org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
            org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
            java.base/java.lang.Thread.run(Thread.java:834)

I think there are some bug with renaming workflows. I can fix this problem by renaming my rules, after that they start working.

I want to report a bug, sorry if I did something wrong.

Best regards Alex.

3 comments
Comment actions Permalink

Hi! 

I'm Sergey from the Youtrack team. 

Do I get it right that you renamed a rule and then some other workflows stopped working? Did these other workflow rules reference this renamed rule? If so, did you update the name in the reference? 

0
Comment actions Permalink

Sergey Merzlov Hi! I just created a workflow, for example, issue-workflow-test and then I've created a rule (on-change) issue-changed inside that workflow, I test it so it works fine and I decided to change workflow name to issue-workflow. So after that change my workflow throws error that it can't find rule issue-changed.

0
Comment actions Permalink

Ah, I see now. Thanks.

This bug is already reported in our public tracker: https://youtrack.jetbrains.com/issue/JT-61710 Please feel free to vote for it, as it increases its priority and subscribes you to the email notifications. To do so, sign in to Jetbrains Youtrack and hit a thumbs up icon. 

0

Please sign in to leave a comment.