Configuration Type | Default Actions |
---|---|
Action Bar | Approve, Reject, Analyze, and Reassign |
Part Action Bar | Report a Problem and View in Windchill |
Document Action Bar | Open Document, Report a Problem, and View in Windchill |
Input | ||
---|---|---|
Property Name | Description | Property Type |
Disabled | Disables the widget in the mashup. | Boolean |
Input | Used for identifying the data to be fetched from the backend system. | JSON in CCO format |
ServiceActionId | When the action is clicked, this string is updated with the action ID of a service action. | String |
SubComponentConfiguration | Bind the configuration to this property if it changes in the runtime. | JSON |
Output | ||
---|---|---|
Property Name | Description | Property Type |
EventTriggered | Event that is triggered when a service finishes running or a popup is displayed, if the action is configured with thefireEventOnFinish configuration property as true. | Event |
ServiceActionIdChanged | Event that is triggered when the value in ServiceActionId is changed, meaning that a service invoked by the Action Bar has finished running. | Event |
PopupClosed | Event that is triggered when a popup that was opened is closed. | Event |
Property Name | Description | Property Type | Default Value | Required or Optional | ||
---|---|---|---|---|---|---|
maxItemsToShow | The maximum number of action buttons that are shown. If there are more action buttons than the value specified, additional actions will be populated in the list box. | 2 | Required | |||
modelThingName | The name of a Thing that contains a service with the following signature: public JSONObject GetActions(@ThingworxServiceParameter(name = "ccoJson", baseType = "JSON") JSONObject ccoJson) This service takes input in CCO format containing a single item. It then returns a JSONObject containing an array that maps the ID of an available action to its label as received from the back-end. See example in Sample JSON Configuration below. | PTC.ActionBar Model.Thing | Required | |||
actions | The list of actions for which data needs to be fetched from the backend system. Container key is actionConfiguration. See sub-properties below: | N/A | Required | |||
overrideLabel | The value set here is shown as the action button’s label, overriding the value that comes from the backend system. To localize, put double brackets around the value. | N/A | Optional | |||
actionButtonVisibility | Determines under what conditions the action buttons are shown, and in what state. Options: AlwaysShown, DisableUnavailable, HideUnavailable. For AlwaysShown, button is always visible and enabled. For DisableUnavailable, button is always visible, but disabled when action is unavailable for given selection. For HideUnavailable, button is only visible when action is available for the given selection. Note: There are other configurations that affect whether a button is enabled or disabled. | N/A | Required | |||
buttonStyle | Determines the visual style of the button. Options: primary, secondary, tertiary, danger, transparent. | N/A | Required | |||
overrideSetDisabled | If this field is set, then its value is the only factor in determining if a button should be enabled or disabled. Options: true, false. True ensures that the button is disabled, and false ensures that the button is enabled. | N/A | Optional | |||
fireEventOnFinish | If this field is set to true, when a service finishes running, the event EventTriggered is triggered, and when a popup is closed, the event PopupClosed is triggered. | N/A | Optional | |||
inputConstraints | Determines the input constraint for the action. Options: InputRequired, SingleInputOnly, and NoInputRequired. InputRequired: This action must receive input to operate. If the input is empty and doesn't contain any items, this action's button is disabled. SingleInputOnly: This action must receive a single input in order to operate. If the input is empty or contains more than a single item, this action's button is disabled. NoInputRequired: This action can operate without any input, or with input. | N/A | Optional | |||
iconWhenEnabled | If this field is specified, the action's button contains an icon to the left of the label when the action button is enabled. | |||||
entityName | The name of the media entity to use as an icon. | |||||
iconWhenDisabled | If this field is specified, the action's button contains an icon to the left of the label when the action button is disabled. | |||||
entityName | The name of the media entity to use as an icon. | |||||
activityType | Determines whether the action runs a service or displays a popup mashup. Options: openUrl (available in ThingWorx Navigate 9.3.4 and later versions), popup, service, and parent (available in ThingWorx Navigate 9.4.0 and later versions). See the tables below for the required sub-properties for popup, service, and parent. | N/A | Required | |||
mashupName | The name of the mashup that appears as a popup. This property is used only when activityType is set to popup. | N/A | Required | |||
redirectAfterPopupSuccess | Redirects to another mashup when the popup is closed after a successful operation. To inform the Action Bar whether the operation performed by the popup was completed successfully, set the session parameter named PTC.ActionBar.popupCloseParameters to indicate success or failure. For example, in the popup mashup there can be an expression that is executed after the operation performed by the popup finishes, and in that expression the session parameter is set. In the following example, the JSON attribute operationSuccessful is set to true since the operation was successful: sessionStorage.setItem("PTC.ActionBar.popupCloseParameters", JSON.stringify( { operationSuccessful: true } )); This property is used only when activityType is set to popup. | N/A | Optional | |||
popupWidth | Specifies the width of the popup that appears. This property is used only when activityType is set to popup. | 1024 | Optional | |||
popupHeight | Specifies the width of the popup that appears. This property is used only when activityType is set to popup. | 640 | Optional | |||
thingWithService | The name of the Thing that contains the service to run. This property is used only when activityType is set to service. | N/A | Required | |||
serviceName | The name of the service to run. This property is used only when activityType is set to service. | N/A | Required | |||
parameters | This optional field allows us to pass hard-coded parameters to a service or a popup mashup. The parameters are defined in a JSONObject must be formatted as a string of a JSON object, with escaped-quotations. Parameters should be input into the configuration file in the form "{\"myParamName\": \"hardcodedValue\"}" . See additional information below. This property is used only when activityType is set to service or popup. | N/A | Optional | |||
openUrl | Allows setting a URL on the action button. When set to a valid value, a new window or tab opens with set URL on selecting the action button. This property is used only when activityType is set to openUrl. | N/A | Optional | |||
parentId | This optional field allows setting the ID of the parent action. When set to a valid value, it symbolizes that there is a parent action with that ID and sets the action to be an option under the parent menu button. If there is no action with the same ID that is set in parentId, the action is ignored and is not displayed. This property is used only when activityType is set to parentId. | ID of the parent | Optional |
There are two parameters that your service gets automatically, if you define the service signature to receive them: serviceParam_InputCco and serviceParam_ActionId. The parameter serviceParam_InputCco is a JSONObject, and is the input that was provided to the Action Bar. The parameter serviceParam_ActionId is a string that contains the ID of the action that was clicked. If your service doesn't include these parameters in its signature, you cannot use them. If you would like to use them, define your service signature to use either or both of them, using the following: @ThingworxServiceDefinition(name = "MyService", category = "MyCategory") public void MyService( @ThingworxServiceParameter(name = "serviceParam_InputCco", baseType = "JSON") JSONObject serviceParam_InputCco, @ThingworxServiceParameter(name = "serviceParam_ActionId", baseType = "STRING") String serviceParam_ActionId) |