Stations
Stations are the fundamental building blocks of your workflows. Each station represents a discrete step, checkpoint, or task that can be included in routes.
What is a Station?
A station is a reusable workflow step definition. Think of it as a template for a task - you define it once and can use it in multiple routes. When a station is added to a route, it becomes a “stop” on that route.
type Station { id: ID tenantId: String name: String description: String remotePortalId: ID}Creating Stations
Use the addStation mutation to create a new station:
mutation CreateStation { addStation(input: { name: "Quality Check" description: "Verify all quality standards are met before proceeding" }) { id name description }}Input Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | String | Yes | Display name for the station |
description | String | No | Detailed description of what happens at this station |
remotePortalId | ID | No | Link to an external system or portal |
Updating Stations
Update Station Name
mutation UpdateName { updateStationName( id: "station-123" name: "Enhanced Quality Check" ) { id name }}Update Station Description
mutation UpdateDescription { updateStationDescription( id: "station-123" description: "Comprehensive quality verification including safety checks" ) { id description }}Remote Portals
Stations can be linked to remote portals, allowing them to connect with external systems. This is useful for integrations where a station represents an action in another application.
Link to a Remote Portal
mutation LinkPortal { linkStationToRemotePortal( id: "station-123" remotePortalId: "external-system-456" ) { id remotePortalId }}Unlink from a Remote Portal
mutation UnlinkPortal { unlinkStationFromRemotePortal(id: "station-123") { id remotePortalId }}Querying Stations
List All Stations
query ListAllStations { listStations { id name description remotePortalId }}Get a Specific Station
query GetStation { getStation(id: "station-123") { id name description remotePortalId }}Deleting Stations
mutation DeleteStation { deleteStation(id: "station-123") { id name }}Real-time Updates
Subscribe to station changes to keep your UI synchronized:
Station Added
subscription OnStationAdded { stationAdded(tenantId: "your-tenant-id") { id name description }}Station Updated
subscription OnStationUpdated { stationUpdated(tenantId: "your-tenant-id") { id name description remotePortalId }}Station Deleted
subscription OnStationDeleted { stationDeleted(tenantId: "your-tenant-id") { id }}Best Practices
Naming Conventions
Use clear, action-oriented names that describe what happens at the station:
| Good | Bad |
|---|---|
| ”Review Application" | "Step 1" |
| "Manager Approval" | "Approval" |
| "Send Notification" | "Notify” |
Descriptions
Write descriptions that help users understand:
- What needs to happen at this station
- Who is responsible
- Any prerequisites or requirements
- What happens next
Granularity
Find the right level of granularity for your stations:
- Too granular: “Click Submit Button” - This is an action, not a workflow step
- Too broad: “Handle Everything” - This doesn’t provide useful tracking
- Just right: “Submit Application for Review” - Clear, trackable step
Example: Building a Station Library
Here’s an example of creating a reusable station library for a hiring workflow:
# Create all stations for hiring workflowmutation CreateHiringStations { screening: addStation(input: { name: "Resume Screening" description: "Initial review of candidate resume and qualifications" }) { id }}
mutation CreatePhoneScreen { phoneScreen: addStation(input: { name: "Phone Screen" description: "30-minute phone interview to assess basic fit" }) { id }}
mutation CreateTechnicalInterview { technical: addStation(input: { name: "Technical Interview" description: "In-depth technical assessment with engineering team" }) { id }}
mutation CreateCultureInterview { culture: addStation(input: { name: "Culture Interview" description: "Team fit and culture alignment discussion" }) { id }}
mutation CreateOffer { offer: addStation(input: { name: "Extend Offer" description: "Prepare and send job offer to candidate" }) { id }}Once created, these stations can be combined into routes for different hiring scenarios - engineering roles might include technical interviews while other roles might skip them.