# 5 - First Step

Up to now we've created a pipeline by adding existing steps to the pipeline definition. In this section we create a new step.

Steps can contain any logic you choose, but for simplicity here we'll keep it simple and just write out a message to the console.

# Creating the step

  1. Create a new folder myProject/steps.
  2. Copy COURSE-FILES/2.5-first-step/MyFirstStep.js into this folder.
  3. Open COURSE-FILES/2.5-first-step/app.js using Open to the Side, and copy the changes to your app.js.

Once you restart the server, your step will be available for adding to pipelines in MONDAT. It will appear under the myProject category on the pipeline definition page, because we registered it as 'myProject/myFirstStep'.

# Testing the step

  1. In MONDAT, add your new step to myPipeline, just after the delay.

  2. Save app.js again, so the server restarts with the new pipeline definition.

  3. Run the test again. In the console for the server, you will see the messages written out by your step.

rec= SaySomething { msg: 'Hello World 1' }
RandomDelayStep (s-db115096da7f8a9c15a1a302960b42f07e72e8aa)
Delay 50ms (50ms - 500ms)
Random delay completed
Here we are in my first step. Yay!           <=== HERE IT IS!!!
rec= SaySomething { msg: 'Hello World 2' }
1
2
3
4
5
6

ZZZZZ Step description and UI fields ZZZZZ https://mail.google.com/mail/u/1/#search/replyConverter/KtbxLzFzVXbQbfBTWrqlsvsmRJGdXxXDXq

ZZZZZ Make changes to access the input and the definition

Deployed on Github Pages.
Last updated: 2023-05-17, 15:37:23 UTC