Dear Creatio,

 

I apparently ran out of memory. The parent process gave an error, I cancelled this process and all sub processes cancelled automatically, except for about 20 processes. Status is Running, unable to cancel since the parent needs to be cancelled first, but the parent has already been cancelled.

 

Yours sincerely,

 

Pascal

Like 0

Like

1 comments

Hello Pascal, 

 

We'd suggest to first stop the process execution and then try to delete it. 

Please let us know if the issue persists. 

 

Best regards, 

Anastasiia

Show all comments

Hi all, I have created a web service for parsing a document which is taking two request parameters:

 

  • Header Parameter : 

Key : “Authorization”

Value : (xyz 123456)  // just an example

 

  • Body Parameter :

Key : “file”

Value : (Base64 data)

 

When I test it within the Web Service section by providing both the parameters, it is working fine and giving the expected output in json format.

 

Now, when I use the same web service in Business Process and pass the parameters correctly by storing it in process parameters, the process always gives an error on that web service element.

 

Error is as follows:

 

Terrasoft.Common.UnsupportedTypeException: Type "System.Collections.Generic.List`1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" is not supported. 



 

I am getting base64 data correctly from Business Process. Please help regarding this error.

 

Like 0

Like

2 comments

hi Prashant Jha

 

Creatio has its "JSON key parser" in a core assembly that works OOTB in the service section. Usually, it occurs in the Method & Body Parameters of a Web Service.



On looking at the exception, the input types are not matched here and one of the input types is Collection List.



Can we backtrack it by passing the parameters one by one? which means trying to send Parameter A, get the exception and then try passing Parameter A, and B to get the exception.



From the above information, I presume that the error lies in the below factors,

Body Parameter :

Key : “file”

Value : (Base64 data)

 

 

BR,

Bhoobalan Palanivelu

Hello,

 

This error could be due to incorrect handling of an array of parameters in the web service response (Result).

Try to remove parameter array from web service response.

Show all comments

Hi Team,

 

A business process was triggered on 01/11/2022 at 00:12, and there was a field which needs to get updated with Current date. But it got updated with the previous date i.e. 31/10/2022. Earlier it was working fine, just got the issue yesterday.

 

Please help

Like 0

Like

3 comments

Hi,

This could be possible if you run the business process under a user with a different time zone.

We get the current date with this line:

((DateTime)UserConnection.SystemValueManager.GetValue(UserConnection, "CurrentDateTime"))

 

UserConnection.CurrentUser.GetCurrentDateTime()

 

public DateTime GetCurrentDateTime() {

            return TimeZoneInfo.ConvertTimeFromUtc(_dateTimeProvider.UtcNow, TimeZone);

        }

TimeZoneInfo.ConvertTimeFromUtc(_dateTimeProvider.UtcNow, TimeZone);

 

In this, we get a value of UtcNow, and based on the value of TimeZone the method returns the date.

Thank you. Yes exactly, this was the issue.

 

Is there any workaround, we can use a specific time zone date for modifying a field everytime the process gets triggered. 

As far as I know, currently, it would be impossible to change because this logic is located inside an application Core. The only possible solution right now is to change the time zone of the user.

I already created a corresponding problem for our R&D team so that you can change this logic inside the application itself. Thank you for helping us upgrade the system.

Show all comments

Hi there,

 

I have a requirement to trigger a business process with a parameter value from an anonymous web service and get errors while publishing the code in the Creatio environment. Below I have mentioned the complete code of the web service and the error screenshot of the error.

 

Note: I have pre-created the business process with the parameter and written the web service.

I referred other community articles such as 

https://community.creatio.com/articles/web-service-without-authorizatio…

https://community.creatio.com/questions/calling-business-process-parame…

These codes currently seem to be outdated and not working in the Atlas version of creatio. Please give me suggestions to resolve this issue.

 

Code :

 

/* The custom namespace. */

namespace Terrasoft.Configuration.WSO2WSConfirmationServiceNamespace

{

    using System;

    using System.ServiceModel;

    using System.ServiceModel.Web;

    using System.ServiceModel.Activation;

    using Terrasoft.Core;

    using Terrasoft.Web.Common;

    using Terrasoft.Core.Entities;

    using Terrasoft.Core.Process;

    using Terrasoft.Core.Process.Configuration;

    [ServiceContract]

    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]

    public class WSO2WSConfirmationService : BaseService

    {

        /* The link to the UserConnection instance required to access the database. */

        private SystemUserConnection _systemUserConnection;

        private SystemUserConnection SystemUserConnection

        {

            get

            {

                return _systemUserConnection ?? (_systemUserConnection = (SystemUserConnection)AppConnection.SystemUserConnection);

            }

        }

        /* The method that returns the confirmation of buttons. */

        [OperationContract]

        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped,

        ResponseFormat = WebMessageFormat.Json)]

        public string ConfirmationService(string guid, bool status)

        {

            new Guid(guid);

            string result = "Guid is missing";

            if (!string.IsNullOrEmpty(guid)) {

                if (status == false)

                {

                    var manager = UserConnection.ProcessSchemaManager;

                    var processSchema = manager.GetInstanceByName("WSO2Process_3c0d24a");

                    var moduleProcess = processSchema.CreateProcess(UserConnection);

                    if (processSchema.Parameters.ExistsByName("ProcessSchemaConfirmationId"))

                    {

                        moduleProcess.SetPropertyValue("ProcessSchemaConfirmationId", guid);

                    }

                    moduleProcess.Execute(UserConnection);

                    /*ProcessSchema schema = UserConnection.ProcessSchemaManager.GetInstanceByName("WSO2Process_3c0d24a");

                    //schema = UserConnection.ProcessSchemaManager.GetInstanceByUId(leadManagementProcessUId);

                    //different engines for interpretable and compiled BP

                    bool canUseFlowEngine = ProcessSchemaManager.GetCanUseFlowEngine(UserConnection, schema);

                    if (canUseFlowEngine)

                    {

                        var flowEngine = new FlowEngine(UserConnection);

                        var param = new Dictionary();

                        param["ProcessSchemaConfirmationId"] = guid.Id.ToString();

                        flowEngine.RunProcess(schema, param);

                        

                    }

                    else

                    {

                        Process process = schema.CreateProcess(UserConnection);

                        process.SetPropertyValue("ProcessSchemaConfirmationId", guid.Id);

                        process.Execute(UserConnection);

                    }*/

                    result = "Response posting is cancelled, You can close this tab";

                }

                else {

                    result = "WSO2 endpoint intergration is pending";

                

                }

            }



            

            return result;

        }

    }

}

File attachments
Like 0

Like

1 comments

Found the answer for this mentioned issue, Please refer to the code below. Using IProcessExecutor, this can be simply achieved in the 8.0 version.

/* The custom namespace. */

namespace Terrasoft.Configuration.WSO2WSConfirmationServiceNamespace

{

    using System;

    using System.ServiceModel;

    using System.Collections.Generic;

    using System.ServiceModel.Web;

    using System.ServiceModel.Activation;

    using Terrasoft.Core;

    using Terrasoft.Web.Common;

    using Terrasoft.Core.Entities;

    using Terrasoft.Core.Entities.Events;

    using Terrasoft.Core.Process;

    using Terrasoft.Core.Process.Configuration;

    [ServiceContract]

    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]

    public class WSO2WSConfirmationService : BaseService

    {

        /* The link to the UserConnection instance required to access the database. */

        private SystemUserConnection _systemUserConnection;

        private SystemUserConnection SystemUserConnection

        {

            get

            {

                return _systemUserConnection ?? (_systemUserConnection = (SystemUserConnection)AppConnection.SystemUserConnection);

            }

        }

        /* The method that returns the confirmation of buttons. */

        [OperationContract]

        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped,

        ResponseFormat = WebMessageFormat.Json)]

        public string ConfirmationService(string guid, bool status)

        {

            try

            {

                new Guid(guid);

                string result = "Guid is missing";

                if (!string.IsNullOrEmpty(guid))

                {

                    if (status == false)

                    {

                        {

                            // getting  IProcessExecutor

                            IProcessExecutor processExecutor = SystemUserConnection.ProcessEngine.ProcessExecutor;

                            // List of input parameters

                            var inputParameters = new Dictionary<string, string>

                            {

                                ["ConfirmationId"] = guid.ToString(),

                            };

                            //code of the process

                            string processSchemaName = "WSO2Process_3c0d24aCustom1";

                            //execute the process

                            ProcessDescriptor processDescriptor = processExecutor.Execute(processSchemaName, inputParameters);

                            //return processDescriptor;

                        }

                        

                        result = "Response posting is cancelled, You can close this tab";

                    }

                    else

                    {

                        result = "WSO2 endpoint intergration is pending";

                    }

                }

                return result;

            }

            catch (Exception ex)

            {

                return "GUID error - " + ex.Message; 

            }

            

        }

    }

}

 

 

Thanks

Show all comments

Hi community,



For an integration, I have the following JSON request parameter :



{

  "externalID": "57",

  "nomDuClient": "Simple text example",

  "nomDelOpportunite": "Simple text example",

  "calculateurs": [

    "57",

    "61"

  ]


}




Let's have a further look to the "calculateurs" field. When setting the WebService into Creatio with the automatic request paramters, I get something like this :



image.png

I have "Text" data which is an Array. Everything's fine. 



Now, if I use the "WebService" element in the business process, it automatically sets something like this :



image.png



This structure will give a parameter that will look at something like :



"calculateurs": [



{ "name of the element": "value of the first element" }, { "name of the element": "value of the second element" } 



]



Which will be an array of structure of strings and not just an array of string.



Furthermore, when trying to get a collection through looping into a subprocess, the collection of parameters given by the subprocess will look at something like this :



image.png



They will be an array of structure of strings. 



It has been hours that I am trying to populate my WebService parameter as just an array of strings.

How can I achieve that ?



Many thanks,

Jonathan

Like 0

Like

6 comments

Dear Jonathan,

 

Unfortunately, there is no OOB functionality for transferring data sets (IsArray type) to web service parameters by not the 'Read data" element.

 

 We have already registered the idea for our R&D team to implement this functionality in further releases. I will assign your case to this project in order to increase its priority.  

 

Best regards,

Bogdan

Bogdan,

 

I have this situation when setting up the Web Service :

 

When i call the WebService process element, the field automatically fills like this :

 

And with this element, it is impossible to send an array of strings like set in the webservice request parameter isn't it ?

 

If we have a JSON like :

 

"Assistant": [

{

"string": "hello world"

}

]

 

Where the "string" value is set in "Sélectionner la valeur" on the screenshot above. So there is really no way of sending an array of strings, really ?

 

When I test the request directly from the WebService section, I can just add lines to the array and manually setting values into it. Isn't there a way to do it automatically ?

 

Let me ask the question in a different way, how could I send an array of strings via the "Read data" element of the business process ?

 

Many thanks,

Jonathan

Jonathan Quendoz,

 

If the request parameter is a collection (the “Is array” checkbox is selected in the properties of the parameter at the web service record), the nested collection parameters will be displayed under the collection name in the process element parameters (Fig. 3). For example, Creatio “batch query” service can insert several records (e.g. contacts) to Creatio. To do this, the service would require information to write into the fields of each inserted record (e.g. contact names and types). In this case, you can pass the values as a request parameter of an array type, where “Name” and “Type” will be nested parameters and each instance of the collection would represent data for a separate contact record.

 

 

The values of collection parameters of one [ Call web service ] process element can be mapped to the nested parameters of another collection of a [ Read data ] or [ Call web service ] process element.

 

 

 

The parameters of the collection of process elements can be mapped to the process parameter of the “Collection of values” data type.

 

Please refer to the article here.

 

Best regards,

Bogdan

 

Jonathan Quendoz,

Hi! How are you? I'm running on the same problem. Did you find a solution? Appreciate it.

Regards

Uriel Nusenbaum,

 

Hi Uriel ! 

 

Unfortunately, I did not found a solution to this problem. 

I asked to the WebService supplier to adjust their webservice to have an array of structure of strings as json paramater instead of just an array of strings.

 

At the moment, I think that besides calling a WebService via C# in back-end, it is not possible to send an array of strings as parameter. It should really be reworked from Creatio.

 

You can only send an array of a structure of strings via a sequentiel sub-process.

 

Please, if you have any questions about this, do not hesitate.

 

Best regards,

Jonathan

Good day. Have there been any new solutions to this problem in recent versions?

Show all comments

Hi community,

 

I have a time column typed named Duration. In the execution of a business process I want to change the value of this attribute with the difference of two datetime parameters: enddate - startdate. Is there any way to perform this action or should I change the type of this column to type number.

Like 0

Like

0 comments
Show all comments

Hi,



I tried adding System.Net in Business Process Using property and it is throwing me error "A namespace cannot directly contain members such as fields or methods".



Is there any workaround?



Best regards,

Solem A.

Like 0

Like

0 comments
Show all comments

Hi,

Business process successfully running  in Dev environment.

But giving the error in Production environment.

 

Error message:

"An error occurred while applying the value of the parameter "GlbPopupWindowText" of the business process element:

    Unable to compute expression "[#[IsOwnerSchema:false].[IsSchema:false].[Parameter:{35efc48b-729e-4060-93e1-c263b244e32c}]#]", error: Formula value error: Expression expected (at index 0)."

 

but in business process there is no expression like above.

 

Any help on this.

 

Thanks

Like 0

Like

1 comments
Best reply

Hello, 

 

I would like to suggest you to double-check the business process parameters and re-add the mentioned parameter anew on the prod instance. If the issue still persist, please contact our support team via email: support@creatio.com so we could proceed with investigation.

 

Best regards,

Anastasiia

Hello, 

 

I would like to suggest you to double-check the business process parameters and re-add the mentioned parameter anew on the prod instance. If the issue still persist, please contact our support team via email: support@creatio.com so we could proceed with investigation.

 

Best regards,

Anastasiia

Show all comments

Hi community,

 

The situation is the following :

 

 

To have some context, after importing some data from an Excel file in the "Calculateur" detail it does some calculations in the "Informations Prix" detail.

 

However, now when trying to implement a business process needed to recalculate the values in the “Informations Prix” detail when we delete some records, I encounter some problems.

I have tried to put a start signal as “When a ‘Calculateur’ is deleted” it starts the process. However, the problem is that I can’t obviously get the Id of the opportunity and the Id of the other calculator records related to it because the record is deleted and only AFTERWARDS it starts the process. So, the business process doesn’t find the Id of the “Calculateur” or the Opportunity related to the deleted record.

 

A good thing to note is that every record of the “Calculateur” has its own Id.

 

Furthermore, I have tried to start the process on an Event like this :

 

 Here, right next to the checkbox, it says : “Before deleting a record”

 

And to start the business process with a “Message signal” with “CSLCalculateurDeleting” as message. However, I don’t really understand how this works because I can’t get the Id of the opportunity anyway.

 

In addition to all this stuff, my idea, according to this article that tried to answer the same need as mine :

 

 

So, my idea was to implement a “Delete” button next to the “Calculateur” detail that will delete the selected record, get the Id of the Opportunity and start a process which now could have all the parameters that I need for my further recalculations. However, how can I get, in the JavaScript Client Side part of code, the Id of the selected record to delete ? See this example :

 

 

I want the Id of the record highlighted in blue.

 

What is the best way to implement this according to the different possibilities above ? Do you have any idea ?

 

Many thanks for the attention paid to this long question. Hopefully you can help me figure this out.

 

Best regards,

Jonathan

Like 0

Like

2 comments

Stop using the normal Delete of a record by rights and instead force users to Delete with a business process.

The business process then runs the logic and then Deletes record in the end. So far so good.

It's simpler to maybe run the Business process from the record page. (Double-click row to open). If you wanna use a button on the row, check this out: https://community.creatio.com/articles/add-button-active-row-detail

Hi Julius,

 

Thanks for your answer. I have found the answer to my questions and it was really simpler that I thought.

 

In fact, on the start signal of the process it is necessary to unthick the checkbox :

 

 

So that it is possible to get the Id of the opportunity related to the deleted record.

 

Best regards,

Jonathan

Show all comments

HI, 

 

I'm working with a business process, I have added a "Perfom Task" element, but I need to be able to set a custom parameter to it. The field already exists in the activity, but I'm not able to set it from them "Perfom Task" element.

 

Is there a way to do this?

Like 0

Like

2 comments

Hello Javier,



Could you please specify which custom parameter do you mean?



Thanks in advance!



Best regards,

Bogdan

Hi Bodgan, I have figured it out. 

 

I added this code in "Advace settings" -> "After save" of "Perfom Task" element:

 

 activity.SetColumnValue("[FieldName]", [FieldValue]));

  activity.Save();

 

 

 

Thank you!

Show all comments