Create the Pipeline
Before you begin:
- Learn how to build a simple pipeline. See Example: Building and Running a Simple Pipeline.
- To develop and validate pipelines that extend Scientific Notebook, you must have a role that includes the Scientific Notebook
app.
- A 3DEXPERIENCE platform
Administrator must create a secure collection in the Scientific Settings and Administration
app that
defines at least Viewer
responsibility for everyone who needs to run the custom action.
- The custom action secure collection does not have to match
the experiment's secure collection when running the action from Scientific Notebook. For more information, see Pipeline Creator Access to Content.
-
Start a new pipeline using the Experiment Actions template.
For more information, see Creating a Pipeline Overview.
-
Click anywhere in the work area
and select .
-
For the ActionId, enter the name to display when someone
selects the action in a Scientific Notebook experiment template.
You must use a unique name so that template authors can distinguish between
different custom action pipelines when they configure experiment templates.
-
For the SectionType, enter
dsinv:SpreadsheetStepTemplate.
-
Click in the corner to open the Experiment
Action subpipeline.
-
From the component Catalog, find and add a
Spreadsheet Section Reader component followed by a
Spreadsheet Section File Reader.
-
From the component Catalog, find and add an Excel
Writer component.
-
For the Excel Writer component, specify the
Destination parameter to define the spreadsheet to
create.
You must store the spreadsheet in a location that is accessible at all stages of the
pipeline. Use a unique filename. For example,
$(/global_properties/primary_job_properties/LocalJobTempDirectory)/SortLogDKeep10.xlsx
-
From the component Catalog, find and add a
Spreadsheet Section Writer component in a second pipeline.
-
Remove the input port of the Spreadsheet Section Writer
component.
-
Configure the Spreadsheet Section Writer:
-
For the Section Title parameter, enter the name that you
want to use for the new spreadsheet section added to the experiment by this action
pipeline.
-
For the Attachment parameter, enter the name of the file
generated by the Excel Writer component. For example,
$(/global_properties/primary_job_properties/LocalJobTempDirectory)/SortLogDKeep10.xlsx.
-
Remove the pass port from the Excel Writer
component.
-
Insert data manipulation components before the Excel Writer
and configure them to handle the expected data in a spreadsheet loaded from an
experiment.
For example, sort the data by a property and then keep only the top 10 rows.

- Optional:
If you want the custom action to replace the experiment's previous spreadsheet
section and its content, do the following:
-
Insert a Custom Manipulator (PilotScript) component
between the Spreadsheet Section Reader and the
Spreadsheet Section File Reader.
-
In the Expression parameter of the Custom
Manipulator (PilotScript) enter the following:
@stepID:=id;
@etag:=etag;
@sectionTitle:=name;
This accesses the title (name), Spreadsheet section identifier (id), and an identifier for the spreadsheet content (etag)
defined on the incoming record and stores them in global properties for the
pipeline. Then, you can use them later.
-
For the Spreadsheet Section Writer component, specify the
following parameter values:
- Step ID:
$(stepID)
- Etag:
$(etag)
- Section Title:
$(sectionTitle)
This uses the values of the global properties you created when the pipeline saves
the generated spreadsheet back to an experiment. If you want to create a new
Spreadsheet section containing the generated spreadsheet, leave these parameters of the
Spreadsheet Section Writer component empty. You can specify a
name for the new Spreadsheet section by providing a Section Title value.
-
In the action bar,
click Save As.
-
For the Secure Collection, choose
Private.
Validate and Test the Pipeline
You can test your action pipeline for your experiments. No one else can access your
custom action because it is in the Private secure collection and in the
Draft
maturity state.
-
Open your custom action pipeline and select the Execution tab on
the Parameters panel.
-
For the Data parameter, specify the UUID for an experiment
with a Spreadsheet section that contains appropriate data, using the format:
{"experimentId":"uuid:xxxxxxxx"}.
To find the UUID of an experiment, open your browser's developer tools console and
then open the experiment. Find the event that specifies the experiment, for example:
setData:experimentID,uuid:0391aaf0-d7b6-4122-a5e9-f3f45d84028a.
-
For the Spreadsheet Section Reader component, define the
StepId parameter.
To find the UUID of the experiment section, open the
History panel for the experiment in Scientific Notebook, identify a change to the Spreadsheet section, and use the corresponding uuid information.
-
On the Parameters panel, select the Data
Cache tab, and collapse the schema node.
-
In the characteristics node, review the
experimentId value.
-
Open the Experiment Action subpipeline and review the data
caches at each stage of your data manipulation process.
-
When you have validated the data flowing through the pipeline, you must clear the
experiment identifier from the pipeline Data parameter.
Publish the Pipeline
Make your pipeline available to people working with Scientific Notebook experiments.
-
Open your pipeline and click Save As.
-
Remove draft from the name, and associate it with a
Secure Collection that is available to people working with Scientific Notebook experiments.
-
From the Pipeline Creator
home page, click Manage Pipelines.
-
From the Actions column, select Publish
for the pipeline.
Result: The pipeline now has a Status of
Published.
|