Hi, I've installed the beta version of Workflow plugin (https://github.com/jenkinsci/workflow-plugin) I created one Workflow job with the following DSL:
def myClosures = [:] myClosures['Project1'] = { println "in myClosure of Project1"; run_on_node 'Project1' } myClosures['Project2'] = { println "in myClosure of Project2"; run_on_node 'Project2' } print myClosures parallel(myClosures) def run_on_node(project) { echo "in run_on_node() project=${project}" echo "Getting hostname" sh 'hostname' echo "Listing /tmp directory" sh 'ls -lrt /tmp' } When I run the above, it gives below error: Console Output Started by user anonymous [Project1:com.cloudbees.groovy.cps.impl.CpsClosure@57129d5b, Project2:com.cloudbees.groovy.cps.impl.CpsClosure@718ee06]in myClosure of Project1 in myClosure of Project2 Running: Execute sub-workflows in parallel : Start Running: Parallel branch: Project1 Running: Parallel branch: Project2 Running: Print Message in run_on_node() project=Project1 Running: Print Message Getting hostname Running: Shell Script Running: Execute sub-workflows in parallel : Body : End Running: Print Message in run_on_node() project=Project2 Running: Print Message Getting hostname Running: Shell Script Running: Execute sub-workflows in parallel : Body : End Running: Execute sub-workflows in parallel : End Running: End of Workflow org.jenkinsci.plugins.workflow.cps.steps.ParallelStepException: Parallel step Project1 failed at org.jenkinsci.plugins.workflow.cps.steps.ParallelStep$ResultHandler$Callback.checkAllDone(ParallelStep.java:123) at org.jenkinsci.plugins.workflow.cps.steps.ParallelStep$ResultHandler$Callback.onFailure(ParallelStep.java:102) at org.jenkinsci.plugins.workflow.cps.TeeFutureCallback.onFailure(TeeFutureCallback.java:27) at org.jenkinsci.plugins.workflow.cps.BodyInvoker$FailureAdapter.receive(BodyInvoker.java:225) at com.cloudbees.groovy.cps.impl.ContinuationGroup.throwException(ContinuationGroup.java:198) at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:75) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:100) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:76) at sun.reflect.GeneratedMethodAccessor589.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21) at com.cloudbees.groovy.cps.Next.step(Next.java:53) at com.cloudbees.groovy.cps.Next.run(Next.java:44) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:120) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:156) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:271) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$000(CpsThreadGroup.java:71) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.call(CpsThreadGroup.java:183) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$3.call(CpsThreadGroup.java:181) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) at org.jenkinsci.plugins.workflow.cps.CpsVmThread.run(CpsVmThread.java:21) Caused by: java.lang.NullPointerException at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.start(DurableTaskStep.java:88) at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:132) at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:89) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:15) at WorkflowScript.run_on_node(WorkflowScript:22) at WorkflowScript.run(WorkflowScript:5) at Unknown.Unknown(Unknown) at ___cps.transform___(Native Method) at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:69) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:100) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ... 18 more Finished: FAILURE Can you explain the usage of parallel() in workflow DSL? Is there any documentation on the workflow. So far I only found this link: https://github.com/jenkinsci/workflow-plugin-pipeline-demo/blob/master/flow.groovy Thanks for your help in advance! -- View this message in context: http://jenkins-ci.361315.n4.nabble.com/workflow-plugin-error-tp4726187.html Sent from the Jenkins users mailing list archive at Nabble.com. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.