Calling a Subprocedure

2 minute read

This tutorial shows how to use the step configuration process to call an existing procedure to use as a subprocedure.

To view an example procedure for this tutorial , go to the automation platform UI > Projects > EC-Tutorials- <version> , and click the procedure name.

An explanation of what you see:

  • The Procedure Details page for the Calling a subprocedure procedure contains a step named Execute a procedure from this project. (Clicking on this step takes you to the Edit Step page.)

  • The Action column displays a plugin (or project) name, EC-Tutorials, and a procedure name, Working with properties in a stored procedure. (Clicking on the plugin/project name takes you to the Project Details page for that project, and clicking on the procedure name takes you to the Procedure Details page for that procedure.)

Click Run to run this sample procedure and see the resulting job status on the Job Details page.


Use the following instructions if you would like to practice creating another subprocedure for this "Calling a subprocedure" procedure.

Any changes you make within this tutorial will not be saved when you upgrade CloudBees CD and cannot be transferred to your procedures. These instructions only provide a clearer explanation for how you can call subprocedures in your projects.

To create a step that executes a subprocedure:

  1. On the Procedure Details page, click the Create Step link to see the Choose Step Type dialog.

    • Select the Subprocedure tab.

    • Select Plugin and place your cursor in the text field and start typing EC-Tutorials.

    • For Procedure, click inside the text box and select Reserving a Resource for job step duration procedure or whichever procedure you would like to choose.

    • Click Create to go to the New Step page to create the step to call an existing procedure to use as a subprocedure.

  2. On the New Step page, enter any new step name of your choice. Notice that no parameters are required for this step.

  3. Click OK to return to the Procedure Details page to see your new step in the table, then click Run.

  4. When the Job Details page is displayed, you can see your new step and the procedures it is calling.