Tips When You are in Trouble with kintone’s “Workflow Management” (part 2)

How to Send Data to kintone from Cloud BPM Workflow Questetra

 

Hi, there!

 

Following the previous article (Tips When You are in Trouble with kintone’s “Workflow Management”), I would like to tell you about collaboration with “kintone”.
In the previous article, I wrote about connecting from kintone to Questetra. As a sequel to it, I will explain how to connect to submit the processing result from Questetra to kintone.


kintone_to_QBPMS2-en
Make the following settings respectively.

  • kintone: Prepare API token
  • Questetra: Configure to generate JSON data and send it to kintone with http request


Regarding the preparation of the API token, the following link was helpful.
kintone developer network “Using API Token authentication”
Since data will be updated this time, please enable “record edit”. Also please copy the API token for later use.


Set up as the following, JSON data to be generated in “Service Task (Data assignment)” on the left side, and the created JSON data to be sent with HTTP request at “Throwing Message Intermediate Event (HTTP)” on the right.
service_task_message_send
* For details of “Service Task (Data assignment)”, please see the following link.
M227 AUTOMATED STEP Auto Executing Data Binding, Arithmetic Operations
* For details of “Throwing Messaage Intermediate Event (HTTP)”, please see the following link.
M225 AUTO EVENT Auto Sending of HTTP Request with Business data Inserted

The flow of business is the same as in this previous article
flow_sample_kintone-en

The Data Item setting on Questetra is as follows (only those related to cooperation with kintone are listed).
* “(Error)” and “(response)” are data for keeping communication results with kintone. You can ignore them if it has been processed properly.

Data Item Number Data Item Name Data type
9 Record Number Numeric type
2 Representative in Charge String type
3 Customer Email address String type
5 Renewed Epiration Date Date type/td>
10 json String type (multiple lines)
11 (error) String type (multiple lines)
12 (response) String type (multiple lines)

For the setting of “Service Task (Data assignment)”, the data item to save the result is “json”, and the expression is as follows.
* Since the id of app that is set as “●●●” changes according to your environment of kintone, please change it accordingly.
* I have inserted “# EscapeEcmaScript ()” in consideration of the possibility that a character type that should be escaped in JSON will be included.

{
  "app": "●●●",
  "id": "#{data['9']}",
  "record": {
    "customerUserName": {
      "value": "#{#escapeEcmaScript(data['2'])}"
    },
    "customerUserEmail": {
      "value": "#{#escapeEcmaScript(data['3'])}"
    },
    "expireDate": {
      "value": "#{data['5']}"
    }
  }
}

And the setting of “Throwing Message Intermediate Event (HTTP)” is as follows.
* The point is that since data update is carried out this time, “HTTP Method” is “PUT”.
message_send_property1-en* API token prepared on kintone side is used here.
message_send_property2-enmessage_send_property3-enmessage_send_property4-en


With the above settings, as the work progresses on Questetra, data is sent to kintone, and the data on the kintone is updated.
In other words, you can extract part of kinotne’s “Process management” into Questetra in this way.

 


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.

FreeQues

 

About Kusaka Tsuyoshi

営業をやってますが、もともとエンジニアなので、プログラミングもやります。
View all posts by Kusaka Tsuyoshi

Recommendations
Prev article - 50. Questetra Tips Automate Processing by Accessing its Own API
Next article - 50. Questetra Tips Can Backlog and Cloud BPM Cooperate?
Another article - Kusaka Tsuyoshi A Sample for Developers: Add-on for API Connection with kintone

Archive

 RSS