Collaboration between Cloud-based Workflow and Cloud Storage (Box ed.)

An auto-generated PDF file or an approved document file will be saved automatically to the cloud storage, Box.

 

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.

 

questetra-box

 

Description Flow

 

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:

 

== 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.

 

file-register-process-diagram

File Registration Process Diagram

Task processing screen of “File Registration”

Task processing screen of “File Registration”

Data items

Data Items

 

The information on APIs for accessing Box is published as Box Content API in the page below.

https://box-content.readme.io/reference

 

API specifications for saving files to Box are described as follows:

Access URL
https://upload.box.com/api/2.0/files/content
HTTP Method
POST
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).

 

“File sending” Throwing Message Intermediate Event (HTTP)

“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:

  1. Confirm Callback URL in Questetra BPM Suite
  2. Confirm client_id and client_secret on Box Application
  3. 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.

 

Confirmation screen of Callback URL

Confirmation screen of Callback URL

 

=== 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

 

Box の設定画面

Box’s settings screen

== 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:

Name
(Arbitary)
Authorization Code Request URL
https://app.box.com/api/oauth2/authorize
Access Token Request URL
https://app.box.com/api/oauth2/token
Scope
(Empty)
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].
file-regster-task-execution

 

file-register-on-box

 

== 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!


参考

About YAHAGI Hajime

幸せを生み出すITを追求するクエステトラの一味です。 国産の BPM ソフト Questetra BPM Suite で日本・世界を幸せにしたい。
View all posts by YAHAGI Hajime

Recommendations
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!

Archive

 RSS