Hi, there!
“kintone“, a software provided by kintone Corporation, has a Workflow management feature. Concerning the feature, I have heard from people using it, the following challenges they were facing:
- In the first place, configuration is hard.
- You cannot design complicated business flows.
- After trying hard to finally come up with a complicated setting, maintenance was very difficult later on.
Since kintone is originally a Web database, I think it cannot be helped that the features to form workflows does not become main as their structure of the service.
On the other hand, in Cloud-based Questetra BPM Suite, there are features such as:
- You can configure business flows naturally with Drag & Drop.
- You can design complicated business flows (i.e. Parallel split, Complex conditional split, etc.)
- Easy to maintain because the flow of business is visible.
Therefore, there are cases where kintone and Questetra are used in combination in order to clear the challenges of “Workflow management” mentioned above.
Thus, in this post, I would like to show you how to start business Processes on Questetra, triggered from kintone.
2: How coordination between kintone and Questetra works
3: Settings in Questetra (Preparation for Catching)
4: Settings in kintone (Settings for Throwing)
5: Closing
1: Target Business to supposeh3>
This time I will explain on the contract renewal operation as a sample.
The screen of kintone looks like the following, and the “send data to Questetra” button is placed by customizing with Javascript.
For contracts with less expiration date, you click on the button to start the contract renewal process.
2: How coordination between kintone and Questetra works
Make the following settings respectively.
- Questetra: Set to be started by receiving an HTTP request
- kintone: Using customization with Javascript, add a button for sending displayed record information to Questetra via HTTP request
3: Settings in Questetra (Preparation for Catching)
By placing a “Message Start Event” as below, it becomes able to be started by receiving HTTP request.
* For details of “Message Start Event (HTTP)”, please see this Web document.
M221: Auto Starting Triggered by HTTP Request
I made a business flow like the following, this time.
The Data Item setting on Questetra is as follows (only those related to cooperation with kintone are listed).
Data Item Number | Data Item Name | Data type |
---|---|---|
9 | Record Number/td> | Numeric type |
0 | Customer Code | String type |
1 | Customer Name | String type |
2 | Representative in Charge | String type |
3 | Customer Email address | String type |
4 | Expiration Date | Date type |
Also, the data edit permission setting of “Message Start Event (HTTP)” is as follows.
Once you release the App, the parameters etc. Of the connection part with kintone are confirmed. When opening “URL / Parameter Details” on the property of the “Message Start Event (HTTP)” on the released version, the following screen will be displayed and you can check it.
Since it is not the main purpose of this example, we do not define a complicated business flow in Questetra, but we can also design a production business flow like the following:
4: Settings in kintone (Settings for Throwing)
For instructions on customizing with Javascript, the following links are helpful.
Tutorial
Add Buttons (Record Details)
The setting of the fields on kintone are as follows:
Field Name | Field type | Field Code |
---|---|---|
Customer Code | SINGLE_LINE_TEXT | customerCode |
Customer Name | SINGLE_LINE_TEXT | customerName |
Representative Name | SINGLE_LINE_TEXT | customerUserName |
Customer Email address | SINGLE_LINE_TEXT | customerUserEmail |
Expiration Date | DATE | expireDate |
Javascript code set to kintone is as follows. It is set according to “URL / Parameter Details” of “Message Start Event (HTTP)” confirmed in the previously done setting on Questetra.
* Please change “●●●” that are set asURL, processModelInfoId, and key according to your Questetra environment.
(function () {
"use strict";
kintone.events.on('app.record.detail.show', function (event) {
var myIndexButton = document.createElement('button');
myIndexButton.id = 'my_index_button';
myIndexButton.innerHTML = 'Submit Data to Questetra';
myIndexButton.onclick = function () {
var customerCode = '';
var customerName = '';
var customerUserName = '';
var customerUserEmail = '';
var expireDate = '';
var recordId = kintone.app.record.getId();
var rec = kintone.app.record.get();
if (rec) {
customerCode = rec.record.customerCode.value;
customerName = rec.record.customerName.value;
customerUserName = rec.record.customerUserName.value;
customerUserEmail = rec.record.customerUserEmail.value;
expireDate = rec.record.expireDate.value;
}
var url = "https://●●●.questetra.net/System/Event/MessageStart/start";
var headers = {'Content-Type' : 'application/x-www-form-urlencoded'};
var data = "processModelInfoId=●●●"
+ "&nodeNumber=0"
+ "&key=●●●"
+ "&data[9].usdecimal=" + recordId
+ "&data[0].input=" + customerCode
+ "&data[1].input=" + encodeURIComponent(customerName)
+ "&data[2].input=" + encodeURIComponent(customerUserName)
+ "&data[3].input=" + encodeURIComponent(customerUserEmail)
+ "&data[4].input=" + expireDate;
kintone.proxy(url, 'POST', headers, data, function (body, status, headers) {
if (status === 200) {
alert('Transmission completed');
} else {
alert('Transmission failed (Please consult system administrator)\n' + status + '\n' + body);
}
});
}
kintone.app.record.getHeaderMenuSpaceElement().appendChild(myIndexButton);
});
})();
5: Closing
With the above setting, when you press a button on the record details screen of kintone, work (Process) starts on Questetra.
In this scenario, it is necessary to return the result from Questetra to kintone, but that part will be explained in Part 2.
If you have any question, please feel free to Contact us.
Apply for Free trial (Starter Plan) of Questetra
When you apply from this web form, you can create a free account for Questetra. All functions including the above are available, so please try it.
Pingback: Examples of Collaborations with Other Systems and BPM Workflow (June, 2019) - Questetra