Workflow 5 SDK - Define Input/Output types
Some of the built-in activities in Workflow 5 have checkboxes/Boolean, instead of string input. In reviewing the SDK documentation, we do not see how to set this Input “type” (under Control Activity Appearance > Input interface). Is there any documentation on the input/output interface types supported in the SDK and how the decorators are defined? Our primary interest is Boolean (checkboxes) and enum (dropdown list).
Thank you,
-Tom
-
Checkboxes don't actually show up on activities. They only appear on form elements within the Display Form activity.
If you are creating a custom activity with a Boolean input Workflow Designer will automatically suggest the true/false options.
We don't have any specific support for enums, because these aren't really part of JavaScript. However, in most cases we are able to achieve something very similar using string union types. When Workflow Designer sees a string union type input it automatically provides suggestions for the known types. Here's how we do this for the Unit input of the Buffer activity
unit?: "meters" | "feet" | "kilometers" | "miles" | "nautical-miles" | "yards" | string;I hope this helps.
--Ryan
0 -
Thank you Ryan! This will make end user experience better. Looks like we still need to check if they selected the correct value because they can type anything in.
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
2 kommentarer