How to access Bonita Engine API from a custom REST API Extension - bonita

I would like to develop a REST API Extensions that access the Engine API in order to do some queries and then start a new process.
What is the best way to access the Engine API from such REST extension?

Since Bonita BPM 7.2 you can use context.apiClientto access Bonita BPM Engine APIs from your REST API extension Groovy code.
For example in order to use the IdentityAPI simply use context.apiClient.identityAPI followed by the method you want to call: context.apiClient.identityAPI.getUsers(0, 10, UserCriterion.FIRST_NAME_ASC)

Related

Google Cloud Datastore how to create, update and delete entity with http request

As Google Cloud Datastore client libraries are available for some language only. Now, How can do operation like create, update and delete of entity without using client libraries with HTTP request.
The Datastore API is built on HTTP and JSON, so any standard HTTP client can send requests to it and parse the responses.You can find more about building a flexible run time here
One of the classic way to do this is to expose the datastore CRUD operations through a set of REST APIs. Google offers Cloud Endpoints which are a set of "tools, libraries and capabilities that allow you to generate APIs and client libraries from an App Engine application" https://cloud.google.com/appengine/docs/java/endpoints/
You can have a look at this tutorial https://rominirani.com/google-cloud-endpoints-tutorial-part-1-b571ad6c7cd2#.1j9holpdt

Python API for Google Drive and Google Sheets

This link gives the Sheets API for Java and .NET. Is there a reference for the same using Python, specifically Python in GAE?
For the Sheets API there's a note on the page you linked:
Note: The Spreadsheet service in Google Apps Script is more
powerful than this API, and now can be accessed via the Apps Script
Execution REST API. If you're not sure which API you need to use,
try Apps Script first.
At least the Apps Script Execution REST API has a Python guide.

Can I consume a web service from an appengine app?

I have an appengine app that I want to use as a front end to some existing web services. How can I consume those WS from my app?
I'm using python
You would use the URLFetch API.
In addition to just URLFetch and hand constructing SOAP envelopes, you can also use higher level SOAP libraries like SUDS. Which can parse WSDL and construct requests for you. For performance reasons you will want to cache the WSDL. In one project I parse this offline and deploy the optimised code with the application.

GWT and Google Docs API

I'm using GWT to create a simply app that allows teachers to create easily their own lessons.
The App is going to be on Google App Engine but I want to store lessons in user's Google Docs space .
Is it possible?
As far as I know gwt transforms java into javascript but google docs api is java, do i have to upload the java library to de app engine storage?
any place to start? any advice?
Thanks...
You need server side proxy for GWT client.
Your GWT client communicates with the servlet. The servlet is the actual agent using the google docs API.
Please read my explanation at http://h2g2java.blessedgeek.com/2010/05/accessing-google-userservice-from-gwt.html.
It explains how to get a GWT client could communicate with a Java based Google API. It explains that since GWT requires all Java source involved to be available to the GWT compiler, there are cases that you simply cannot get GWT client to do the task directly.
http://h2g2java.blessedgeek.com/2009/08/tablemgr-gae-gwt-gdata-with-rpc.html similarly explains how to combine gae + gwt + google docs, using the proxy approach. The posting is quite old and therefore the web site it points to does not work anymore because I have not updated the gae app with google mandated authentication measures. But it should work on your local machine.
The above subscribes to a webserver flow paradigm.
However, Google APIs are essentially REST APIs, which allows you to access them directly using your javascript or GWT client. So, instead of using the Java docs for Google APIs, you need to read the Google REST API docs.
http://code.google.com/more/, among other whatnots, provides a list of all the Google cloud APIs. To avoid using the webserver-proxy flow paradigm, choose the javascript or REST version of the API docs.
Here is the google docs/data API:
http://code.google.com/apis/gdata/docs/client-libraries.html.
Choose the javascript API:
http://code.google.com/p/gdata-javascript-client/
I advise you to first practice using these APIs by coding in javascript. Then you would get a good grasp of what you need to do in GWT.
You should use the GWT API for authentication prior to accessing the Google REST APIs.
http://code.google.com/p/gwt-oauth2/.
Essentially, you are obtaining an authenticated token which your client could use to access Google's data thro their REST APIs.
FYI, REST APIs are, in plain speak, URLs in a defined specification, where data transmission is by convention mostly in JSON or XML.

Does Google App Engine Support JAVA Proxy API's?

I have a question surrounding the REST service. I have an application written in C# , i want to put this application onto the cloud. I have a small problem, My Application has a built in C# API. I want to interact with my application and Google app engine. I want to develop a JAVA PROXY on top of GAE so that it can interact with my application using REST protocol and performs CRUD operations on Cloud and returns back data to my application.
Is it possible to do this ? to what i know is that SANDBOX feature doesn't allow us to directly interact with the App Engine.
Any suggestion on this.........
Thanks Heaps
Suraj
You don't need Java Proxy API in order to make http requests to another server (I guess you did not have java's Proxy class in mind?).
Yes, AppEngine can make HTTP/REST requests to other servers via URL Fetch java API.

Resources