Skip to content

Commit 5248e77

Browse files
committed
Add output activity
1 parent 516db92 commit 5248e77

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

src/activities/GetCurrentRouteGeometry.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import Geometry from "@arcgis/core/geometry/Geometry";
21
import type { IActivityHandler } from "@vertigis/workflow";
32
import { getSegmentsForRoute } from "../utils/geometryUtils";
43
import { LinearReferencingConfig } from "../models/LinearReferencingConfig";
@@ -30,7 +29,7 @@ interface GetCurrentRouteGeometryOutputs {
3029
/**
3130
* @description The result of the activity.
3231
*/
33-
geometry: Geometry | Geometry[];
32+
geometry: __esri.Geometry | __esri.Geometry[];
3433
}
3534

3635
/**
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import type { IActivityHandler } from "@vertigis/workflow";
2+
import { IActivityContext } from "@vertigis/workflow/IActivityHandler";
3+
4+
/** An interface that defines the inputs of the activity. */
5+
interface SetFeatureSetForDataSourceInputs {
6+
7+
/**
8+
* @displayName FeatureSet
9+
* @description The FeatureSet that will be used by the data source.
10+
* @required
11+
*/
12+
featureSet: __esri.FeatureSet;
13+
}
14+
15+
/**
16+
* @displayName Set FeatureSet For Data Source
17+
* @category VertiGIS Inline
18+
* @description Designate a FeatureSet to be used in an Inline data source.
19+
*/
20+
export default class SetFeatureSetForDataSourceActivity implements IActivityHandler {
21+
/** Perform the execution logic of the activity. */
22+
execute(inputs: SetFeatureSetForDataSourceInputs, context: IActivityContext) {
23+
context.ambient.outputs["featureSet"] = inputs.featureSet;
24+
return {};
25+
}
26+
}

src/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
export { default as GetMValuesFromCoordinatesActivity } from "./activities/GetMValuesFromCoordinates";
33

44
export { default as GetCurrentRouteGeometryActivity } from "./activities/GetCurrentRouteGeometry";
5+
6+
export { default as SetFeatureSetForDataSourceActivity } from "./activities/SetFeatureSetForDataSource";

0 commit comments

Comments
 (0)