Questetra provides the [Debug Run] function to check the operation of the Workflow App under development before release. Until now, it was only possible to debug the entire application from a [Start Event] and debug only a specific automatic step. From version 15.0 (April 2023), debugging an App triggered by receiving an HTTP request is now possible.
This article describes how to start the debugging process by sending and receiving HTTP requests. Please refer to the following article for how to manually debug from [Start Event] or debug only a specific automatic step.
Table Of Contents
Debug Auto-connected Apps[Message Start Event (HTTP/Webhook)] starts a new Process when an HTTP request is received at the specified URL. When the received HTTP request contains the “Questetra-Debug: true” header, the new Process will be started as a Debug Process. The Debug Process runs according to the [Developing] version of the App and allows you to debug the entire App.
In a Debug Process initiated by receiving an HTTP request, the last App edit User (*) is assigned as the Operator of all Human Tasks. Also, unlike debugging from the Start Event, options to debug such as the [Profile] or [Allocate all tasks to me] are not provided.
(*) [Last Edit User / Release User]
Information such as the receiving URL, key, and Reception Parameters required for HTTP communication can be confirmed by opening the details screen from [URL, Reception Parameters] on the property screen of [Message Start Event (HTTP)].
- [Reception Parameters] are based on the [Editing Permission] setting of Message [Start Event (HTTP)]
- When a Data Item is set to [Editable] by editing the [Developing] version, a [Reception Parameter] is opened with the field name of that item as the parameter name
- Until the newly created App is [Release]d, the edited content will be reflected in the [Reception Parameters] list on the [URL, Reception Parameters] detail screen
- Once the App is [Release]d, the content displayed in [URL, Reception Parameters] will be based on the [Latest] version
- Even if [Reception Parameter] is added in the [Developing] version, it will not be displayed on the [URL, Reception Parameter] detail screen
- Displayed or not, the Debug Process performs data passing in accordance with the settings in the “Developing” version
- To pass a value to a Data item that is not displayed, specify the field name of the target Data Item as the send parameter name
How to start debug
Debug start with Curl command
Add “Questetra-Debug: true” header when sending an HTTP request to [Message Start Event (HTTP)]
HTTP request example:
$ curl https://example.questetra.net/System/Event/MessageStart/123/0/start \ -H "Questetra-Debug:true" \ -d "key=XYZXYZ" \ -d "q_string1=foo"
Debug start using Workflow App
Debug start in Debug Process
In Questetra you can send HTTP requests using the following automatic steps. When an HTTP request is sent from Debug Process, the “Questetra-Debug: true” header is automatically added to the request. Therefore, a Process started by receiving HTTP is a Debug Process.
- Settings related to data transfer in [Service Task (Start Child Process)] are based on the [Latest] version of the receiving child app
- Data items added in the [Developing] version of the child app are not reflected in the data passing settings
- After you [Release] the child app, change the data passing setting of [Service Task (Start Child Process)] and then run Debug
- Linking and Operating Multiple Workflow Apps
Debug start in normal Process
Add “Questetra-Debug: true” as a [Custom HTTP Header] to the outgoing request. This will start a Debug Process on the receiver side even if the HTTP request was sent from a normal Process (not a Debug Process).
- Throwing Message Intermediate Event (HTTP)
- On the [Headers] tab of the config screen, add the “Questetra-Debug” header and specify “true” as its value.
- Script Task
- Add the “Questetra-Debug” header using header(String name, String value) method of HttpRequestWrapper
- Reference: R2300: Java Classes available in Script Task
In the Debug Process, the “Questetra-Debug: true” header is automatically added when sending an HTTP request, but if the “Questetra-Debug” header is added to [Custom HTTP Headers], the value of [Custom HTTP Headers] takes precedence. In other words, if you add “Questetra-Debug” to [Custom HTTP Headers] and specify “false” as its value, a normal Process will start in accordance with the [Latest] version even if the HTTP request is sent from a Debug Process.
(If it is sent to an application that has never been [Released], the [Latest] version does not exist, so a new Process will not start and the automatic Step on the sending side will end with [Error End].)