Is it possible to specify mask IDs when showing & hiding body masks while data loads? I'm asking as it seems like my body mask is being hidden by some other process before the process I want the mask to show for has completed, so it grants the user the ability to control the page before it's ready.

 

What I was thinking is that if the body mask was given some ID when shown using showBodyMask, only a hideBodyMask specifying that same ID would hide the body mask - any others doing the same may make their own body mask hidden, but if any of them still remained, you would still see the loading spinner. For some reason I seem to remember this being possible in Classic UI, but I can't remember exactly or find the examples.

Like 0

Like

3 comments
Best reply

It was possible to get the mask Id in classic (it is returned from MaskHelper.ShowBodyMask()), but I don't believe that had any impact on something else not hiding the mask. As far as I am aware, that was only used to get the mask so you could display or change the message (the Freedom UI mask doesn't have a message, only the spinner)

It was possible to get the mask Id in classic (it is returned from MaskHelper.ShowBodyMask()), but I don't believe that had any impact on something else not hiding the mask. As far as I am aware, that was only used to get the mask so you could display or change the message (the Freedom UI mask doesn't have a message, only the spinner)

Makes sense, must have been mis-remembering then, cheers Ryan. Would be nice to be able to show & hide specific body masks, as sometimes there will be multiple sets of data loading in in parallel, with no guarantees of which will finish first/last.

Hello,
Your idea has been registered to our R&D team, thank you for providing us with new ways to improve.

Show all comments

Hi there,

 

I made a button that call ProcessModuleUtilities on click. Once clicked, the callback is called and a BodyMask is shown but never hidden.

 

Here is the button :

			{
				"operation": "insert",
				"name": "GetAccountBtn",
				"parentName": "LeftContainer",
				"propertyName": "items",
				"values": {
					"itemType": Terrasoft.ViewItemType.BUTTON,
					"caption": {
						"bindTo": "Resources.Strings.GetAccount"
					},
					"click": {
						"bindTo": "onGetAccountClick"
					},
					"visible": {
						"bindTo": "getGetAccountButtonVisible"
					},
					"enabled": {
						"bindTo": "getGetAccountButtonEnable"
					},
					"style": "blue",
					"classes": {
                        "textClass": ["actions-button-margin-right"]
                    }
				}
			},

Here is the methods :

			onGetAccountClick: function() {
				Terrasoft.showConfirmation("Effectuer une demande pour devenir l'AM de ce compte ?", function(result) { 
    				if (result === Terrasoft.MessageBoxButtons.YES.returnCode) {
        				this.processGetAbandonAccountPopupResponse("RequestGetAccount");
    				}
				}, ["yes", "no"], this);
			},
			processGetAbandonAccountPopupResponse: function (processName) {
				args = {
					sysProcessName: processName,
					parameters: {
						accountId: this.get("Id"),
						userId: Terrasoft.SysValue.CURRENT_USER.value
					},
					callback: this.callbackShowRequestMade,
					scope: this
				};
				ProcessModuleUtilities.executeProcess(args);
			},
			callbackShowRequestMade: function () {
				this.showInformationDialog("Votre demande a été effectuée.");
			},

Here is my business process :

And finally here is the result : https://vimeo.com/727290324/560dec0d61

 

I have this error in the console  :

XML Parsing Error: not well-formed Location: https://creatioBaseUrl/0/ServiceModel/ProcessEngineService.svc/RunProce… Line Number 1, Column 1

 

Here is the request made by my browser :

POST https://creatioBaseUrl/0/ServiceModel/ProcessEngineService.svc/RunProcess

Request body :

{
  "collectExecutionData": true,
  "parameterValues": [
    {
      "name": "accountId",
      "value": "b253a1de-10cd-452f-bd23-28ecb696b44a"
    },
    {
      "name": "userId",
      "value": "aa995be7-7611-43ea-a79d-19894080a976"
    }
  ],
  "schemaName": "RequestGetAccount",
  "resultParameterNames": []
}

Response body :

{
  "processId": "e3493a1e-0069-4164-81e1-47c7743146f0",
  "processStatus": 1,
  "resultParameterValues": null,
  "executionData": null,
  "success": true,
  "errorInfo": null
}

Do you have any idea what can I do to fix this bodyMask issue ?

 

Kind regards,

 

Julien

Like 1

Like

2 comments
Best reply

When you use a callback with ProcessModuleUtilities, you're responsible for clearing the mask in the callback function.  Add MaskHelper module to the top of the code (like you did with ProcessModuleUtilities) and then call this in the callback function:

MaskHelper.HideBodyMask();

Ryan

When you use a callback with ProcessModuleUtilities, you're responsible for clearing the mask in the callback function.  Add MaskHelper module to the top of the code (like you did with ProcessModuleUtilities) and then call this in the callback function:

MaskHelper.HideBodyMask();

Ryan

Ryan Farley,

Thank you Ryan, I forgot this detail.

 

Julien

Show all comments