UNPKG

1.15 kBMarkdownView Raw
1# WSO2 Services Wrapper #
2
3This package provides access to the WSO2 platform via the various exposed apis.
4
5### What is this repository for? ###
6
7* This repository provides quick access to WSO2 services
8* Version 0.0.11
9* https://docs.wso2.com/display/EI611/BPMN+REST+API
10* https://www.activiti.org/userguide/index.html#_rest_api
11
12### How do I get set up? ###
13
14* npm insall --save @daedalus/wso2
15* create a reference to the resource you want (using BPS as an example)
16```
17const bps = require("@daedalus/wso2").bps;
18```
19* create a reference to the methods you want to use
20```
21const Task = bps.methods.Task;
22```
23* each method is expecting a data object with the following structure
24```
25let data = {
26 server: {
27 url: "https://<HOSTNAME>:<PORT>/"
28 },
29 auth: {
30 username: "admin",
31 password: "admin"
32 }
33};
34```
35* make a call to the methods you wish to use
36```
37let taskId = "106";
38let data = <As Example Above>;
39Task.variables(taskId, data, (err, res) => {
40 if(err) console.log(err);
41 else console.log(res);
42});
43```
44* Please see the wiki for all the specific structures for the different methods