Hi guys, 

i've created a business process in which:

- with Status as New, a record is added with Stage as New, Start date as current date, end date is null

- when this record Status is changed, end date of previous record is updated to Current date.

Ex:

A Request no 44 is created at 8 am, so Stage: New, Start date: 8am, End date: Null

then at 9 am the status is modified into Approval, so, there are 2 records

1. Stage as New, Start date as 8 am, end date as 9 am

2. Stage as Approval, Start date as 9 am, end date as Nulll

Can you guys help me with this? Many thanks

Like 0

Like

1 comments

Hi Trang, 

It's not possible to implement such a logic using no-code tools, however, you can do it by implementing an EntityEventListener and implementing an override for the OnSaving() method. 

Then you can access both the new value of the column(in your example Stage) and the old value. That way you can filter and update the value in your "ObjectInStage" object. 

More information on EntityEventListeners here

Such functionality is already implemented for Lead and Case objects, you could try and use them as an example. 

 

Best regards,

Yurii

Show all comments

Hi Community,

 

The goal is to execute a specific process each time another process returns errors on it's logs.

 

To achieve this we found on the community this post (https://community.creatio.com/questions/Notifyuserifbusinessprocessfails), where someone had the same goal. The correct answer for that post, says that we need to "create a view based on the SysProcessLog table and add this newly created object into your business process as a starting signal".

 

After creating the view and adding the new object to the business process as a starting signal, the process still does not run.

 

 

We checked the view and it's being populated correctly. Only the modified/added trigger are not being set.

 

To create the view we used the following guide https://academy.creatio.com/documents/technic-sdk/7-16/localizing-views.

 

Could you please help us understand and solve this issue?

 

Thank you.

 

Best Regards,

Pedro Pinheiro

Like 0

Like

1 comments

Views don't trigger signals. 

I was attempting to do the same and ended up running the process on a timer to continuously check for errors on an interval. It would be great to have either an ootb way to notify someone about process errors or the ability to handle an error condition in the process itself.

Ryan

Show all comments

Hi Community,

 

Is there a way to get the id of the attachment that has been generated through Process file in a business process as illustrated in file attached?

 

The idea is to read the id of this generated report to apply custom access rights.

 

 

Thank you for your help,

Like 0

Like

1 comments

I do wish it would return the ID, however, since it *can* create multiple files for whatever matches the filter conditions it's not always a single ID or file created.

What I typically do is do a read immediately after for attachments on the record, sorted by Created On desc, and also use the Name of the file based on the naming of the printable used. It's not ideal but has worked for me.

Ryan

Show all comments

Hi,

 

I created a Mini Page in the Freedom UI, and I would like to open it with the 'Open edit page' element in a business process, but the mini page is not to be found in the dropdown for 'Which page to open?'. Is it not possible to open a mini page from a process?

 

Thank you in advance!

Like 0

Like

1 comments

Good day,

 

Thank you for your question.

Unfortunately, there is no such functionality for your task currently present in the OOTB application of Creatio.

 

Currently, you can achieve such a thing only by means of development.

 

Thank you.

 

Show all comments

Hi All,

I have recently updated a condition in approval process which is defined in a third party package by a vendor. It is a small change.

But, When I installed my package in Target Environment. My version of the Business Process is not active. The Old version is still seen Active on the process library.

I have checked the hierarchy of Packages, My package has the highest hierarchy.

I have tried by installing a sql script which updates 'IsActiveVersion' property of old version to false and new version to true in 'sysschemaproperty' table. But the issue still persists.

It has been a long time I am facing this issue. Now I am out of Ideas. Please help.

 

Thanks in Advance

 

Like 0

Like

1 comments

Good day,

 

This sounds like support should take a look into this issue.

Feel free to notify us by sending a message - support@creatio.com

 

Thank you.

Show all comments

Hello!



How can we change (remove/disable) some parts of object process?

We need to generate Invoice number in another way (and don't want increment system settings when invoice is just created). But this process is defined in Invoice package.

Do we have any options to change this logic?

Kind regards,

Vladimir

Like 0

Like

4 comments

Good day,

 

Could you elaborate on what exactly you are having trouble with?

You should be able to just delete the unneeded elements by clicking on them and pressing the trashbin icon.

 

Thank you.

Unfortunately, I cannot delete unneeded elements from base packages. This is out-of-box feature that I want to overwrite

Vladimir,

 

Thank you for the explanation.

In that case, you could create a copy (a replacement object or just an export copy) of the Invoices and put it into your own custom package.

 

This will allow you to alter its behavior.

Here are some of the articles on the matter:

https://academy.creatio.com/docs/developer/development_tools/creatio_id…

 

Thank you.

Artem,

But if I make replacement object, it inherites all the process from base packages.

And if I create new object, I need to make all logics from scratch.

Show all comments

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