Using AI to Process Tasks in Questetra BPM Suite (Leveraging MCP)

Connecting an AI (such as Claude or ChatGPT) to Questetra BPM Suite via MCP allows you to process Tasks directly from the AI chat. Furthermore, by using Claude’s “Scheduled tasks” feature, you can have Claude launch at set times to process Tasks in the connected User’s My Tasks. In this article, using expense reimbursement approval as an example, we explain the procedure for writing decision criteria in a prompt and having Claude process Tasks.

In this article, when we simply write “Task”, it refers to a Task in Questetra BPM Suite. Claude’s feature is written as “Scheduled tasks”. “Connected User” refers to the Questetra BPM Suite User who authorized the integration upon connecting via MCP.

For connection setup procedures, refer to our sister article Connecting Claude and Questetra BPM Suite via MCP. This article assumes that you have already connected and granted the scope “All operations on MCP tools (view and edit)” (mcp:any) on the authorization screen during connection.

Because scheduled execution relies on Claude’s Scheduled tasks feature, this article covers only Claude. Scheduled tasks are available on paid Claude plans. On Team and Enterprise plans, organization administrators may have disabled this feature.

Case data analysis is covered in Using AI to Analyze Case Data in Questetra BPM Suite (MCP Guide), and App creation is covered in Ensuring AI Retains the Design Intent of Questetra BPM Suite Apps (Using MCP).

How to Choose Tasks to Delegate to AI

Start by choosing Tasks that will not cause problems if delegated to an AI. Tasks that meet the following criteria are suitable:

  • The verification criteria can be written out completely in text (e.g., “Amount is 30,000 yen or less,” “Date of Use is not set to a date later than today”)
  • Even if the AI leaves ambiguous items unprocessed, a human can simply process them later
  • Items that the AI must not process (such as requests submitted by the connected User themselves) can be excluded via conditions

Tasks awaiting acceptance (offered Tasks) cannot be processed via MCP. Select a Step where the process assignee is assigned to a single specific User and no acceptance operation is required.

In this article, we use the “Manager Approval” Step of an Expense Reimbursement App as an example. By setting an upper limit on the amount, you can clearly define the boundary between what the AI approves and what a human reviews.

Tools Used

The AI searches for Tasks in the connected User’s My Tasks, reads the Case’s business data to evaluate them, and completes only those slated for approval. It primarily uses the following tools:

ToolRoleWhen Used in Task Processing
get_current_userRetrieve information about the connected UserChecking the User ID to distinguish Cases submitted by the connected User themselves
list_workitemsSearch TasksFinding Tasks in the connected User’s My Tasks
get_process_instanceRetrieve Case information and business dataReading the applicant, amount, date of use, etc., to make decisions
get_workitem_formRetrieve the input form of a TaskChecking the button to press upon completion (such as [Approve]) and required input fields for Tasks decided for approval
execute_workitemProcess a TaskCompleting Tasks decided for approval

get_workitem_form and execute_workitem require the scope “All operations on MCP tools (view and edit)”. If you have not permitted this scope, reconnect following the steps in the connection guide (Connecting Claude and Questetra BPM Suite via MCP) and grant permission on the authorization screen.

A complete list of tools and the required scopes for each tool are summarized in R4190: MCP Tool List.

How to Write the Prompt

Scheduled tasks run unattended in the background. Therefore, write everything into the prompt: which Tasks to target, what to verify before completing, what to leave unprocessed, and what to report at the end.

Among the Tasks in my Questetra BPM Suite My Tasks, please process those in the "Manager Approval" Step of the "Expense Reimbursement" App.
- Leave any Tasks where I am the applicant (Case Start User) unprocessed.
- If the amount is 30,000 yen or less and there are no unnatural details (such as the Date of Use being later than today, or the expense item not matching the description), complete the Task by selecting "Approve".
- Leave any Tasks exceeding 30,000 yen or containing unnatural details unprocessed. Also leave any Tasks where you are unsure of the judgment unprocessed.
- Finally, provide a list reporting the Tasks you approved and the Tasks you left unprocessed (along with the reasons for leaving them unprocessed).

Customize the App name, Step name, Data Item names (Amount, Date of Use, etc.), and completion button name ([Approve]) to match your App.

Exclude Cases submitted by the connected User themselves using a condition. The AI identifies these by comparing the Case Start User’s User ID against the connected User’s User ID.

Write the completion instructions according to how your App is built. In Apps where multiple arrows branch out from a Step and the process assignee selects which path to take, buttons like [Approve] are displayed. The sample prompt shows how to write instructions for this setup. If only a single arrow exits the Step, the only button is [Complete “Manager Approval”], and approval or rejection is specified via a Select-type Data Item or similar field. In that case, specify what to enter before completing in the prompt, such as “Select ‘Approved’ and complete the Task.”

Additionally, if the connected User belongs to multiple Organizations, they must select their “Role/Position when processing this Task” upon completion. If a specific Organization position is predetermined for processing, include an instruction in the prompt such as “Process this Task under the position of ‘XX Department’.”

Explicitly instruct the AI to leave ambiguous items unprocessed. In the example, this instruction is included as a separate sentence in addition to items failing the approval criteria.

Have the AI include reasons for leaving Tasks unprocessed in its final report. Because a human will handle the remaining Tasks, documented reasons immediately clarify what needs to be checked.

The following two additions are supplements not included in the sample prompt above:

In Apps that place an [AI Agent] in a preceding Step, specify how to handle its output in the prompt as well. For example, suppose an [AI Agent] inspects the receipt description entered by the applicant and writes any concerns into a String-type Data Item. Claude will read this Data Item too when judging whether anything looks unnatural. If the [AI Agent] flags descriptions written simply as “Goods/Supplies” every time even though your company permits it, add the following instruction to your prompt:

- Even if the [AI Agent] in the preceding Step points out that "the description is written as 'Goods/Supplies'",
do not treat that alone as an unnatural detail.

If you do not want remaining Tasks to be marked as “In Progress”, add an instruction not to retrieve their forms. Retrieving a Task’s form changes that Task’s status to “In Progress”. If the AI retrieves forms before deciding whether to approve, even Tasks left unprocessed will become “In Progress”. To avoid this, add “Do not retrieve forms for Tasks that are left unprocessed” to your prompt.

Procedure for Automated Processing

Proceed through the following three steps:

  1. Test in chat
  2. Register as a Scheduled task
  3. Verify the execution results

1. Test in Chat

Before registering, run the same prompt in chat to verify the AI’s judgment. Initially, have it output only its judgment results without actually completing any Tasks. Append the following sentence to the end of your prompt and run it:

However, for this run, do not complete any Tasks and do not retrieve any forms; simply list the Tasks to be approved and the Tasks to be left unprocessed,
along with your reasons.

Preventing form retrieval avoids turning Tasks into “In Progress” merely from testing. Because this sentence will be removed in Step 2, if you want remaining Tasks to avoid becoming “In Progress” after registration as well, include “Do not retrieve forms for Tasks that are left unprocessed” in the main body of your prompt as described in the previous section.

In the resulting list, verify that no Tasks that should not be approved are mixed into the approval list. If they are not categorized as intended, refine the conditions in your prompt and test again.

2. Register as a Scheduled Task

Once there are no issues with the judgment results, register the prompt as a Scheduled task. In the same Claude chat from Step 1, make the following request:

Please take the previous prompt, remove the final sentence starting with “However, for this run”, and register it as a Scheduled task that runs every 2 hours from 9:00 AM to 5:00 PM on weekdays.

Claude will propose a summary containing the name, execution frequency, and instructions (prompt). Before saving, verify the following points regarding the proposed details and settings:

Point to CheckDetails
Instructions (Prompt)Whether the final sentence from the Step 1 test prompt has been removed
Execution FrequencyWhether it matches the pace at which Tasks accumulate
ConnectorsWhether the Questetra BPM Suite connector (integration) added in the connection guide is included. Because all connected connectors are included by default, remove any unused ones
Action ApprovalWhether settings are configured not to prompt for confirmation before every action. Because no one is present to respond during scheduled runs, prompting for confirmation will stall the Scheduled task

Because Scheduled tasks run in the cloud, they execute on schedule even if your computer is closed. For details on where to find the Scheduled tasks screen and its configuration items, refer to Claude’s help article “Schedule recurring tasks in Claude Cowork“.

3. Verify the Execution Results

Immediately after registration, you can run the task on demand from the Scheduled tasks screen to verify it without waiting for the next scheduled time.

A new conversation is created for each execution, where Claude’s report is saved. On the Scheduled tasks screen, open that conversation from the execution history and review the list of approved Tasks and remaining Tasks. Read the reasons for any remaining Tasks and process them manually.

Precautions

  • Tasks processed by the AI are treated as having been processed by the connected User. That User’s name is recorded in the Case’s processing history.
  • Completed Tasks cannot be undone. Therefore, whenever expanding approval conditions, return to Step 1 to test in chat before updating the Scheduled task’s prompt.
  • Neither Claude nor [AI Agent] can read the contents of attached files. Claude can only see the names and sizes of attached files. [AI Agent] can handle String-type, Numeric-type, Date-type, Datetime-type, and Select-type Data Items. Write your decision criteria based on values stored in Data Items.
  • The AI can only view and operate within the privilege scope of the connected User.

Any Task whose decision criteria can be written out completely in text can be delegated to an AI using this same procedure. Start with narrow conditions, read the reports, and gradually expand the scope of delegation.