Skip to main content

Import

import { work, workRegistry } from "veryfront/work";

Examples

import { work } from "veryfront/work";

export default work({
  id: "supplier-invoice-processing",
  name: "Supplier invoice processing",
  outcome: "Resolve all open supplier invoices.",
  expectations: [
    {
      id: "invoices_discovered",
      description: "Open supplier invoices have been discovered.",
    },
  ],
});

API

work(config)

Create a typed Work definition.
PropertyTypeDescriptionSource
idstringStable project-local Work identifier.source
name?stringHuman-readable display name. Defaults to the id when omitted.source
outcomestringBusiness outcome the execution layer should make true.source
expectations?WorkExpectation[]Expectations tracked as business process state.source
acceptanceCriteria?WorkExpectation[]Deprecated alias for expectationssource
Returns: WorkDefinition

Type Reference

WorkExpectation

One measurable expectation for a Work definition.
PropertyTypeDescriptionSource
idstringStable identifier used by execution state and cloud persistence.source
descriptionstringHuman-readable condition that must be satisfied unless optional.source
optional?trueOptional expectations do not block Work execution completion.source

Exports

Functions

NameDescriptionSource
workCreate a typed Work definition.source

Types

NameDescriptionSource
WorkAcceptanceCriterionDeprecated alias for WorkExpectation.source
WorkConfigConfiguration used by work().source
WorkDefinitionPublic API contract for Work definitions.source
WorkExpectationOne measurable expectation for a Work definition.source
WorkReferenceAgent-level reference to source-declared Work.source

Constants

NameDescriptionSource
workRegistryShared Work registry value.source