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

Hi,

I checked and tested an example using this documentation (https://academy.bpmonline.com/documents/administration/7-13/web-service-integration). Web service example (http://fixer.io) is JSON formatted and there is no issue to configure in Process library.

I have another web service link which required output is in XML format. I'm not sure if its configurable in Process library or it will be only possible through code customization.

 

Below is screenshot of specific area of output from that web service link

Any help will be highly appreciable. 

 

Regards

Like 0

Like

3 comments

Please deploy the application locally and catch the request and the response with fiddler.

https://docs.telerik.com/fiddler/Configure-Fiddler/Tasks/ConfigureDotNE…

This way you'll get more information. 

Hi Eugene,

Thank you for reply.

It means there will be code customization is required?

 

Regards

The code customization is not required. But in order to create an integration with a web service the skill in working with web services is required. 

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

I created a custom service following this guide: https://academy.bpmonline.com/documents/technic-sdk/7-12/how-create-custom-configuration-service. The GET method works as expected but when I created a POST endpoint, the only response I get is 403. Actually sending POST request to any endpoint ends up with this error. My class looks like this:

[ServiceContract]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
public class UsrCustomService: BaseService
{
	[OperationContract]
	[WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json)]
	public bool PostTest()
	{
		return true;
	}
 
	[OperationContract]
	[WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json)]
	public string GetTest()
	{
		return "Hello world";
	}
}

Do you know how can I fix it?

Like 0

Like

7 comments

Dear Carlos,

This error indicated that you are forbidden to insert into the object. This usually happens, when the user, whose login details you are using to connect does not have rights to write to the indicated object.

Please double check the rights for the object per user you are authenticating with.

Regards,

Anastasia

Anastasia Botezat,

Hm, I'm not inserting into any objects here, the service just returns constant values (for now). I'm also authenticating with Supervisor account.

Carlos,

Please check the CSRF header in your request. Probably, you don't pass CSRF cookie and therefore get the error - https://academy.bpmonline.com/documents/technic-sdk/7-12/protection-csrf-attacks-during-integration-bpmonline

If this won't help. please contact our support at support@bpmonline.com, since it's hard to say what's wrong with the request as we don't see the request body and the request headers. Please, use Fiddler as a proxy and send us a full text of the request from Fiddler. This way we will be able to find the cause of issue.

Regards,

Anastasia

Carlos Zaldivar Batista,

How are you calling the configuration service? Is it from within a client schema or from externally using code or something like postman? 

Ryan 

Ryan Farley,

Postman. And before making request to UsrCustomService I first make a request to /ServiceModel/AuthService.svc/Login to obtain authentication cookies.

Carlos Zaldivar Batista,

Are you also copying the contents of the BPMCSRF cookie on the call to AuthService.svc/Login to the CSRF header for the request to the config service? 

This article in the academy outlines the steps for making this call via Postman https://academy.bpmonline.com/documents/technic-sdk/7-13/how-call-confi…

Ryan Farley,

Nope, that's what I was missing. Thanks!

Show all comments

Hi,

When I am trying to send request from BPM (http://localhost:82) to external web app (https://localhost:58733) via 'call web service' system action I am getting an error:

"system.net.webexception could not establish secure channel for ssl/tls ---> system.security.authentication.authenticationexception the remote certificate is invalid"

What I am doing wrong? 'Call Web Service' system action should work with SSL/TLS without any problem?

Best regards,

Tom

 

Like 0

Like

2 comments

I've used Call Web Service with SSL without issue. That error is a general .NET error that usually relates to issues with the certificate and likely means one of the following is true:

  • The certificate doesn't match the URL.
  • The certificate is self-signed and not added as a trusted certificate.
  • The certificate is expired.
  • The certificate is signed by a root certificate that's not installed on your machine.

If the cert is ok, and since this is a local install, you can try going to the external URL in IE (on the server where Bpm'online is installed), click the lock icon then "View Certificates", then click the button to "Install Certificate" (be sure you select to install on "Local Machine" and not "Current User"

Tom,

Please use this article to troubleshoot the issue https://blogs.msdn.microsoft.com/friis/2017/10/10/troubleshooting-tls-s… and also Ryan is right. The reason is probably in certificate so that's why you need to check it firstly.

Best regards,

Oscar

Show all comments

Hi,

I've configured Azure AD to my BPM. Other external application (web app) uses same Azure AD. I am trying to figure it out, how to do this:

1) Logged (via Azure AD) user on external web app, clicks button which will send request to BPM (to execute some process)

2) BPM should receive request and somehow assign executing process to currently logged user on external web app

Do you know the way to do this? Maybe I should do something like this:

1) Create technical user on BPM

2) Use this technical user credentials to login via BPM AuthService 

3) Send request to BPM (one of sent parameters will be username or email of currently logged user on web app)

4) BPM can somehow assign this username/email to executed process (how to do this?)

Maybe there is some better way to make it work? I saw that on BPM 7.13 there is some OAuth 2.0 integration -> https://academy.bpmonline.com/documents/technic-bpms/7-13/setting-oauth-20-application

Best regards,

Tomasz

Like 0

Like

1 comments

Hello Tomasz,

The idea is to authorize your external web app to bpmonline using user`s credentials. More about authentication by the link: 

https://academy.bpmonline.com/documents/technic-sdk/7-13/choosing-metho…

Afterwards, business processes will run under this user. Other way to run process under certain user are not available due to security reasons.



One more way to implement this is to log in as technical user e.g. Supervisor and include information about target user in request, After that it`s up to you how to process it in business process.

Regards,

Alex

Show all comments

Hello community



I am working with a business process using the process element [Call Web Service].

The web service configuration and the call are working correctly.

The JSON response is similar to:

{

"$ totalResults": 2,

"$ startIndex": 1,

"$ itemsPerPage": 100,

"$ resources": [

     {

      "$ clave": "t6UJ9A000001",

      "$ Static_state": 200,

      "$ etag": "Yi4EmiUg3xw =",

       "Account": {

             "$ clave": "A6UJ9A0001RU",

             "$ uuid": "00000000-0000-0000-0000-000000000000",

           }

      },

      {

      "$ clave": "t6UJ9A00000B",

      "$ Static_state": 200,

"$ etag": "wMpPUtrfgdA =",

"Account": {

"$ clave": "A6UJ9A0001RX",

"$ uuid": "00000000-0000-0000-0000-000000000000",

}

}

]

}



My goal is to iterate the JSON and finally create tickets in BPM with the source information.

Using a pre-configured page I was able to determine that the parameter where the information is returned is [#WS Step.Response body #]

How can I take this value in a Script Task and process the JSON? or what is the correct procedure to do this?

Previously I should be able to take the value of the parameter [#WS Setp.Success #] to determine if the execution was successful

Thank you!

Good weekend

Like 0

Like

1 comments

get/set a parameter value in a business process script task

var parameter1 = Get<Guid>("Parameter1");

Set("Parameter2", parameter1.ToString());

var parameter2 = Get<string>("Parameter2");

get object of type UserConnection

var userConnection = Get<UserConnection>("UserConnection");

Show all comments