Hi,



Have problem with the creatio web service, I have added the oauth2 and it says it was successful. I even tested the received token in postman and it works perfectly. But running the same configuration in creatio always gives me (401) Unauthorized.



You can check the attachments for additional details.



Have you experienced the same thing?

What's the best approach to solve this?



Best regards,

Solem A.

Like 0

Like

1 comments

Hello Solem, 

 

There is a need to double-check the set oauth2 settings, based on the information from the provided screenshots it seems that some of them might be incorrect. 

Please refer to the below article for more detailed information and examples of how the corresponding URLs and Scopes should be set:

https://academy.creatio.com/docs/user/no-code_customization/web_service…

 

Thank you!

Best regards, 

Anastasiia

Show all comments

Hi,

 

I have a strange behavior when working with postman and ODATA webservices.

 

I'm trying to get the data from "Product" section and keep getting an Error 500 message.

 

The link that I'm using is "https://domain.creatio.com/0/odata/Product"

 

In Addition, It's important to keep in mind the following:

1. Sending the get request to other sections works, for example: Order, Employee, Opportunity.

2. The issue started to happen after a few times I tried to add a new product from postman.

At the beginning I managed to add the product and after 5-6 times I started to get the Error 500 message even when querying.

3. Further to the previous bullet, every time the product was added I received an error message in postman, but saw the record in the application - very strange.

 

I eventually need also to query and to add products to the "Product" section.

 

Looking forward to having assistance.

 

Best Regards,

Raz

 

 

Like 0

Like

5 comments

Hi Raz,

 

First of all you need to check the application logs and see the actual server error that is received upon calling the Products object via OData. Secondly you need to check if there are no errors with any of the "Products" objects in the system configurations (maybe the system asks to update the database structure for any "Product" object in any package or source code update is required). Also try publishing all the replaced "Product" objects in configurations.

 

Best regards,

Oscar

Oscar Dylan,

Hi Oscar,

 

I didn't understand your answer at all.

 

I will elaborate:

1. The error 500 occurs even when querying the product section.

2. Which application logs? the application runs in the cloud.

3. what do you mean by "errors with any of the products objects"? again, the issue occurs even when querying the section.

 

Thanks,

Raz

Oscar Dylan,

Hi Oscar,

 

I have a new update on the issue.

I don't know what happen, but now the Get Request works, the Post request for creating a new product works too.

 

But, Once I enter the product in the system and "Close" button changes to "Save". It looks like something in the creation of the product didn't finish correctly.

 

Can you point me to what to check?

 

Thanks,

Raz

Raz Guille Rosman,

 

Hi Raz,

 

Regarding your remarks:

 

1) "1. The error 500 occurs even when querying the product section." - I did understand that and that's why asked you to go to system configurations and check if any of the "Products" objects has "Database update is required" or "Source code update is required" error flag. The situation you described looks like the issue with an object in configurations and that's why it had to be checked.

 

2) "2. Which application logs? the application runs in the cloud." - you should've mentioned that the application is running in the cloud. You can contact us directly at support@creatio.com to get the application logs if needed. If this was an onsite app the logs could be found at C:\Windows\Temp\Creatio folder in the machine where the IIS-server is deployed.

 

3) "what do you mean by "errors with any of the products objects?" - again, the issue occurs even when querying the section." - I meant the actual error on the object, something like this:

And yes I understood that you received the error when performing OData requests and everything is simple: if there is a problem with an object OData requests to this object can fail.

 

As for your last remark that the button becomes "Close", but not "Save": it means that there was some modification on the page that should be saved. It can be rather the method on the product page that wasn't executed (or was executed) completely or you've clicked on some field when the page was opened. No error here.

 

Best regards,

Oscar

Oscar Dylan,

H Oscar,

 

Thank you very much for your very detailed response.

 

1. The error 500 stopped, I don't know why. It just stopped and both the get and post requests are working correctly.

 

2. Thanks for the explanation. I'll keep that in mind for the next time.

 

3. I checked and there are no processes or other js code that runs in the background for a new record.

Do you have an idea where to start looking?

 

Thanks,

Raz

Show all comments

Hi Community,

 

  • I am trying to pass the JSON string into the Web-Service Element of the Business Process. I had tried this in one of the trial instances of version 7.18.0.1353. In this version, Web-Service Element has Request body parameter in its Advanced Setting. The screenshot of this is as below. 

 

 

 

  • I want to implement this same POC in another instance which is in a version of  7.17.3.1377. But the "Request body" parameter in Advanced Setting of Web-Service Element and I am not able to pass JSON in this instance.

 

 

Is there any way ? to achieve this POC working in the instance of version 7.17.3.1377

Please guide me on this.

 

Thanks and Regards.

Like 0

Like

1 comments
Best reply

Hello,

 

This feature is available starting from 7.17.4 version. The simplest way to achieve it is just to upgrade your website to 7.17.4 or even better to 7.18.0 which is the latest actual version of the app.

 

Regards,

Dean

Hello,

 

This feature is available starting from 7.17.4 version. The simplest way to achieve it is just to upgrade your website to 7.17.4 or even better to 7.18.0 which is the latest actual version of the app.

 

Regards,

Dean

Show all comments

Hello all,

 

I am trying to enable OAuth 2.0 authorization for configuration web services on a on-premises Creatio v7.17/MS SQL instance. I followed this article and got stuck at Point #3 (Creating default resource). Has anyone been able to enable OAuth 2.0 successfully?? Pls find below some details reg my use case - 

 

On trying to add a default resource from the Creatio GUI, we get an error. Ref "Error.png". There is no mention of having to change/fix 'IdentityServerClientId' and 'IdentityServerClientSecret' system settings in the Academy article. The article only mentions OAuth2.0 settings. I went ahead and set the same ClientId & ClientSecret in the above two system settings also. The same error continues.

 

I have attached a few files for your reference - 

  1. 'Error' log file.
  2. 'OAuth20' log file (It says [BadRequest] invalid_scope)
  3. appsettings.json file used to setup IdentityService.
  4. There is a console error which says Ext.JSON.decode is unable to decode the JSON string. However gives no info reg which JSON string it is speaking about. Ref "ConsoleError.png"
  5. Pls find below value of all relevant system settings - 
    1. OAuth20IdentityServerUrl & IdentityServerUrl - "http://localhost:90" (This is where IdentityService is hosted)
    2. OAuth20IdentityServerClientId & IdentityServerClientId - "bpmonline-designer"
    3. IdentityServerClientSecret & OAuth20IdentityServerClientSecret - "665b6f638c2da3ecc5d3a1868eb9352f6e01ee4a"
  6. Few other data points - 
    1. Creatio installation website is still on HTTP and not on HTTPS. 
    2. Identity service website supports both HTTP & HTTPS. But setting the HTTPS url as the Server URL errors out.
Like 0

Like

8 comments

Hello, 

 

There are a few possible root causes of the issue and it's hard to tell the exact one only with the information provided and with no access to the instance. 

Please contact our support team via an email: support@creatio.com and submit the support request so we could check all the needed details. 



Thank you in advance!

Best regards, 

Anastasiia

Anastasiia Zhuravel,

Thanks Anastasiia. I have already done that

M Shrikanth,

 

I have the same issue. Did you find any solution?

 

Thanks

Mohamed

Mohamed Ouederni,

No yet Mohammed. I have written to Creatio support and the issue is yet to be resolved. 

Hello,

I'm having the same issue, too...did you or creatio support find something out?

 

Thanks,

Robert

Hello together,

I have successfully configured OAuth 2.0 authorization on my localhost. I had the same error as you, to check ClientId and ClientSecret. After checking with Creatio support, the problem was in appsettings.json with Clients part of configuration. I have copied Client block of code from Step 10 of this article into appsettings.json (\"AllowedScopes\": part was missing) and after that successfully Generated default resource. Please try that and let us know if it worked. Thanks.

Getting the below error ,could you please help on this.

We are able to integrate.Just need a small change need to give  Authorization server Url for OAuth 2.0 integrations http://localhost:5000/
need to go to root dirctory of identityService and run dotnet IdentityService.dll in cmd or terminal

Show all comments

Hi all,

I am trying to insert a record to an entity using esq as follows in my web service.

[OperationContract]
        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare,
        ResponseFormat = WebMessageFormat.Json)]
        public string InsertCaseESQPostForSATS(DebitCardDataForSATS debitCardData)
        {
            try
            {
                var caseSchema = SystemUserConnection.EntitySchemaManager.GetInstanceByName("SBLSRM");
                var entity = caseSchema.CreateEntity(SystemUserConnection);
                entity.SetColumnValue("SBLAccountNumber", debitCardData.AccountNo);
                entity.SetColumnValue("SBLService", debitCardData.ServiceId);
                
                entity.SetDefColumnValues();
                var result = entity.Save();
                return result.ToString();
            }
            catch(Exception ex)
            {
                return ex.Message;
            }
        }

 

Column 'SBLService' is a lookup column and I am having problem while inserting a record, says, "Value 'SBLService' was not found.". I have checked and confirmed that the object has the column and is published fine. Can somebody assist me on this? How can I set value for a lookup column?

 

 

Like 0

Like

4 comments
Best reply

Roman Raj Bajracharya,

 

the value should be passed as an actual Id and also the column name shouldn't contain the . separator:

 

entity.SetColumnValue("SBLServiceId", Id here);

 

For example see this post https://community.creatio.com/questions/how-create-or-update-record-usi… where Dmytro provided an example of working with GUID columns.

 

Best regards,

Oscar

Hi,

 

Try SBLServiceId instead and also take a look in the database and check how is this column called there.

 

Best regards,

Oscar

Oscar Dylan,

Hi Oscar,

Thank you for the reply. How do I provide the value of Id of SBLService lookup? In the database, it is just 'Id' for the lookup id. I tried to access by doing SBLService.Id but it didn't help.

entity.SetColumnValue("SBLService.Id", debitCardData.ServiceId);

 

Roman Raj Bajracharya,

 

the value should be passed as an actual Id and also the column name shouldn't contain the . separator:

 

entity.SetColumnValue("SBLServiceId", Id here);

 

For example see this post https://community.creatio.com/questions/how-create-or-update-record-usi… where Dmytro provided an example of working with GUID columns.

 

Best regards,

Oscar

Oscar Dylan,

Hi Oscar,

Thank you very much. The record is now inserted. But I am having problem on the execution of a process that should occur when a record on this entity is created. This process is executing well when I create a new record from frontend(UI). Any ideas on this?

Show all comments

Hello Community,

 

The Academy guides on how to create anonymous custom configuration services using WCF / .Net Framework - https://academy.creatio.com/docs/developer/back-end_development/configuration_web_service/configuration_web_service#title-1243-3



Suppose, I have a Creatio cloud instance on Linux using .Net Core. How does one go about creating an anonymous custom configuration service??

 

Regards

Shrikanth

Like 0

Like

4 comments
Best reply

Hello Shrikanth, 



In order to enable Anonymous service for .Net Core edition of Creatio all you need to do is to add information about this service to "AnonymousRoutes" block of ..\Terrasoft.WebHost\appsettings.json file. 

It should look like this:

"Terrasoft.Configuration.[Service name]": [
    "/ServiceModel/[Service name].svc"
]

Please note that there is no need to change service's source code.

Also, in case if "System.Web" name space is being used, it has to be changed to "Terrasoft.Web.Http.Abstractions". 



Kind regards,

Roman

Hello Shrikanth,

 

To create a configuration service you need to authorize via the AuthService.svc. Please refer to the following article: https://academy.creatio.com/documents/technic-sdk/7-16/creating-configu…



Please let us know if any questions or concerns left,



Regards,

Kseniia

 

 

Kseniia Prokopenko,

The documentation clearly says that there is way to create a configuration service with Anonymous authentication. Hope you went through the Academy link I pasted in the question.



My question was - 

The documentation only lists out the steps for the WCF based configuration services (Used by .Net Framework on Windows). How does one go about creating an anonymous service on a Linux installation of Creatio using .Net Core?

Kseniia Prokopenko,

Hi Kseniia, Request and appreciate your assistance for the above query

Hello Shrikanth, 



In order to enable Anonymous service for .Net Core edition of Creatio all you need to do is to add information about this service to "AnonymousRoutes" block of ..\Terrasoft.WebHost\appsettings.json file. 

It should look like this:

"Terrasoft.Configuration.[Service name]": [
    "/ServiceModel/[Service name].svc"
]

Please note that there is no need to change service's source code.

Also, in case if "System.Web" name space is being used, it has to be changed to "Terrasoft.Web.Http.Abstractions". 



Kind regards,

Roman

Show all comments

Hello,

 

I've implemented some code because of the changes on the new version which is coming and do not support DB.Executor.

 

But when i'm executing my source code, the json result is dynamic : i've only the fields which are not empty.

In order to have a great code i've parse the json. So the format is correct that's a great json but I don't know how can I include empty field/value.

 

Is there somebody who can explain me how can I do in order to include all fields in the object to the json return list?

 

Thanks a lot.

Like 0

Like

0 comments
Show all comments

Hi community,

 

We've this situation where we need to send all the attachments that are linked to Documents, including the byte[] data, to a SOAP based service.

We have two solutions in order to implement this:

  1. To send the attachments we could simply convert the byte[] data to base64 string and send it within the body of the SOAP message. Some of the files are more than 10MB, so this is not the best solution.
  2. The other solution is to use the MTOM message encoder, to send the attachments in multiple parts.

We have two questions:

  1. What are the best ways to send multiple attachments through SOAP based requests?
  2. If we choose to send the attachments using MTOM, how can we implement this?

Thanks in Advance.

 

Best Regards,

Pedro Pinheiro

 

 

Like 2

Like

1 comments

Hi Pedro,

 

Maybe it's better to call the https://<instance>/0/rest/FileService/GetFile/7B332DB9-3993-4136-AC32-09353333CC7A/fileId for all the files and receive a response from the third party service? You need to call this link for each record from the DocumentFile table (filed should be modified for each time with an actual Id of a record from the DocumentFile table). Previously we didn't have such requests and we have no practical example of the logic deployment. The link above is a base link used to download attachments when clicking them on the "Attachments" detail so you can try calling it in the webservice.

 

Best regards,

Oscar

Show all comments

I am trying to configure an outbound call to a web service which requires Bearer Authentication. To authenticate, you first have to make a POST to a /token endpoint using body in application/x-form-www-urlencode format. This is a fairly common authentication scheme, but Creatio currently only supports Basic or OAuth 2.0. That's fine, I thought I'd implement the token call myself, however it appears the only content type supported is JSON. If I try to add a Body parameter, it is expecting a JSONPath. Is there some way to do this that I'm missing? Otherwise, what would it take to allow url-encoded body parameters, or add Bearer Token as a supported authentication scheme?

Like 1

Like

5 comments

Hello Aron,

 

Thank you for your question!

Please, check the screenshot below.  Token is being transferred in header: 

Please let us know if you were able to complete your business task.

 

Best regards,

Bogdan S.

I am also wondering about this.



I need to make a POST request which includes urlencodes in body.



This is the cURL of the request I'm trying to get working:

curl -X POST 'https://{server_address}/api/v2/getpersonaltoken' \
  --data-urlencode 'email={user_email}' \
  --data-urlencode 'password={user_password}'

Postman (working): https://prnt.sc/100p26e

Setup in Creatio: https://prnt.sc/100p5t4



Postman is working. But in Creatio I get this response: 

{"status":"error","message":"Email/password or login_token is missing"}

 

 

Bumping this question again

Julius,



Please use the following request parameters to get the response correctly (you need to add an "Authorization" header and two query parameters):

As a result the business process that uses the webservice with these parameters return the response correctly:

Best regards,

Oscar

Oscar Dylan,

 you are the best!

Show all comments

I have been struggling very much with handling collection type response parameters in web services.

When response parameters are or normal type they are very easy to handle in the business processes. Here we are able to handle them as parameters on the Call web service process element. And use these in the process right away.

When there is a Collection which is returned, this is very different. Now the Call web service element parameter is of type Collection of Objects with attributes.

It seems to me that this parameter-type is very difficult to handle in the business process. I can't seem to find documentation in the Academy about how to extract and loop through the contents of the Collection of Objects with attributes.

What I have found in the academy is this article about setting up the Web service.

https://academy.bpmonline.com/documents/administration/7-14/adding-resp…

What I need to learn is how to handle them in bpm'online business processes.

Is there something about this in the Academy?

Is writing source code the only option? It's difficult to debug.

Like 0

Like

6 comments

Dear Julius,

Unfortunately, it is impossible to handle parameters that have the “collection of object” type without using the source code.

Therefore, in this case we recommend using “ScriptTask” element for both calling the web-service and processing the results of call.

For more detailed assistance, please contact technical support.

Best regards,

Norton

Norton Lingard, Thank you. Is there anything like this in the academy? Because there is a special bpm'online syntax to go by in the source-code.

Dear Julius,



The service call in a "Script task” business process element can be implemented via native C#. Please find a lot of examples on how to do that in Google. For example, several links below:



https://stackoverflow.com/questions/9620278/how-do-i-make-calls-to-a-rest-api-using-c



https://code-maze.com/different-ways-consume-restful-api-csharp/

Please note that it is possible to use the native C# collections instead of working with the the special bpmonline collections.

Best regards,

Norton

Hi Julius,

 

Did you manage to solve this?

 

I'm struggling with the same issue and didn't manage to get it to work.

 

Looking forward to having Your answer.

 

Raz

Norton Lingard,

Hi Norton,

 

Is there another example on how to do it in the script task?

 

I tried implementing it based on the links you posted and I'm getting many error messages when posting the code.

 

Thanks,

Raz

Dear Raz,

 

Please find another example in the article by the link below:

 

https://stackoverflow.com/questions/3900371/how-can-i-call-a-webservice-from-c-sharp-with-http-post

 

If you still can’t resolve the issue please provide us with a source code that you wrote and errors that you got.

 

Best regards,

Norton

Show all comments