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

I created a web service reference in GUI so I can call it from processes. I want to, depending on some settings, call a test version of this web service or a production version. Only their addresses differ. Is it possible to choose the address dynamically?

Like 0

Like

2 comments

Dear Carlos,

You can create two web services in the system, one with test version URL, other with productive version URL.

Create a system setting, based on which you will decide test or production. Other solution is to use an Exclusive Gateway element, which wold determine which pass to choose. Each of the passes would lead to one Web Services Call element. 

The diagram should look somewhat like this:

Regards,

Anastasia

Anastasia Botezat,

Thank you. I hoped that I could avoid adding two web services but if that's the only option then I'll have to do that.

Show all comments

Is there a way to capture the Request message from a Call Web Service activity for debugging?

Like 0

Like

3 comments

Dear Glenn,

You can use Fiddler to catch requests that are being sent to and from the application and use it for debbuging. But you will be able to do it starting from 7.13.2 version of the applciaiton. Until that you can either create the functionality and then use it after the upgrade or create the request on c# via a script task element.

Best regards,

Oscar

Oscar Dylan,

Both bpm'online and the service are in cloud, so I cannot use fiddler.  What is the target release for 7.13.2?

Dear Glenn,

You will be able to use fiddler to catch requests even if the instance is located on-cloud. As for 7.13.2 version - please take a look at release notes here https://academy.bpmonline.com/documents/bpmonline-release-notes-7-13-2.

Best regards,

Oscar

Show all comments

Hi Community,

we have the following problem, when we make a data load through the consumption of a "REST - WebService"

We would like to know how we could fix the "parse" error so that the execution does not fall ?. This happens when reading a JSON from the WebService.

 

 

 

Newtonsoft.Json.JsonException: Unexpected character while parsing path: 

   at Newtonsoft.Json.Linq.JsonPath.JPath.ParseMain()

   at Newtonsoft.Json.Linq.JToken.SelectToken(String path, Boolean errorWhenNoMatch)

   at Terrasoft.Services.Runtime.JsonResponseBodyParser.FillServiceParameterValues(IEnumerable`1 parameters, JToken responseToken, Dictionary`2 parameterValues)

   at Terrasoft.Services.Runtime.JsonResponseBodyParser.FillComplexArray(ServiceParameter parameter, JArray jsonArray)

   at Terrasoft.Services.Runtime.JsonResponseBodyParser.FillArrayValues(JToken token, ServiceParameter parameter, Type valueType)

   at Terrasoft.Services.Runtime.JsonResponseBodyParser.FillServiceParameterValues(IEnumerable`1 parameters, JToken responseToken, Dictionary`2 parameterValues)

   at Terrasoft.Services.Runtime.JsonResponseBodyParser.Parse(String body, Dictionary`2 dataAdapters)

   at Terrasoft.Services.Runtime.ServiceClientResponse.FillInBodyParameters(Dictionary`2 parameterValues)

   at Terrasoft.Services.Runtime.ServiceClientResponse.ParseResponse()

   at Terrasoft.Services.Runtime.ServiceClientResponse.get_ParameterValues()

   at Terrasoft.Services.WebServiceUserTaskImplementation.FillResponseParameters(IServiceClientResponse response, ProcessWebService userTask, IProcessParametersMetaInfo schema)

   at Terrasoft.Services.WebServiceUserTaskImplementation.Execute(ProcessWebService userTask, ProcessExecutingContext context)

   at Terrasoft.Core.Process.ProcessActivity.Execute(ProcessExecutingContext context)

Like 0

Like

1 comments

Hello,



Basically, the error means that system receives an unexpected json object from web service.



If you use business process element "call web service" to make requests to external web service you should check web service settings.



In case you make a request to a web service via script task i.e. c# code, you should check your code for incorrect casts. 



Also you can simply catch requests and responses from web services via fiddler. With fiddler you are able to view headers, body and other request parameters.



Best regards,

Alex

Show all comments

When trying to call a web service from the BPM'Online platform, the process throws the following error: 

we assume that the error is due to the immense size of the JSON that we try to read from the external web service, so that the response would exceed the processing capacity limits of the webservice module of the bpm'online tool.

Our consulate is, if there is a way to increase the data processing limit of the bpm'online web service module in terms of reading the JSON delivered by the external web service.

We estimate that approximately 6 GB of RAM is needed to process the desired volume of data.

Like 0

Like

2 comments

It doesn't seem to be a memory issue. Bpm'online provides up to around 8 GB RAM in critical moments and 4 GB by default. Anyway, If the application consumes more than around 8 GB RAM, IIS restarts it automatically. If you need more resources, please contact your account manager and the limits will be increased. 

It seems like the issue is related to a wrong JSON format. However, since the JSON is huge you'll not be able to debug it. In this case I recommend to create your own web service according to the article by the link below. 

https://academy.bpmonline.com/documents/technic-sdk/7-13/how-create-cus…

This way in case of the exception message you'll be able to create your own logging or debug the service on a local copy of the application. 

Please be aware of the fact that during the integration process that consumes almost all available RAM users might face performance issues. 

Thank you very much for the reply; it was indeed an error of the JSON that was being called, since it contained Null fields that did not correspond.

Show all comments