Skip to main content

Workflow Activity Reference

Inputs and Outputs

The execute method of an activity class has typed inputs and outputs. These inputs and outputs are decorated with block tags to provide display hints in VertiGIS Studio Workflow Designer.

src/activities/CustomActivity.ts
import type { IActivityHandler } from "@vertigis/workflow/IActivityHandler";

/** An interface that defines the inputs of the activity. */
export interface CustomActivityInputs {
/**
* @description The first input to the activity.
* @required
*/
input1?: string;

/**
* @description The second input to the activity.
*/
input2?: number;
}

/** An interface that defines the outputs of the activity. */
export interface CustomActivityOutputs {
/**
* @description The result of the activity.
*/
result: string;
}

/**
* @category Custom Activities
* @description A description of the activity.
*/
export class CustomActivity implements IActivityHandler {
/** Perform the execution logic of the activity. */
async execute(
inputs: CustomActivityInputs
): Promise<CustomActivityOutputs> {
return { result: "test" };
}
}