Summary: The Molecule Input (Mobile) component is a good template for how the other input components work, so it is worth looking at this protocol in more detail. First, examine the interface to the Molecule Input (Mobile) component as shown below:
For all input components, the first parameter is required and blank by default.
It is imperative that you promote this first parameter onto the protocol interface for the input to be requested and performed. Otherwise, the protocol will fail to run and will instead generate an error ("required parameter missing").
If this parameter is promoted, the user will be guided through performing the appropriate action to provide the needed input data when the protocol runs on a mobile client.
Most input components also provide a set of Test parameters that declare data for testing on non-mobile devices. This makes it possible to create and test the protocol in the Pipeline Pilot client before deployment on the mobile device. (This also illustrates one of the goals of the Mobile Collection – to provide components that generate protocols that can be executed in either mobile or non-mobile settings.)
For the Molecule Input (Mobile) component, the test parameter is called Test Molecule, and its value is a server-side test molecule.
Testing protocols that contain an input component requires one additional step – editing the promoted input parameter and making it non-required. After you complete this task, you can run and test your protocol.
Tip: Before you deploy the protocol and test on an actual mobile device, be sure modify the protocol by again making the promoted parameter required.
Running and Testing Your Protocol
Notice how this input request is presented on the mobile device. On your iPad, create or activate an account with the Task Root of "Protocols/Mobile/Developer". (This is a set of developer examples to guide you on writing mobile protocols.)
- Go to the Home pane and open the Inputs category.
- Press the Simple Molecule Input task to open the Task Settings dialog shown below:
- Press on the red Molecule setting to start the molecular sketcher.
- After drawing the molecule, press Done to return to the Task Settings dialog. The Molecule setting will no longer be displayed in red, now that it has a new value.
- Press Submit to run your task. When it is complete, the Results window displays a table with a picture of your molecule.
The developer examples, including Simple Molecule Input, contain useful tips and descriptions that should assist you in writing your own task protocols. Be sure to examine this task protocol and write a few of your own.