simple bpel workflow : select query return multiple rows - wsdl

I have to implement a simple bpel workflow, which only executes a select query on database. I have been able to create a Data Service wsdl file. Its flow is attached along with this question as an image file. Please have a look at that first. If you see the image, I some how ended up making a complex structure for parameter "Name" (auto-magically generated wsdl code by wso2 Data Service Server). It has a complex element called "Customer" which has 2 string values "Name" and "nid". I have also copied the wsdl file in case you need to see it. Here: http://pastebin.com/QTKZbdzn
I believe I am not sending any input parameters, while when I try to directly invoke the Data Service without Receive module, it gives an error, saying "No Start activity has been defined for the process".
Anyone who has implemented a similar BPEL workflow for the Data Service, please let me know. The data service works fine! I have tested it separately. thanks!
UPDATE
I ended up making a BPM like this:
I have to change the DSS also, so that I provide some input to the BPM. Like rather than "select * from customer" I am now implementing "select * from customer where nid = ?". It proved to be pretty succesfull. Thanks for helping me out joergl & vimesh. But if you still figure out how query with no where clause would work, update it here.

I have made a bpel flow with data service.
The very first thing we need to do is adding a receive element in the bpel flow. Actually it let us to send a request to the bps and at the same time bps makes a new instance with the request.
So then you can do whatever you wish, like invoking ESB proxies, DSS services, etc. while invoking the external service you can parameters to that request. Even though you are not sending any input parameters to the DSS service you should make a request to the DSS inside BPS in the correct format.(I mean the body part)
You can simply go ahead with the bpel samples available in this and then better start with DSS integrations.

Related

OData in Datafactory

I have a task toget some data from an external supplier.
They have a Rest OData API. I have to connect using a subscription-key(APIKey).
When creating the OData LService, I add an Auth Header: "subscription-key" and in the Value field, I enter my key. After saving, I create a new dataset, and the OData LinkedService, provides me with the remote tables. I can choose the table I want and after that I create a pipeline to copy data from that table to my Azure SQL server.
This works fantastic :-)
However, after closing my browser and re-open it, the subscription key that I have entered earlier on the linked service, is now replaced with stars as it is a securestring. When I now run my pipeline, it will think that my key is the ten stars that have replaced my real key.
What am I doing wrong here ?
Also I would prefer to get my value from the KeyVault, but it seems that this is not possible on ODat connections....
Hope someone is able to provide some insight here :-)
BR Tom
From my testing I did not get any error on re-running. However coming to dynamic keys - I was not able to achieve it using the ODATA linked service.
Alternatively, if you can hit the ODATA endpoint with REST / HTTP Connector
You could - have a Web Activity to get the keys from the Key Vault and Set in the Variable.
WEB Activity URL : https://<your-keyvalut-name>.vault.azure.net/secrets/<your-secret-name>;
You could access the output of the web Activity using : #activity('Web1').output.value & Store in a variable.
You can reference this variable as the SUBSCRIPTION KEY for the subsequent steps in the REST/HTTP dataset.
You could pass it along the additional headers

Is there any way to send a filter/parameter in Client OperationMode?

Hello Stackoverflow Community,
i developed an abap program that displays roles in a tree output and now want to create a ui5 application with the same functionality. For this, i created an OData Service where the GET-Method simulates my abap program via a SUBMIT-Call and returns the output tree after then displays it using a TreeTable.
Now the problem: I am using OperationMode "Client" for my OData Service so filtering is done on the client side. My backend program needs parameters to function though. Is there a way to pass any arguments to my GET-Method while using OperationMode "Client"?
I have tried the bindRows() approach where u pass filters but this only works in "Server" OperationMode. Sadly i cant use "Server" OperationMode because it would result in having to simulate my abap program everytime the user expands a TreeTable-Node, rendering my program unuseable because of performance issues.
Hoping someone can help me on this issue and looking forward to your answers!
Solved this issue by sending a request in "Server"-Mode, saving the odata response to a json model and then binding said model to my treetable with "Client" operationmode.

I need some kind of decission module in flowground

I'm trying to send different message cards to multiple teams channels.
I have already created a webhook (telekom/webhook) for this which gives me the right variables via json.
There are four department receiver channels (telekom/rest-api-component) which are also configured to send pre-formatted teams message cards with the variables they have submitted.
Currently this happens to all channels at the same time. In between I would need an "action" in which I can decide which of the channels is served based on the input values. Unfortunately I don't find anything suitable due to the variety of the apis. Do you know how I could realize this ? So something like if value department = Backoffice then (Teams "Account Management") action.
In order to be able to talk with the different applications from Office 365 I wanted to use the Microsoft Graph api which is now available for some time. I couldn't find them in Flowground. Are you planning to include this module ?
For the implementation with Office365 flows this would be absolutely necessary for me.
I want to come back to this question: The CBR is a good choice for executing decisions indeed. But is is this the best solution in every situation? I do not think so.
Assume the following task:
Depending on an input parameter test you want to fire a request to different web services (WS1:google.de and WS2:bing.de)
Solution 1: You realize the requests with dedicated connectors for WS1 and WS2.
In this case you need the CBR in front of WS1 connector and WS2 connector to decide, what connector has to been used next.
Solution 2: You are able to realize both requests with REST-API connector. In this case you can use a JSONATA expression as URL mapping, e.g.
(test="google") ? "http://google.de" : http://bing.de
By using JSONATA expressions every connector has (limited) capability for executing decisions.
Solution 2 has a big advantage when you are using realtime flows. In this case you are able to reduce the number of connectors they are needed for running the flow and (very important from a cost perspective ) the number of permanently claimed token by this flow.
For reducing the complexity of JSONATA expressions (e.g. when you add further search engines) and for separation of individual configuration items you can use the configuration connector (we can discuss this in a separate thread if needed).
Solution 1 is the choice without alternative when you have to decide between different structures/connectors they need to be executed within a flow.
Please try the Content-Based-Router: https://doc.flowground.net/guides/content-based-router.html, it is available on the Connector Catalog.

Posting JSON data to Web API - where do I even start?

I have zero experience with Web API and JSON. My requirements are to create a service (I'm using Web API for this) that will accept MIME Encoded JSON data. The service will take that data, insert it into a database, and return the primary key value back to the client.
My hang-up is being able to know where to even start with this. A couple of questions that I have are:
When the device sends the JSON data, how will the service "accept" it? Meaning, what's being passed to the service isn't an URL that we commonly see with MVC (/Controller/Action/ID) which then invokes the Action Method. So, how will the service know what to invoke if I'm passing raw JSON data?
How would I test this if I don't have a device that sends the JSON data yet? Would I manually invoke an AJAX call and call that particular action method and pass in the JSON data that way?
I apologize for the seemingly elementary questions.
Thanks.
When you call a WebAPI-method you still have to specify the endpoint:
Example:
PUT /api/people
MVC knows from that that it should call the put-method on the PeopleController.
You can send raw JSON-data to test it. A good tool for that is HttpFiddler: http://fiddler2.com/
As for where to start, try to create a basic WebAPI-project with visual studio, it will include some samples and you can get going from that. If you run into wall, you can come back here

How do I consume a real web service from a BPEL Process?

I've been doing some research on BPEL for about two weeks now and still don't quite get it.
I have deployed the HelloWorld sample in ODE and have also managed to deploy this other one.
My intention was to do something like the second example but with my own real WS deployed and working.
I'm now at the point of having a process with no errors and correctly deployed in ODE with the following structure:
I have started the project from a service definition importing my Multiply.wsdl. The Designer has composed the import tag into the MuktiplyProcessArtifacts.wsdl next to the PartnerLinkTypes all automagically so I assume all namespaces, etc are ok.
There is a few concepts I misundertand in order to make all of this work:
In my original Multiply.wsdl I have
soap:address
location="http://localhost:8080/WS-multiply/multiply"
but ODE tells me my soap:address must have the form host.port/ode/processes..
This doesn't sound reasonable to me since my WS could be implemented anywhere outside my ODE_HOME.
The second example I mentioned before explains how the Designer presumably creates a "Caller.wsdl", which in fact has the function I would desire, which is to implement a "wrapper" WSDL, providing the BPEL process with entry and exit points. The issue is the Designer does not generate that interface. Am I supposed to create it myself? Do I have to create it at all?
If that 3rd wsdl is really needed, is it the one I would have to call if I wanted to test the whole process?
It looks like your partner WSDL is associated to a myrole of a partnerlink. Partnerlinks and partnerlink types are a concept in BPEL that is used to define dual interfaces in a sense that if a partner A wants to communicate with a BPEL process as a buyer, it needs to provide a certain set of functionality that the process can use for further communications (i.e. sending a shipment confirmation to the buyer). Thus, a partnerlink maintains two roles, the myRole is the portType (aka interface) that the process itself provides, the partnerRole refers to a portType the process expects to be implemented by the partner. MyRoles must be of course implemented by the BPEL process and thus needs to have an endpoint that is exposed by the BPEL engine. PartnerRoles can be bound to arbitrary endpoints. This happens in the deployment descriptor, which is the deploy.xml in ODE.
I guess you can fix your process by assigning your partner WSDL to a partner role.
I hope http://thiliniishaka.blogspot.com/2012/10/develop-ws-bpel-process-using-wso2.html
and http://thiliniishaka.blogspot.com/2012/10/part-2-developing-ws-bpel-process-using.html may help you to resolve aforementioned queries.
Thanks
Thilini
Its mandatory to have Ode.war deployed at tomcat server, tomcat create a path like the picture, you need to config your endpoit with the complete path /ode/processes
c:\apache-tomcat-7.0.55\webapps\ode\WEB-INF\processes\BPEL_WS\

Resources