Happy New Year. Thank you for your continuous support this year.
Though I have written blog posts about various system collaboration cases so far, I would like to write more of those kind of posts this year as well. Besides, I personally like the topic of system collaboration because it can extend options in many aspects.
In this post, I would like to introduce a method for accessing Questetra’s API from a Process of Questetra.
2: General classification of Questetra’s API
3: Details of settings
4: Closing
1: Use Case
As far as I know, the method has been used in the following cases.
- After approving User addition/deletion request, add/delete User account of Questetra
(API for addition/deletion of User) - To launch the Task regularly in order to have a User changing the password periodically, and reflects the changes to the User settings of Questetra.
(API for addition/deletion of User) - Change the organization setting of Questera so that the User who makes approval is changed for a certain period, and reverse the change after reaching a deadline.
(API for adding/deleting user’s affiliation to organizations) - In Approval flows such as approval request or decision-making request, obtaining the organizational information of the applicant User and determine an approver on the request by the computing, and then allocate the Task of approval to the User.
(API for querying settings of User, Organization, and Role) - Calculate the progress rate and delay degree by referring to the data of certain Process that performs process management and write the result to the original Process
(API for acquiring processing result of business flow, API for executing task)
2: General classification of Questetra’s API
If I roughly classify the APIs of Questetra, it will be;
- A. To prepare by placing as parts in the Workflow: Operates such tasks as sending and receiving of HTTP request etc. in the midstream of a Process.
- B. Other than the above: Operate such tasks as referring and updating of Users or data in a Process that Questetra retains.
The latter is a REST API, which can be accessed with «Throwing Message Intermediate Event (HTTP)» which is one of the former.
However, even if from the same Questetra environment, it requires authentication when accessing the API of the latter.
Besides, in the case of processing (computing, etc.) based on the obtained data, you need to parse the response with «Script Task».
M225: Auto Sending of HTTP Request with Business data Inserted
* For «Script Task», please refer to the following.
M230: Auto Executing Complicated Data Processing (ECMAScript)
3: Details of settings
In this post, I will describe the case of accessing an API for adding Users through Basic authentication. (A simple case that does not require response parsing with «Script Task».)
- «System Settings» > «API Clients» in the left menu > in the «API access with Basic Authentication», enable accessing by checking on “Enable API access with Basic Authentication” in advance.
- You can confirm your API password at «Account Settings» > «Password» in the left menu > «API Password».
The following is a sample Workflow App in which automatically adding a User account after a request has been approved by superiors.
The specification of User addition API is described in the API reference.
https://xxxxx.questetra.net/Swagger/index
The link to the manual of online demo environment is as follows. There, you can see the manual immediately even if you do not have a Questetra environment.
System Settings API
Workflow API
The following is a screenshot for of the corresponding API.
* In order to perform user addition processing, authentication by a User with System Administrator Authorization is needed. As it might be naturally expected.
Based on the API specification above, the settings of «Throwing Message Intermediate Event (HTTP)» can be configured as follows.
- Specify the URL of API you want to access as Access URL (If in the same Questetra environment, you can also specify a variable such as «${var[applicationRoot]}»).
- Specify Username and Password for Basic Authentication (Use API Password mentioned above).
- Specify the parameters of the API to be accessed as sending parameters.
You can download an archive of the sample Workflow App above from here (zip expands qar file).
* Change the part of Basic Authentication according to your environment.
Workflow App: Add User via API
For the other API specification of Questetra, please refer to the following.
- Related article: List of Questetra’s APIs
- Related manual: M317: Controlling OAuth2 Authorization Access and Basic Authentication Access from External
- Related manual: M318: Controlling Accesses from External to [Message Catch Event API]
4: Closing
By utilizing this method, we believe it is possible to automate and streamline more advanced business will flow.
If you have any questions about this post, please feel free to contact us via Contact form.
Apply for Starter Plan (Free) Here
By signing up for your Free account of your own Questetra, you will be able to use all the Questetra features including what I mentioned above.
Go to the Web form for Sign-Up