Please tell me if it is possible to implement a special web service that uses anonymous authentication, which can be called from an arbitrary address like https://domen.creatio.com/mypath/?
Thank you

Like 0

Like

6 comments

Ryan Farley,

Thanks, but not that

So as far as I understood, you need a web service that will be available not from /0/ServiceModel directory, but from some custom one. If so - no, this is not possible, you need to use the approach described in the Academy article that Ryan shared.

Oleg Drobina,

Thank you, this is exactly what I need, I already understood that I need to look for another way

Демчук,

 

btw, can you please describe why you need to use a custom path, but not standard path like /0/ServiceModel or /0/rest?

Oleg Drobina,

Kyivstar sends webhooks to the url of the remote system + /callstate. Currently, Kyivstar and I are discussing the possibility of providing the url of the remote system https://<domen >/ServiceModel/serviceName.svc/
Thank you.

Show all comments

Hi Creatio Community,

I am working on extending the existing implementation of the Execute method in the web service designer, which is part of a base package in Creatio. My goal is to modify the method to add additional functionality: specifically, I want to save the web service response as a record using an EntitySchemaQuery (ESQ), so that the response can be displayed in a custom section inside Creatio.

However, I am encountering a compilation error:

Error:
cannot convert from 'System.Collections.Generic.IEnumerable<Terrasoft.Configuration.ServiceSchemaParameter>' to 'System.Collections.Generic.IEnumerable<Terrasoft.Configuration.ServiceSchema.ServiceSchemaParameter>'

It appears that the system is having difficulty converting between two types that have the same name but are possibly from different namespaces. I am using ServiceSchemaParameter in my custom implementation, but the IServiceSchemaClient.Execute() method is expecting the parameter to be of a slightly different type.

Here’s an overview of my approach:

  1. I've modified the Execute method to include an ESQ that logs the web service call and stores the response.
  2. The issue arises when passing the parameters (of type List<ServiceSchemaParameter>) to the Execute method, where it's expecting IEnumerable<ServiceSchema.ServiceSchemaParameter>.
  3. I believe the conflict is due to namespace ambiguity or mismatched types between base and custom implementations.

    My code: 
     
  4. namespace Terrasoft.Configuration
    {
     
     
        using System;
        using System.Linq;
        using System.Collections.Generic;
        using System.Runtime.Serialization;
        using System.ServiceModel;
        using System.ServiceModel.Web;
        using System.ServiceModel.Activation;
        using Terrasoft.Core.Factories;
        using Terrasoft.Services;
        using Terrasoft.Web.Common;
        using Terrasoft.Core;
        using Terrasoft.Core.Entities;
        using Terrasoft.Configuration.ServiceSchema;
     
    	#region Class: CallServiceSchemaService
     
    	[ServiceContract]
    	[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    	public class CallServiceSchemaService : BaseService
    	{
    		#region Methods: Public
     
    		[OperationContract]
    		[WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped,
    			ResponseFormat = WebMessageFormat.Json)]
    		public CallServiceSchemaResponse Execute(string serviceName, string methodName, List<ServiceSchemaParameter> parameters) {
    			if (parameters == null) {
    				parameters = new List<ServiceSchemaParameter>();
    			}
    			try {
    				UserConnection.DBSecurityEngine.CheckCanExecuteOperation("CanManageSolution");
     
    				// Getting the builder and client from the ClassFactory
    				var builder = ClassFactory.Get<IServiceSchemaParameterBuilder>();
    				var serviceSchemaClient = ClassFactory.Get<IServiceSchemaClient>();
     
    				// No need to cast, List<T> already implements IEnumerable<T>
    				var serviceResponse = serviceSchemaClient.Execute(UserConnection, serviceName, methodName, builder.Build(parameters.AsEnumerable()));
     
    				// Log the request and response
    				LogWebServiceCall(serviceName, methodName, parameters, serviceResponse);
     
    				return new CallServiceSchemaResponse(serviceResponse);
    			} catch (Exception e) {
    				return new CallServiceSchemaResponse(e);
    			}
    		}
     
    		#endregion
     
    		private void LogWebServiceCall(string serviceName, string methodName, List<ServiceSchemaParameter> parameters,
                IServiceClientResponse response = null, Exception error = null) {
                var entitySchema = UserConnection.EntitySchemaManager.GetInstanceByName("UsrWebServiceLog");
                var assignersEntity = entitySchema.CreateEntity(UserConnection);
                assignersEntity.SetDefColumnValues();
     
                assignersEntity.SetColumnValue("UsrServiceName", serviceName);
                assignersEntity.SetColumnValue("UsrMethodName", methodName);
                // Log additional columns if needed, as seen in your commented code
                assignersEntity.Save();
            }
     
    	}
     
    	#endregion
     
    	#region Class: CallServiceSchemaResponse
     
    	[DataContract(Name = "CallServiceSchemaResponse")]
    	public class CallServiceSchemaResponse : ConfigurationServiceResponse
    	{
    		#region Constructor: public
     
    		public CallServiceSchemaResponse(IServiceClientResponse serviceResponse) {
    			StatusCode = serviceResponse.StatusCode;
    			Success = serviceResponse.Success;
    			ResponseBody = serviceResponse.Body;
    			ResponseRawData = serviceResponse.RawDataResponse;
    			RequestBody = serviceResponse.RequestBody;
    			RequestRawData = serviceResponse.RawDataRequest;
    			ParameterValues = Newtonsoft.Json.JsonConvert.SerializeObject(serviceResponse.ParameterValues);
    		}
     
    		public CallServiceSchemaResponse(Exception e) : base(e) {}
     
    		#endregion
     
    		#region Properties: Public
     
    		[DataMember]
    		public int StatusCode;
     
    		[DataMember]
    		public string ParameterValues;
     
    		[DataMember]
    		public string RequestRawData;
     
    		[DataMember]
    		public string RequestBody;
     
    		[DataMember]
    		public string ResponseRawData;
     
    		[DataMember]
    		public string ResponseBody;
     
    		#endregion
    	}
     
    	#endregion
     
    	#region Class: ServiceSchemaParameter
     
    	[DataContract]
    	public class ServiceSchemaParameter
    	{
    		#region Properties: Internal
     
    		[DataMember(Name = "code")]
    		public string Code;
     
    		[DataMember(Name = "value")]
    		public object Value;
     
    		[DataMember(Name = "nested")]
    		public List<List<ServiceSchemaParameter>> NestedParameters;
     
    		#endregion
    	}
     
    	#endregion
    }

 

Request:
Could anyone guide me on how to properly resolve this type conversion issue? If there is a better way to manage the namespace or cast the types correctly, I would appreciate any advice or best practices to ensure compatibility between the types.

Thank you for your help!

Code Context:
CallServiceSchemaService.svc 
Service Designer Package

Looking forward to your suggestions and insights!

Like 2

Like

1 comments

Hello Pranshu Basak,

Please change the part of the code 

var serviceResponse = serviceSchemaClient.Execute(UserConnection, serviceName, methodName, builder.Build(parameters.AsEnumerable()));

to the new one:

var serviceResponse = serviceSchemaClient.Execute(UserConnection, serviceName, methodName, builder.Build((IEnumerable&lt;ServiceSchema.ServiceSchemaParameter&gt;)parameters.AsEnumerable()));

for solving the compilation error.

 

Show all comments

Hi All, I have setup a web service in Creatio that is working fine when I send parameters with data.

 

Sometimes I gonna call thie web service without all the parameters on the query, just one or more, it will depends on othe step before.

 

Is there a way to have a web service set up in Creatio with all parameters, but only make the call using the parameters that are not null?

Like 1

Like

3 comments

Hello!

 

It depends on whether the parameters with NULL values are required or not.

 

You can try leaving out the NULL parameters and see how the service responds. If the call fails with an error, then you'll need to include those parameters.

 

Let us know if you need further assistance!

If the API you're calling is picky about the parameters being included without values, you can add the same service method twice, once with the params, and one without. Then just call one or the other based on the needs.

Thanks for the replies, would be nice to have a way to disable a parameter, for situations like this.
For thie particular API I´m calling there are about 10 parameters available, and the way Creatio is doing, it´s sending all (query) parameters, even though its value is empty.
I´m trying to find a work around or a way to call this API sending only the required data.

Show all comments

Hi team,

We wanted to run a process to close the existing tab for the perticular record Id of a Section for which the patch API is running. I.e. we want to call the method whenever the patch API(provided in documentation of APis) is hit from postman.

Can you please provide a way to d

Like 0

Like

1 comments

Dear Kashih,
Thank you for your question. 

Could you please clarify if I understood your question correctly. Do you want the editing page of an object (for example, a contact) to close after your service receives a PATCH request with the ID of your object from Postman? Should this behavior occur for all users who have the editing page of the object open, which needs to be closed?

I look forward to your response to assist you further. I am also happy to answer any other questions you may have.

Show all comments

Hi Community,

 

I'm having troubles generating a request with the following XML body, using the "Call Web Service" integration tool.

<soapenv:Envelope xmlns:soap="" xmlns:cam="" xmlns:soapenv="">
	<soapenv:Header />
	<soapenv:Body>
		<cam:startProcessCampanhasaaaaa>
			<soap:request>
				<soap:agencia>1</soap:agencia>
				<soap:argumentarioVenda>A</soap:argumentarioVenda>
				<soap:nomeCampanha>A</soap:nomeCampanha>
				<soap:nomeEntidade>A</soap:nomeEntidade>
				<soap:notasAdicionais>A</soap:notasAdicionais>
				<soap:numeroEntidade>A</soap:numeroEntidade>
				<soap:requestId>A</soap:requestId>
				<soap:validadeTarefa>1</soap:validadeTarefa>
				<soap:gestorEntidade>A</soap:gestorEntidade>
			</soap:request>
		</cam:startProcessCampanhasaaaaa>
	</soapenv:Body>
</soapenv:Envelope>

Basically, when I tried to add the necessary parameters for the request, I've noticed that I can't add an object parameter without defining it as an array.

This setting is blocking me from following the structure of the request above. Because the "request" parameter is not an array. I also tried to import the wsdl, and it didn't work either.

 

Is there a way to bypass this? Should I create a script task instead?

 

Thank you in advance.

 

Best Regards,

Pedro Pinheiro

Like 1

Like

3 comments

Hello,

 

You can create this service manually.

Because this is an OOTB behavior with the value "is array".

Hi Kalymbet Anastasia,

 

Sorry, but I didn't understand your answer. The property "Is array" is true by default.

 

Do I need to create the soap request using a script task? 

 

Best Regards,

Pedro Pinheiro

Pedro Pinheiro,

 

Yes, you're right. When the request parameter is of type object the collection is considered a typed array and the checkbox is checked by default and not editable.



In this case, using a script task for the SOAP service would solve the case.



BR,

Bhoobalan Palanivelu.

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

I have a Power Automate HTTP that calls a report and emails the report.

I simply want to add a button or run service to Creatio to preform the same action?

 

How do I this, is it using the Web Call Service, if so I have tried this but not working?

Is possible to simply add a button with a hyper-link?

Like 0

Like

3 comments

Hello,

 

Here are some guides that might be helpful.

 

Some ideas on how to add buttons:

https://academy.creatio.com/documents/technic-sdk/7-16/how-add-button-e…

https://academy.creatio.com/documents/technic-sdk/7-16/how-add-button-e…

 

How to run a process by clicking the custom button

https://academy.creatio.com/documents/technic-sdk/7-13/process-launch-c…

 

How to call for webservice using a process:

https://academy.creatio.com/documents/technic-sdk/7-13/how-run-bpmonlin…

 

Regards,

Dean

dean parrett,

This documentation with examples of "How to run a process by clicking the custom button" is useful for a problem that I have, but is there also any example of how to run processes from buttons in the mobile application?

Dear Daniel,

 

The mobile app doesn't support launching the processes by button click. They can be launched only by editing\creating\deleting a record. There is no way to bind a process to some function like onClick in mobile app. The process will no launch. This feature will be added in the nearest future application versions.

 

Regards,

Dean

Show all comments

Hello,

 

I am trying to implement a web-service integration that provides a collection of fields as a response, and adding it to an auto-generated page to show the results. Can someone guide me how I can implement this functionality to grab fields from a collection and show them as separate individual fields?

Like 1

Like

2 comments

I think it depends. If the quantity of fields you need is static and will not change, you can just read individual values and point them to specific fields. If it is a variable, its more complex. 

I am limited in coding, so I would do this as a detail rather than fields. You would have to code something special, I think, to get a variable quantity of fields to display. But with a detail, it will scale with the number of records you want to show. You can also change the detail to an "Editable Detail" if you want the user to edit the values inline. You can either have the detail show the actual records for direct editing, or you can setup a sort of temporary object for the detail that you read and write to that then you can use later.

Hi Reid,

 

Thank you for your answer. I do get your point and even I was thinking along the same lines.

The issue that I am facing right now, is when I'm trying to call a web-service in the business process, using the "Call web-service" element, the response of that web-service is a collection of objects, and any element (Auto-generated Page/Pre-configured page/etc) that I add after this web-service element, does not take that collection of objects at all. It only takes the "Response body" as the value. And when I map the individual values somehow, they do not reflect the results as desired, because they can't just pick one value out of a collection of values randomly, and hence the fields show blank in the result.

So I'm just trying to figure out if this out-of-the-box functionality works only for individual fields or for collection of objects also. 

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

Hi,

Is there a way to package an anonymus webservice created using the guide from the academy?

https://academy.bpmonline.com/documents/technic-sdk/7-13/creating-anony…

I need to have a public endpoint to integrate with a texting app that notifies of messages realtime, but the endpoint cant have authentication. Is there any other way to expose a public endpoint?

 

Regards,

Luciano

Like 0

Like

5 comments

Hello Luciano,



Basically, to implement the anonymous webservice you should simply follow the instructions from the article that you sent. Anonymous webservice concept means that authentication is not a required step to interact with this service.

Also, if you use onsite version of bpm'online, don`t forget to register the service (there is an explanation how to do it in the article).

In case your site is located in cloud you should email support@bpmonline.com so the support team will help you with registration.



Best regards,

Alex

Alex_Tim,

Thank you for the answer, so the the package only contains the webservice class, the svc creation and .config changes are done by support, right?

Edit:

Additionally if also want to package this to make it available on the store, how would it work? do every customer that's bpm hosted needs to email support to get the webservice registered?

Regards,

Luciano

Luciano De Munno,

Hello, yes, you can create the webservice class in any package that you want.

Svc creation and changes in config should be done by support team. 



You can upload the package to the marketplace, but since changes should also be made in .config and svc files every customer will need to email support to register the webservice.



Best regards,

Alex

Alex_Tim,

Hi, do you know fi it's possible to use POST o r PUT instead of GET? whenever i put 

WebInvoke(Method = "POST") i keep getting 403

Luciano De Munno,

Hello! Error 403 means that there is no header with a CSRF token. To make a request using ARC, you need to add a header with a valid csrf token for the current session. You can get it, for example, by taking any post request from the network chrome tab. It is also better to put a header with cookies.

Read more about CSRF in the article:https://academy.bpmonline.com/documents/technic-sdk/7-13/protection-csrf-attacks-during-integration-bpmonline

Show all comments