You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The flag `canExecute` indicates if an action can be run under current conditions. This prevents executing actions that are not allowed by the app's security settings. User roles can be set in the microflows and nanoflows, allowing users to call them. For more information on user roles and security, see the [Module Security Reference Guide](/refguide/module-security/).
62
62
63
63
You can also employ this flag when using a **Call microflow** action triggering a microflow with a parameter. Such an action cannot be run until a parameter object is available, for example when a parent data view has finished loading. Attempting to `execute` an action that cannot be run will have no effect, and generates a debug-level warning message.
64
64
65
65
The exception to this behavior is when the `ActionValue` is returned by [`ListActionValue.get()`](/apidocs-mxsdk/apidocs/pluggable-widgets-client-apis-list-values/#listactionvalue). In this case, the flag will be true when not all arguments have been loaded. Calling `execute()` for an action with loading arguments will run the action as soon as all arguments become available. While waiting, `isExecuting` will be set to `true` and subsequent calls to `execute()` are ignored. If any arguments become unavailable after loading, the action will not run and a debug-level warning message will be logged.
66
66
67
-
#### isExecuting {#isexecuting}
67
+
#### 4.1.2 isExecuting
68
68
69
69
The flag `isExecuting` indicates whether an action is currently running. A long-running action can take seconds to complete. Your component might use this information to render an inline loading indicator which lets users track loading progress. Often it is not desirable to allow a user to trigger multiple actions in parallel. Therefore, a component (maybe based on a configuration) can decide to skip triggering an action while a previous execution is still in progress.
70
70
71
71
Note that `isExecuting` indicates only whether the current action is running. It does not indicate whether a target nanoflow, microflow, or object operation is running due to another action.
72
72
73
-
#### execute {#execute}
73
+
#### 4.1.3 execute
74
74
75
75
The method `execute` triggers the action. It returns nothing and does not guarantee that the action will be started synchronously. But when the action does start, the component will receive a new prop with the `isExecuting` flag set.
76
76
77
-
When the action property [defines action variables](/apidocs-mxsdk/apidocs/pluggable-widgets-property-types/#action-xml-elements), the `execute()` method expects an object map containing a property for each variable. The variables may be passed as undefined, but need to be set explicitly.
78
-
79
-
Given an action property that defines two `Decimal` variables `lat` and `long`, and a `String` variable named `label`, its `execute()` method accepts the following input:
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/frontend/pluggable-widgets/pluggable-widgets-property-types.md
-33Lines changed: 0 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -487,23 +487,6 @@ When a `dataSource` attribute is specified and configured by the user, it is pas
487
487
|`defaultValue`| No | String | Default value for the property, the format should be `<ModuleId>.<DocumentId>`|
488
488
|`defaultType`| No | String | Default type for the property, supported values are `None`, `OpenPage`, `CallNanoflow`, `CallMicroflow`|
489
489
490
-
#### XML Elements {#action-xml-elements}
491
-
492
-
`<actionVariables>` — Defines variables a widget provides when calling [`execute()` on an ActionValue](/apidocs-mxsdk/apidocs/pluggable-widgets-client-apis/#execute). The variables are made available in Studio Pro when configuring [Call a Microflow](/refguide/on-click-event/#call-microflow) and [Call a Nanoflow](/refguide/on-click-event/#call-nanoflow) actions.
493
-
494
-
`<actionVariable>` (required one or more) — Represents a primitive value provided by the widget as an argument when calling `ActionValue.execute()`. The variable is defined by the following attributes:
495
-
*`key` (required) — The identifier of the variable used in Studio Pro and the Pluggable Widgets API.
496
-
*`type` (required) — The type of the value that the variable represents. Supported types and their corresponding Typescript type are listed in the table below.
497
-
*`caption` (required) — A short description of the variable that is displayed in Studio Pro.
498
-
499
-
| Action Variable Type | Client Type |
500
-
| -------------------- | --------- |
501
-
|`String`|`string`|
502
-
|`Integer`|`Big`|
503
-
|`Decimal`|`Big`|
504
-
|`DateTime`|`Date`|
505
-
|`Boolean`|`boolean`|
506
-
507
490
#### Studio Pro UI
508
491
509
492
When the property is defined as follows:
@@ -519,22 +502,6 @@ Then the Studio Pro UI for the property appears like this:
The attribute property type allows a widget to work directly with entities' attributes, both reading and writing attributes. Depending on the widget's purposes, a widget should define attribute types it supports.
0 commit comments