Preflight
- Last updated on March 26, 2024
- •
- 1 minute to read
Let's look at how you can get output images from the Preflight Tool.
To do so, perform the task extract-project-resource
and filter the resources by the Hires
type.
{
"tasks": [
{
"description": "Extract resources from project",
"name": "extract-images",
"type": "extract-project-resource",
"parameters": {
"projectItemName": "Preflight",
"projectItemResourceType": "Hires"
},
"outputArtifacts": [
"hires*"
]
},
{
"description": "Finalize",
"name": "finalizing",
"type": "finalize",
"finalArtifacts": [
"hires*"
]
}
]
}
As a result, links to high-resolution print files will appear in the project.
If you need to share these links outside of BackOffice, then you should also set up access to these files or use access tokens.
For example, let's add URLs linking to preflight results to the product order. This is how we can split our goal into simple operations, from getting images from the project to cleaning up the pipeline and updating the project.
flowchart TB
t1(Getting images from preflight)
t2(Configure access to the images)
t3(Attach the images to the order)
t4(Finalizing)
t1--images-->t2
t2--images-->t3
t3-->t4
These operations are performed using the following tasks:
{
"tasks": [
{
"description": "Extract resources from project",
"name": "extract-images",
"type": "extract-project-resource",
"parameters": {
"projectItemName": "Preflight",
"projectItemResourceType": "Hires"
},
"outputArtifacts": [
"hires*"
]
},
{
"description": "Configure access to print files",
"name": "configure-access",
"type": "configure-artifacts",
"inputArtifacts": [
"hires*"
],
"parameters": {
"anonymousAccess": "true"
}
},
{
"description": "Attach artifacts to order in ecommerce",
"name": "export-urls",
"type": "export-to-ecommerce",
"inputArtifacts": [
"hires*"
],
"parameters": {
"dataItemType": "commaSeparatedList",
"dataItemKey": "results",
"dataItemValue": "{{hires*:url}}"
}
},
{
"description": "Finalize",
"name": "finalizing",
"type": "finalize",
"finalArtifacts": [
"hires*"
]
}
]
}
For more details, refer to the tutorial How to create pipelines.