Adding and Running a Simple Connectivity Test Workflow#
We will guide you through adding and running a simple workflow. The sample workflow will include:
A request module for you to put the name of your protocol/method that you want to run
Run instrument actions, which will run the protocol/method you input
A log message that confirms you ran it
During this Workflow, you should see that your method runs and you will have the ability to monitor the state of your instrument through the Digital Twin and your method state through the job!
Make sure your adapter project is open in Visual Studio Code in a dev container and is not running.
Open the your hardware-specific page which you can find on the list in Supported Equipment.
From that page, copy the workflow text into your adapter in a new file named as indicated in the file’s caption.
Replace the lab_guid in the workflow heading with the one from your Lab (most easily found by opening the Lab in Artificial and looking in the browser address bar).
- Generate action stubs by:
In Visual Studio Code in your Dev Container, on the left edge, click to open the Artificial Workflow Authoring Extension.
Hover over the
Adapter Functions
text on the top of the left pane.Click on the
Generate Action Stubs
button that appears next to it.
To publish the workflow to your Lab, again in the Artificial Workflow Authoring Extension’s left pane, in the
Workflow Publishing
section, click the icon next to the tutorial workflow’s name to publish it. You may alternatively click on thePublish Workflow
text button that appears just above your workflow in the python file containing it.- Now you are ready to run it!
First, make sure to start your adapter running. (In VS Code go to Run and start it running).
Next, make sure your driver is running on the lab PC (Double-click the shortcut on the desktop if it is not running).
Go to your Lab in Artificial.
In the top left dropdown, click
Create New
and selectQuick Run
. Select the new workflow.Enter the full path and name of the method that the workflow should run on the hardware as parameters.
Click
Submit
.You should see the workflow begin to run with Job information in the side pane.
For troubleshooting, consult the troubleshooting section on Adapter Configuration.
You have successfully run a workflow from Artificial on your lab hardware!