Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For more info regarding the Camunda API see: https://docs.camunda.org/manual/7.3/api-references/rest/

Kinvey Console

Current Akioma Kinvey console URL: https://kvy-eu3-console.kinvey.com/

From here, you can view/edit applications, services, custom endpoints/functions and test kinvey collections.

Kinvey Configuration

Kinvey Profile Configuration File

First, make sure kinvey cli is installed on your machine. If not, you can use the following command: npm install kinvey-cli

When deploying the Kinvey service locally, you need to have a config file in the current folder from which you are deploying the service. The file name will be '.kinevy'. This will be configured using the kinvey init command.

Once you run this command, you will need to supply your kinvey console credentials and the Kinvey instance ID (optional - in our case this is kvy-eu3).

Alternatively, if you already have a profile configure, you can use it with the command kinvey profile use.

Pasoe Config

In order to connect the application to to Kinvey, we need to set 3 session properties in the pasoe-config.xml file from the ofr-config project: kinveyAppSecret, kinveyInstanceId, kinveyAppKey.

The above 3 properties can be found by selecting an environment within a Kinvey App and clicking on the 3 dots:

Image Removed

After you set the properties in the file, restart the PASOE.

Kinevy Service/Functions

Kinvey Create/Deploy Service

Kinvey Collections

Kinevy DSO Setup

Kinvey Custom Endpoints

...


More information regarding Kinvey Flex Services here: Kinvey Flex Services

Code Block
languagejs
titleCamunda Service Example
linenumberstrue
const sdk = require('kinvey-flex-sdk');
const DigestFetch = require('digest-fetch');


Class CamundaService {

?? ?? ?? ?? constructor(){
?? ?? ?? ?? ?? ?? this.client = new DigestFetch(userName, password);
?? ?? ?? ?? ?? ?? this.logger = flex.logger;

}


getAll (context, complete, modules) {
?? ?? this.logger.info('getAll Context:' + JSON.stringify(context));
?? ?? const backendUrl = "url to camunda backend";
?? ?? this.client.fetch(backendUrl)
?? ?? ?? ?? .then(response => response.json())
?? ?? ?? ?? .then(data => {
?? ?? ?? ?? data.forEach(item => {
?? ?? ?? ?? ?? ?? item._id = item.id;
?? ?? ?? ?? });
?? ?? ?? ?? complete().setBody(data).ok().next();
?? ?? })
?? ?? .catch(e => console.error(e));
}

}

sdk.service((err, flex) => {
?? ?? ?? ?? const data = flex.data;?? ?? ?? ?? ?? ?? ?? ??//get data object
?? ?? ?? ?? const flexLogger = flex.logger;??//get logger

?? ?? ?? ????const camundaFlexServive = data.serviceObject('task');??//get service object from data object
?? ?? ?? ????camundaService = new CamundaService(key, flex);?? ?? ?? ??//instantiate new service class
?? ?? ?? ?? camundaFlexServive.onGetAll(camundaService.getAll.bind(camundaService)); //bind handler function to getAll event

}