Many of Questetra’s customers* use Cloud Storage together with our service.
* Those who use “Questetra BPM Suite”, the cloud-based service for managing Business Process in the Organization (Visualization of progress and achievements)
We often get inquiries from the above mentioned customers regarding the method for saving files automatically to Questetra BPM Suite and Cloud storage. In this article, we introduce how integrate Questetra BPM Suite with “Box”, a representative of cloud storage enterprise services.
As we mentioned in the last article “Cannot Collaborate with Box … for Now“, you were not able to collaborate between Questetra BPM Suite and Box. However, now you are able to do it!
To make the this collaboration procedure easier to understand, we illustrate it with the simple Business Process of saving a file from Questetra BPM Suite to Box.
I will describe a way to do the collaboration settings of Questetra BPM Suite with Box in the following steps:
1. Defining a Process Model in Questetra BPM Suite
2. Setting OAuth 2.0
3. Confirming operation
After accessing Box’s API from Questetra BPM Suite, transfer the registered file on Questetra BPM Suite to Box and save it. To access the API, it is required to use the OAuth 2.0 authentication system. First, you must set it up.
By the way, this article is targeted to people who have the following skills:
- Those who understand how to develop Box applications
- Those who understand how to use [Throwing Message Intermediate Event (HTTP)] / [Script Task] in Questetra BPM Suite
== Defining a Process Model in Questetra BPM Suite ==
Here we modify Questetra BPM Suite’s configuration settings. The definition of the process model can be downloaded from here.
In the process model diagram, the only human task included is the “File Registration”. Files that have been registered in this task will be sent to Box by “File Sending” of [Throwing Message Intermediate Event (HTTP)] which is placed one step before the end of the process.
The information on APIs for accessing Box is published as Box Content API in the page below.
API specifications for saving files to Box are described as follows:
- Access URL
- HTTP Method
- Request Parameter
- filename: file
- parent_id: 0 (We decided to save to the root here)
Based on this rule, configure the setting of “File Sending” Throwing Message Intermediate Event (HTTP).
== Setting OAuth 2.0 ==
To access a URL for API of Box from Throwing Message Intermediate Event of Questetra BPM Suite, OAuth 2.0 authentication is needed.
This setting includes the following steps:
- Confirm Callback URL in Questetra BPM Suite
- Confirm client_id and client_secret on Box Application
- Set OAuth 2.0 and acquire token in Questetra BPM Suite
== Confirming Callback URL in Questetra BPM Suite ==
It is an operation on Questetra BPM Suite’s side.
Confirm Callback URL in the property screen of Throwing Message Intermediate Event. In the [Security] tab screen, select [Connect with the OAuth 2.0] and click [Set up OAuth 2.0 from here]. Then the screen of OAuth 2.0 setting is displayed on another window. Write down the Callback URL written in this page.
=== Confirming client_id and client_secret on Box Application ===
It is an operation on Box’s side.
Write down the client_id and client_secret which are displayed in the setting screen of a Box Application*. At the same time, register the Callback URL of Questetra BPM Suite you wrote down on the previous step into redirect_url in the same screen.
* You need to create a Box Application beforehand
== Setting OAuth 2.0 and acquire token in Questetra BPM Suite ==
It is an operation on Questetra BPM Suite’s side.
Open the property of “File Sending” Throwing Message Intermediate Event (HTTP) of a pre-existing process model.
In the [Security] tab screen, select [Connect with the OAuth 2.0] and click [Set up OAuth 2.0 from here]. Then the OAuth 2.0 setting screen is displayed in another window. Click [Add] at the top of the screen, the OAuth 2.0 details setting screen will be displayed. Set up each item as follows:
- Authorization Code Request URL
- Access Token Request URL
- Consumer Key
- client_id of Box Application
- Consumer Secret
- client_secret of Box Application
When you finish, save and acquire the token.
== Confirming Operation ==
Once you finish the settings as described in the previous sections, release the defined Process Model. After that, start the process from New Start and process the only Human Task [File Registration].
== Many kinds of Box APIs ==
That’s it for the description of how to configure a system for saving files which have been registered in Questetra BPM Suite to Box automatically.
Box provides many kinds of APIs, and their specifications are published.
- API for saving files to Box (We used this time)
- API for referring to or operating files saved in Box
- API for referring to information of folders created in Box
Among others (There are many other APIs!)
By using the Box API from Questetra BPM Suite, you can perform operations such as saving and modifying to Box, or get the information stored in Box.
That’s it for today!
- Box Content API
- How to use Questetra BPM Suite Throwing Message Intermediate Event (HTTP)
- [File Registration] Process Model (Japanese)
|Prev article - 50. Questetra Tips||How to Substitute Approval Step with "Email Reply"|
|Next article - 50. Questetra Tips||To Control Inputting for Multiple Select Type Data Items (Radio Button / Checkbox ed.)|
|Another article - YAHAGI Hajime||While seeing the Flow, they started discussing ways to Improve it!|