Link Workflows to Catalog Entities
Link a Workflow to catalog entities so that it appears on matching entity pages with inputs pre-filled from entity data.
Without a link, developers may find it difficult to and search and trigger a Workflow from the Workflows page, and then manually enter entity-specific details such as the service name, owner, and project.
Harness IDP lets you link your Workflow to catalog entities. When you link a Workflow to an entity kind and type, the Workflow appears on each matching entity page with its inputs pre-filled from the entity metadata. For example, when a developer triggers the Create S3 Bucket workflow from a service's entity page, IDP fills in the service name and owner from that service's YAML.

Before you begin
You need the Create/Edit permission for Workflows in the Workflow's scope. Users without this permission can view linked Workflows on entity pages, but they can't create, edit, or unlink a link configuration. Go to Workflows RBAC to configure permissions.
The Workflow must define the inputs you plan to map. Go to Configuring Workflow Inputs to add inputs.
The catalog must contain entities of the kind and type you plan to target.
Link a workflow to entities
In Harness IDP, go to Workflows.
On the Workflow card, click the three-dot menu, and then select Link workflow to entity.

The Link Workflows page opens with the Link target and Field mapping sections.
Each Workflow has one link configuration with three parts:
Scope
The Account, organizations, and projects whose entities receive the link. Optional. If you leave Scope empty, the Workflow appears on matching entities across the account.
Link target
One or more Entity Kind and Entity Type pairs. The Workflow appears on every entity that matches a pair, for example every Component of type service.
Field mapping
Pairs of a Workflow input and an entity field path. IDP reads the value at the path from the entity YAML and pre-fills the input. Optional. The same mappings apply to every link target.

Define the link target
(Optional) Click Scope, and then select the Account, organizations, or projects whose entities receive the link. Use the search box to find a project or organization. Each selection appears as a tag in the field.
In Entity Kind, select the kind of entity to target. The list includes the built-in kinds and the custom kinds defined in your account.
In Entity Type, select the type. The list displays the types available for the selected kind.
If you wish to target additional kind and type, click + Add More, and then repeat steps 2 and 3 for the new row.
Map entity fields to workflow inputs
In Field mapping, click Create a Mapping. If the link already has a mapping, click + Add More.
In Workflow Input, select the input to pre-fill. The list groups inputs by the Workflow form page they belong to.
In Entity Field Source, enter the path to the entity YAML field that supplies the value. Use dot notation for nested fields.
Repeat steps 1 to 3 for each input you want to pre-fill.
The following entity YAML and table illustrate how IDP resolves each path:
name
Payment Processing Service
owner
group:account/platform_team
spec.lifecycle
production
metadata.description
Processes card payments for checkout.
Save the link
Click Confirm to save the link, or click Discard to cancel it.

The Workflow now appears in the Linked Workflows card on every entity that matches the scope and a link target.
Execute a linked workflow from an entity page
Go to Catalog, and then open an entity that matches a link target.
On the Overview tab, locate the Linked Workflows card. The card lists every Workflow linked to the entity.

Click Execute next to the Workflow.
The Workflow form opens with the mapped inputs pre-filled from the entity YAML. Review the values, complete any empty inputs, and then submit the form.
Edit a workflow link
Go to Workflows.
On the Workflow card, click the three-dot menu, and then select Edit workflow entity link.
Update the scope, link targets, or field mappings. To remove a row, click the delete icon next to it.
Click Save Changes.
Unlink a workflow
Unlinking removes the Workflow from every entity page and resets its link configuration. You can't undo this action. The Workflow itself stays on the Workflows page.
Go to Workflows.
On the Workflow card, click the three-dot menu, and then select Edit workflow entity link.
In Danger Zone, click Unlink.
In the Confirm Delink dialog, click Delink.
Last updated
Was this helpful?