Hi Community,

 

I’ve this requirement where a specific user must run a specific Process. In this process, there should be a set of tasks that must gather all the attachments of the current record and generate a ZIP file with these attachments. Furthermore, this process should also download the ZIP file to the user’s computer.

 

Any idea on how can I achieve this requirement?

 

Thanks in advance.

 

Best Regards,

Pedro Pinheiro

Like 1

Like

3 comments

Hello Pedro,
Unfortunately, your task can not be achieved using the basic logic of Creatio. There is no possibility to generate ZIP files from attachments.
Also, you can not download some files to the user's computer automatically until he does not download them manually.
Best regards, Alex.

Hi there! We recently uploaded an application to the marketplace 
that allows you to download all the files of a section, example of an 
account, in a ZIP file. Possibly it is useful for your use case or 
to check how it was done. 
Check it here https://marketplace.creatio.com/app/download-zip-button-creatio

Thank you

Regards

Uriel,

 

Thank you for the response. We manage to find a solution for our requirement. However, If we get another use case like this one, we will have your application in mind.

 

Best Regards,

Pedro Pinheiro

 

Show all comments

Hello community,

Can you please advise me how to run the server code (C#) from a client page (JS).
The business process has a delay when launching, so this method is not the best solution in my case.

 

Thank you in advance.

Mariia

Like 0

Like

2 comments
Best reply

Hello,

 

Please check the following link https://academy.creatio.com/docs/developer/back-end_development/configu… 

Best Regards,
Tetiana Bakai

Hello,

 

Please check the following link https://academy.creatio.com/docs/developer/back-end_development/configu… 

Best Regards,
Tetiana Bakai

As Tetiana mentioned, how this is typically done in Creatio is by creating a configuration web service that you call from your client-side js code. It's actually one of my favorite parts of Creatio and makes for a very powerful development experience and allows you to keep the UI very quick by passing things between the client and the server and performing operations on the server rather than the client. Along with the Academy article Tetiana shared, I also have a write up of how to create a configuration web service and call it from client-side code here: https://customerfx.com/article/creating-a-web-service-and-consuming-it-…

Ryan

Show all comments

Hello community,

 

Could you please advise me how to send a message from a page to a business process.
The idea is the next: the process starts and sends a message to the client with a confirmation question and waits for the message to continue.

The message will be generated on the client depending on the button pressed on confirmation pop-up window.

 

Thank you in advance for your ideas.

Best regards,

Mariia

Like 0

Like

1 comments

Hello Mariia,

 

I'm afraid there is no way to send a message from the client to some specific process log record (since ProcessEngineService.svc doesn't provide this option). Please re-design your process, use the "User dialog" element and use two (or more, based on answer options in the dialog) conditional flows after the "User dialog" element.  As a result you will be able to continue the process execution based on the answer option the client selects.

 

Best regards,

Oscar

Show all comments

Dear community,

I have a task: Show a confirmation dialog with OK and KO buttons to confirm Case cancelling if the user clicked on the Cancel status in DCM.

If the OK button, then the case will be cancelled.

If the KO button, then the case will return to the previous status.

 

I have tried to display a dialog box on the OnSaving event of the Case object.

Here is my function:

public override void OnSaving(object sender, EntityBeforeEventArgs e) {  
     string status = UpdateData(sender);
     if(status!="Canceled") {
                base.OnSaving(sender, e);
     } else {
    		//Todo: Show dialog with question
  		//Todo: Get response OK or KO
                /*if(response ="OK"){
                        base.OnSaving(sender, e);
                }else{
                        e.IsCanceled = true;
                }*/
     }
}

 

Unfortunately, I have not found any information on how to display the dialog box on the server side.

I know the method of sending messages from the client side (this.showConfirmationDialog(message, function(returnCode )), but I don't know how to return the result of the pressed button to the server to complete the OnSaving method.

private void SendMessage(object sender) {
      var entity = (Entity)sender; 
      var userConnection = entity.UserConnection;
      string senderName = "MySenderNameCase";  
      string message = JsonConvert.SerializeObject(new {test = "status"});
      MsgChannelUtilities.PostMessage(userConnection, senderName, message);
  }             

 

Please help me to implement this task.

Thank you in advance.

Best regards,

Mariia

Like 0

Like

3 comments

Dear Mariia,

 

You can just add validation on the page instead: 

methods: {
...
asyncValidate: function(callback, scope) {
    this.callParent([function(result) {
        if (!this.validateResponse(result)) {
            return;
        }
        this.Terrasoft.chain(
                this.validateUserConsent(function() {
                    next();
                }, scope);
            },
            function(next) {
                callback.call(scope, result);
                next();
            },
            this
        );
    }, this]);
},
validateUserConsent: function(callback, scope) {   
    //Show confiration dialog with this.showConfirmationDialog
    //If yes - this.Ext.callback(callback, scope || this);
    //If no - return;
}

Best regards,
Angela

Dear Angela Reyes,

 

Thank you for your reply.

But is does not work correctly for me, maybe because of mandatory activities in DCM.
I need all activities to be cancelled, in the case of switching to the Canceled stage.
How to perform such a task?
Thank you.

 

Best regards,

Mariia

Mariia Prostiak,

 

Hello,

 

But all the activities of the current stage are being canceled in case they were not completed and the stage is changed to the next one. Can you please specify why do you need to override this logic?

 

Best regards,

Oscar

Show all comments

Dear Community,

 

I am trying to copy values from a field and lookups to put it in the "Name" fields before saving.
I use the following code in the script task but I don't know how to get the value from a lookup:
Entity.Name = $"{Entity.Code } - {Entity.Description}";
Code being the lookup.

So if you create a record in a lookup it would go like this:
[Name][Code][Description]

[           ][ 001 ][Code for info]

The Name should automatically be filled with "001 - Code for info" after saving.
What is the correct way to set the script?

Thank you!

 

 

Kind regards,

Yosef
 

Like 0

Like

2 comments

Hi!

 

Just add on saving event in your lookup entity, and add a script

 

Entity.SetColumnValue("Name", string.Format("[{0}][{1}]", Entity.GetTypedColumnValue<string>("Code"), Entity.GetTypedColumnValue<string>("Descritpion"));

 

Dmytro Oliinyk,

 

 

Thank you but that didn't seem to work for me, this was the solution for me:

 

var name = Entity.GetColumnValue("Name");
var description = Entity.GetColumnValue("Description");
 
var esq = new EntitySchemaQuery(Entity.Schema);
esq.AddColumn("Code.Name");
 
var CodeEntity= esq. GetEntity(UserConnection, Entity.PrimaryColumnValue);
if (CodeEntity != null) {
 
	var columnUsrCodeName = CodeEntity .GetTypedColumnValue<string>("Code_Name");
 
	string fullName= $"{name}: {columnUsrCodeName } - {description}";
	Entity.SetColumnValue("Name", fullName);
}
return true;

Let me know if there's an easier way to do this.

 

 

Kind regards,

Yosef

Show all comments

Hi all,

I'm trying to filter some city data by city name

The following line will not match because it's not case-insensitive : 

esqFilter = esq.CreateFilterWithParameters(FilterComparisonType.Equal, "City", "PARIS");

Is there a way to ignore case so it works for the "Paris" value ?

Like 0

Like

1 comments

Dear Jerome, 

 

ESQ EQUAL comparison is not case sensitive so you are not getting a result either because you have other filters or there are no records with City column equals to Paris. 

As an alternative you can try using Select class: 

https://academy.creatio.com/documents/technic-sdk/7-16/retrieving-data-database

 

Best regards, 

Dennis 

Show all comments

Hi

 

I'm following the Kubernetes tutorial in the Academy to deploy the Exchange service:

https://academy.creatio.com/documents/administration/7-16/deploying-synchronization-service-kubernetes?document=administration#CSH_3

 

I deployed Redis database and ExchangeListener package using Helm.

When I deployed the ExchangeListener package and forwarded the local port to the host I got "Connection Refused" and the service crashed.

Any help! 

PS C:\Windows\system32> helm install --set apiVersion=apps/v1 --set env.host=exchange-listener-redis-master.default.svc.cluster.local --name creatioexchangelistener "C:\Program Files\kubernetes\exchangelistener-0.5.0.tgz"
NAME:   creatioexchangelistener
LAST DEPLOYED: Wed Jun 17 22:23:52 2020
NAMESPACE: default
STATUS: DEPLOYED
 
RESOURCES:
==> v1/ConfigMap
NAME                            DATA  AGE
creatioexchangelistener-worker  2     0s
 
==> v1/Pod(related)
NAME                           READY  STATUS             RESTARTS  AGE
creatioexchangelistener-api-0  0/1    ContainerCreating  0         0s
 
==> v1/Service
NAME                         TYPE       CLUSTER-IP    EXTERNAL-IP  PORT(S)  AGE
creatioexchangelistener-api  ClusterIP  10.96.65.102  <none>       80/TCP   0s
 
==> v1/StatefulSet
NAME                         READY  AGE
creatioexchangelistener-api  0/2    0s
 
==> v1beta1/Ingress
NAME                         CLASS   HOSTS           ADDRESS  PORTS  AGE
creatioexchangelistener-api  <none>  test.tscrm.com  80       0s
 
 
NOTES:
1. Get the application URL by running these commands:
 
PS C:\Windows\system32> kubectl port-forward creatioexchangelistener-api-0  8089:80
Forwarding from 127.0.0.1:8089 -> 80
Forwarding from [::1]:8089 -> 80
Handling connection for 8089
Handling connection for 8089
E0617 22:25:06.332296    9584 portforward.go:400] an error occurred forwarding 8089 -> 80: error forwarding port 80 to pod ec2e3c86d81d27efeb0ff525ce5898f1ac78a2b7c1358837c3da569965831451, uid : exit status 1: 2020/06/17 20:25:06 socat[53947] E connect(5, AF=2 127.0.0.1:80, 16): Connection refused
E0617 22:25:06.332296    9584 portforward.go:400] an error occurred forwarding 8089 -> 80: error forwarding port 80 to pod ec2e3c86d81d27efeb0ff525ce5898f1ac78a2b7c1358837c3da569965831451, uid : exit status 1: 2020/06/17 20:25:06 socat[53948] E connect(5, AF=2 127.0.0.1:80, 16): Connection refused
Handling connection for 8089
E0617 22:25:06.360263    9584 portforward.go:400] an error occurred forwarding 8089 -> 80: error forwarding port 80 to pod ec2e3c86d81d27efeb0ff525ce5898f1ac78a2b7c1358837c3da569965831451, uid : exit status 1: 2020/06/17 20:25:06 socat[53949] E connect(5, AF=2 127.0.0.1:80, 16): Connection refused
Handling connection for 8089
Handling connection for 8089
E0617 22:25:06.459266    9584 portforward.go:400] an error occurred forwarding 8089 -> 80: error forwarding port 80 to pod ec2e3c86d81d27efeb0ff525ce5898f1ac78a2b7c1358837c3da569965831451, uid : exit status 1: 2020/06/17 20:25:06 socat[53950] E connect(5, AF=2 127.0.0.1:80, 16): Connection refused
E0617 22:25:06.464261    9584 portforward.go:400] an error occurred forwarding 8089 -> 80: error forwarding port 80 to pod ec2e3c86d81d27efeb0ff525ce5898f1ac78a2b7c1358837c3da569965831451, uid : exit status 1: 2020/06/17 20:25:06 socat[53951] E connect(5, AF=2 127.0.0.1:80, 16): Connection refused
Handling connection for 8089
E0617 22:25:06.475264    9584 portforward.go:400] an error occurred forwarding 8089 -> 80: error forwarding port 80 to pod ec2e3c86d81d27efeb0ff525ce5898f1ac78a2b7c1358837c3da569965831451, uid : exit status 1: 2020/06/17 20:25:06 socat[53952] E connect(5, AF=2 127.0.0.1:80, 16): Connection refused
Handling connection for 8089
Handling connection for 8089
E0617 22:25:11.511131    9584 portforward.go:400] an error occurred forwarding 8089 -> 80: error forwarding port 80 to pod ec2e3c86d81d27efeb0ff525ce5898f1ac78a2b7c1358837c3da569965831451, uid : exit status 1: 2020/06/17 20:25:11 socat[54236] E connect(5, AF=2 127.0.0.1:80, 16): Connection refused
E0617 22:25:11.513105    9584 portforward.go:400] an error occurred forwarding 8089 -> 80: error forwarding port 80 to pod ec2e3c86d81d27efeb0ff525ce5898f1ac78a2b7c1358837c3da569965831451, uid : exit status 1: 2020/06/17 20:25:11 socat[54237] E connect(5, AF=2 127.0.0.1:80, 16): Connection refused
Handling connection for 8089
E0617 22:25:11.527104    9584 portforward.go:400] an error occurred forwarding 8089 -> 80: error forwarding port 80 to pod ec2e3c86d81d27efeb0ff525ce5898f1ac78a2b7c1358837c3da569965831451, uid : exit status 1: 2020/06/17 20:25:11 socat[54238] E connect(5, AF=2 127.0.0.1:80, 16): Connection refused

 

 

Thank you

Mohamed

Like 0

Like

3 comments

Hello Mohamed,

 

Seems that your 8089 has no process that listens to this port so that's why you cannot forward the listener to this port. Try running this command:

 

netstat -abn | findstr "LISTENING" | findstr "your host IP-address" | findstr "8089"

 

and check if this command shows the result.

 

Then try running

 

kubectl -n default exec -it creatioexchangelistener curl -v host_IP_address:8089

 

and let's check the result then (we will need to run kubectl describe pods creatioexchangelistener)

 

Best regards,

Oscar

Hi Oscar

Can you please provide me a YAML file to deploy the pod (Redis + Exchange Listener + Expose Service Address)?

 

Thank you

Mohamed

Mohamed Ouederni,

Hello Mohamed,

 

We don't have a separate YAML file for this proposes and Redis should be installed separately. All available .yaml files can be found in the exchangelistener-0.6.9.tgz file that is downloaded via this link 

 

http://ftp.bpmonline.com/support/downloads/Exchangelistener/exchangelis…

 

Best regards,

Oscar

Show all comments

Hello

I'm deploying Creatio Exchange Listener for my developing environment. 

I'm following this academy guide:

https://academy.creatio.com/documents/administration/7-16/deploying-synchronization-service-docker?document=administration#CSH_4

I got this error message when I created the listener container:

PS C:\Users\medouederni-pc> docker run -p 8808:80 --env ExchangeListenerRedisHost=172.17.0.2 --env ExchangeListenerRedisDatabase=0 --env PodName=CreatioExchangeListener  --name CreatioExchangeListener bpmonline/exchangelistener:0.5.0                                                                                                                               Unable to find image 'bpmonline/exchangelistener:0.5.0' locally
0.5.0: Pulling from bpmonline/exchangelistener
804555ee0376: Pull complete                                                                                                                                                         970251047358: Pull complete                                                                                                                                                         f3d4c41a4fd1: Pull complete                                                                                                                                                         1cccda79a5f9: Pull complete                                                                                                                                                         a02b6037fa5e: Pull complete                                                                                                                                                         5a51c6fa0bad: Pull complete                                                                                                                                                         Digest: sha256:bb4e356161faade8783fbb86a820f96b837222a11dce7311617b4236777c49c4
Status: Downloaded newer image for bpmonline/exchangelistener:0.5.0
log4net:ERROR Could not create Appender [ExchangeListenerGelfAmqpAppender] of type [Gelf4Net.Appender.GelfAmqpAppender, Gelf4Net.AmqpAppender]. Reported error follows.
RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachable ---> RabbitMQ.Client.Exceptions.ConnectFailureException: Connection failed ---> System.Net.Internals.SocketExceptionFactory+ExtendedSocketException: No such device or address
   at System.Net.Dns.InternalGetHostByName(String hostName)
   at System.Net.Dns.ResolveCallback(Object context)
--- End of stack trace from previous location where exception was thrown ---
   at System.Net.Dns.HostResolutionEndHelper(IAsyncResult asyncResult)
   at System.Net.Dns.EndGetHostAddresses(IAsyncResult asyncResult)
   at System.Net.Dns.<>c.<GetHostAddressesAsync>b__25_1(IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at RabbitMQ.Client.TcpClientAdapter.ConnectAsync(String host, Int32 port)
   at RabbitMQ.Client.Impl.TaskExtensions.TimeoutAfter(Task task, Int32 millisecondsTimeout)
   at RabbitMQ.Client.Impl.SocketFrameHandler.Connect(ITcpClient socket, AmqpTcpEndpoint endpoint, Int32 timeout)
   --- End of inner exception stack trace ---
   at RabbitMQ.Client.EndpointResolverExtensions.SelectOne[T](IEndpointResolver resolver, Func`2 selector)
   at RabbitMQ.Client.Framing.Impl.AutorecoveringConnection.Init(IEndpointResolver endpoints)
   at RabbitMQ.Client.ConnectionFactory.CreateConnection(IEndpointResolver endpointResolver, String clientProvidedName)
   --- End of inner exception stack trace ---
   at RabbitMQ.Client.ConnectionFactory.CreateConnection(IEndpointResolver endpointResolver, String clientProvidedName)
   at Gelf4Net.Appender.GelfAmqpAppender.InitializeConnectionFactory()
   at log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseAppender(XmlElement appenderElement)
log4net:ERROR Appender named [ExchangeListenerGelfAmqpAppender] not found.
Hosting environment: Production
Content root path: /app
Now listening on: http://[::]:80
Application started. Press Ctrl+C to shut down.

 

I tested the service and its working:

{
  "ServiceStatus": "Started",
  "version": "0.5.0",
  "connections": {}
}

I made the creatio configuration side:

https://academy.creatio.com/documents/administration/7-16/set-exchange-listener-service-side-creatio?document=administration#CSH_5 

Now, I can send emails but when I try to sync the mailbox I got this error:

[ExchangeListener.Subscription.ServiceFactory] 2020-06-16 11:57:47,885 [39] INFO : [18e30f9f-a1e7-4718-9cd1-e16577924fa2] End processing EmailMessage with id '31'.
[ExchangeListener.DataSend.EventDataSender] 2020-06-16 11:57:47,886 [39] DEBUG:  EventDataSender sending request to http://localhost:7700/0/ServiceModel/ExchangeListenerService.svc/ProcessFullEmail
[ExchangeListener.Email.Events.EmailEventProcessor] 2020-06-16 11:57:47,890 [42] ERROR: [18e30f9f-a1e7-4718-9cd1-e16577924fa2] [06/16/2020 11:57:47] Mailbox creatio123456789@gmail.com: error sending emails ['<71fe88dc-0198-4eca-8cc9-a8771976b3ab@gmail.com>' in folder ,'<71fe88dc-0198-4eca-8cc9-a8771976b3ab@gmail.com>' in folder ] to http://localhost:7700/0/ServiceModel/ExchangeListenerService.svc/NewEmail.
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.CurlException: Couldn't connect to server
   at System.Net.Http.CurlHandler.ThrowIfCURLEError(CURLcode error)
   at System.Net.Http.CurlHandler.MultiAgent.FinishRequest(StrongToWeakReference`1 easyWrapper, CURLcode messageResult)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
   at ExchangeListener.DataSend.EventClient.PostAsync(String requestUri, HttpContent content) in /src/src/ExchangeListener/DataSend/EventClient.cs:line 42
   at ExchangeListener.DataSend.EventDataSender.Send(String url, Object data) in /src/src/ExchangeListener/DataSend/EventDataSender.cs:line 85
   at ExchangeListener.DataSend.EventDataSender.SendEmail(Object data, SynchronizationCredentials credentials) in /src/src/ExchangeListener/DataSend/EventDataSender.cs:line 95
   at ExchangeListener.Email.Events.BaseEventProcessor.SendRequestObject(Object requstDtoObject, SynchronizationCredentials credentials) in /src/src/ExchangeListener/Email/Events/BaseEventProcessor.cs:line 149
   at ExchangeListener.Email.Events.EmailEventProcessor.SendEmailMessagesToBpm(List`1 messages, SynchronizationCredentials credentials) in /src/src/ExchangeListener/Email/Events/EmailEventProcessor.cs:line 66
[ExchangeListener.Imap.Subscription.ResentEmailsSynchronization] 2020-06-16 11:57:47,892 [39] INFO : [18e30f9f-a1e7-4718-9cd1-e16577924fa2] Email ids sended to bpm.
[ExchangeListener.Imap.Subscription.ResentEmailsSynchronization] 2020-06-16 11:57:47,892 [39] INFO : [18e30f9f-a1e7-4718-9cd1-e16577924fa2] Synchronization session for creatio123456789@gmail.com ended.

 

Thank you

Mohamed

Like 1

Like

4 comments

Hello Mohamed,

 

This is strange that your Exchange service returns this:

{
  "ServiceStatus": "Started",
  "version": "0.5.0",
  "connections": {}
}

even after the mailbox was used for emails sending. Please go to the mailbox settings and apply any changes there and see if you see something similar to this after that:

So you see the record about your mailbox there. Or try re-adding your mailbox to the app from scratch.

 

The error message you receive states that ExcahgneListener services couldn't establish the connection to the mail server. Please use this command:

 

ping mail_server_ip_address

 

from the ExchangeListener server so to test the connectivity. Also please check if the "The URL of the Exchange event processing service in Creatio" system setting has the value of https://mycreatio.com/0/ServiceModel/ExchangeListenerService.svc/NewEmail.

 

I've deployed the service on my end using the Academy instructions and everything is working properly so it should work as expected on your end and the problem can be in the connection between the email server and the ExchagneListener service.

 

Best regards,

Oscar

Dear Oscar Dylan,

 

Problem solved! It was a networking issue in Docker for Windows.

 

For everyone who may have this issue, you have to use host.docker.internal variable as your host IP address.

More information: https://docs.docker.com/docker-for-windows/networking/

Hi Mohamed,

 

I am running into the same issue for an on-prem dev image.  You indicated the issue was resolved via "For everyone who may have this issue, you have to use host.docker.internal variable as your host IP address."  Could you elaborate on that?  I read the article on docker for windows networking but wasn't clear on how you implemented the resolution.  Thanks so much :)

 

Update - never mind. Figured it out.  Using host.docker.internal in place of localhost in all cases. This resolves everything and ExchangeListener is working for both syncing and sending.  Thanks!!  :)

Hi Mohamed,

Can you help me with following questions:

Did you use OS setup file or pull request for installing Redis?

How did you set up redis host address?

Where exactly we use "host.docker.internal" variable. The link you shared doesnt seem to work.

 

Thank you

Gokul

Show all comments

How to apply access permissions (object permission) / access right when insert data via server-side?

I have set the record access permission, but when inserting via server-side, the access right does not work. The insert method that I did was in accordance with the article above.

Thanks.

Like 0

Like

1 comments

Hi,

It is possible adding data via server-side with access permissions using the “Entity” class. Please find more information with the examples by the link below:

https://academy.bpmonline.com/documents/technic-sdk/7-13/working-database-entity-class

Best regards,

Norton  

Show all comments