Skip to content

Conversation

@yilmaztayfun
Copy link
Contributor

@yilmaztayfun yilmaztayfun commented Jan 13, 2026

Replaced all 'mockoon:3001' URLs with 'localhost:3001' in task and workflow files for local development compatibility. Added new GetInstances task, mapping, and test to support instance filtering and pagination in the task-test workflow. Updated error boundary workflow transitions and initial transition mapping to include the new test.

Summary by Sourcery

Add a GetInstances test flow and align instance data mappings while updating local development endpoints.

New Features:

  • Introduce a GetInstances task mapping and corresponding test task to retrieve workflow instances with filtering and pagination from the task-test subflow.
  • Wire the new GetInstances test into the task-test workflow and initial transition mapping so it runs as part of the existing test suite.
  • Add a diagram metadata file for the scheduled-payments workflow.

Enhancements:

  • Adjust the GetInstanceData mapping to read nested response data and extensions consistently with the GetInstances response shape.

Build:

  • Update task JSON definitions, workflow HTTP files, and the Postman collection to use localhost:3001 instead of mockoon:3001 for local Mockoon endpoints.

Tests:

  • Add a dedicated test configuration for the new GetInstances task under the task-test workflow.
  • Extend error-boundary and task-test workflow definitions to cover the new GetInstances test path and related transitions.

Summary by CodeRabbit

Release Notes

  • Chores

    • Updated API endpoint configurations to use localhost instead of remote mock service host across workflow tasks and test files.
  • New Features

    • Added new "Get Instances" test scenario with pagination, filtering, and sorting capabilities.
    • Enhanced test workflows with additional steps for SubFlow operations and data retrieval sequences.
  • Tests

    • Added new test configuration files for instance data handling and workflow execution.
    • Expanded Postman test collection with new request sequences and SubFlow validation scenarios.

✏️ Tip: You can customize this high-level summary in your review settings.

Replaced all 'mockoon:3001' URLs with 'localhost:3001' in task and workflow files for local development compatibility. Added new GetInstances task, mapping, and test to support instance filtering and pagination in the task-test workflow. Updated error boundary workflow transitions and initial transition mapping to include the new test.
@yilmaztayfun yilmaztayfun self-assigned this Jan 13, 2026
@sourcery-ai
Copy link

sourcery-ai bot commented Jan 13, 2026

Reviewer's Guide

Switches all Mockoon-based HTTP URLs to localhost for local development and introduces a new GetInstances test task and mapping to validate instance filtering/pagination, wiring it into the task-test and error-boundary workflows and adjusting GetInstanceData response handling accordingly.

File-Level Changes

Change Details Files
Normalize HTTP endpoint configuration from 'mockoon:3001' to 'localhost:3001' across tasks, workflows, and Postman collection for local development.
  • Update all affected task JSON definitions to point HTTP actions at localhost:3001 instead of mockoon:3001.
  • Update workflow .http files to use localhost:3001 for runtime/test calls.
  • Update Postman collection example runtime URLs to localhost:3001 for consistency.
core/Tasks/account-opening/create-bank-account.json
core/Tasks/account-opening/validate-account-policies.json
core/Tasks/contract/get-contract-documents.json
core/Tasks/contract/render-document.json
core/Tasks/oauth/check-device-registration.json
core/Tasks/oauth/check-push-response.json
core/Tasks/oauth/generate-tokens.json
core/Tasks/oauth/register-device.json
core/Tasks/oauth/send-otp-notification.json
core/Tasks/oauth/send-push-notification.json
core/Tasks/oauth/validate-authorization-code.json
core/Tasks/oauth/validate-client.json
core/Tasks/oauth/validate-user-credentials.json
core/Tasks/oauth/verify-otp-code.json
core/Tasks/payments/activate-payment-schedule.json
core/Tasks/payments/archive-payment-record.json
core/Tasks/payments/deactivate-payment-schedule.json
core/Tasks/payments/get-user-info.json
core/Tasks/payments/increment-retry-counter.json
core/Tasks/payments/process-payment.json
core/Tasks/payments/save-payment-configuration.json
core/Tasks/payments/send-payment-notification-sms.json
core/Tasks/payments/send-payment-push-notification.json
core/Tasks/task-test/error-boundary-abort-task.json
core/Tasks/task-test/error-boundary-ignore-task.json
core/Tasks/task-test/error-boundary-retry-task.json
core/Tasks/task-test/error-boundary-success-task.json
core/Tasks/task-test/error-boundary-timeout-task.json
core/Tasks/task-test/test-http-items.json
core/Tasks/task-test/test-http-task.json
core/Workflows/account-opening/account-opening-workflow.http
core/Workflows/contract/contract-approval-workflow.http
core/Workflows/oauth/oauth-authentication-workflow.http
core/Workflows/payments/scheduled-payments-workflow.http
core/Workflows/task-test/task-test-workflow.http
postman/vNext Example Runtime.postman_collection.json
Introduce a new GetInstances test task and mapping to query workflow instances with JSON-based attribute filters, pagination, and success/failure handling, and wire it into the task-test workflow.
  • Add GetInstancesMapping script that configures a GetInstancesTask for the task-test-subflow, building a JSON filter from parent instanceId and testId and applying pagination.
  • Implement OutputHandler in GetInstancesMapping to summarize returned instances, tag results, and distinguish success, failure, and exception outcomes.
  • Add a new test-get-instances task definition and enable the corresponding flag in InitialTransitionMapping so the task-test workflow exercises the new GetInstances test path.
  • Update task-test workflow JSON to include the new GetInstances test task and transitions as needed (including error-boundary-related wiring if present).
  • Add payments scheduled-payments-workflow.diagram meta file (likely generated diagram for the workflow).
core/Workflows/task-test/src/GetInstancesMapping.csx
core/Tasks/task-test/test-get-instances.json
core/Workflows/task-test/src/InitialTransitionMapping.csx
core/Workflows/task-test/task-test-workflow.json
core/Workflows/payments/.meta/scheduled-payments-workflow.diagram.json
core/Workflows/task-test/error-boundary-test-workflow.json
Adjust existing GetInstanceData mapping to align with new response structure and minor context usage cleanup.
  • Remove redundant null-conditional operator when converting context.Instance.Id to string.
  • Change retrievedData and extensionData extraction to read from response.data.data and response.data.extensions instead of top-level properties to match the new HTTP response payload shape.
core/Workflows/task-test/src/GetInstanceDataMapping.csx

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai
Copy link

coderabbitai bot commented Jan 13, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The PR updates API endpoint references across task configurations and workflows from a Mockoon service host to localhost, introduces a new GetInstances task with mapping logic for workflow instance retrieval, adjusts error handling transitions, modifies data extraction paths, and expands Postman collection test scenarios with additional workflow steps.

Changes

Cohort / File(s) Change Summary
Account Opening Configuration
core/Tasks/account-opening/create-bank-account.json, core/Tasks/account-opening/validate-account-policies.json
Hostname change from mockoon:3001 to localhost:3001 in API endpoints
Contract Task Configuration
core/Tasks/contract/get-contract-documents.json, core/Tasks/contract/render-document.json
Hostname change from mockoon:3001 to localhost:3001 in API endpoints
OAuth Task Configuration
core/Tasks/oauth/check-device-registration.json, core/Tasks/oauth/check-push-response.json, core/Tasks/oauth/generate-tokens.json, core/Tasks/oauth/register-device.json, core/Tasks/oauth/send-otp-notification.json, core/Tasks/oauth/send-push-notification.json, core/Tasks/oauth/validate-authorization-code.json, core/Tasks/oauth/validate-client.json, core/Tasks/oauth/validate-user-credentials.json, core/Tasks/oauth/verify-otp-code.json
Hostname change from mockoon:3001 to localhost:3001 in API endpoints
Payment Task Configuration
core/Tasks/payments/activate-payment-schedule.json, core/Tasks/payments/archive-payment-record.json, core/Tasks/payments/deactivate-payment-schedule.json, core/Tasks/payments/get-user-info.json, core/Tasks/payments/increment-retry-counter.json, core/Tasks/payments/process-payment.json, core/Tasks/payments/save-payment-configuration.json, core/Tasks/payments/send-payment-notification-sms.json, core/Tasks/payments/send-payment-push-notification.json
Hostname change from mockoon:3001 to localhost:3001 in API endpoints
Task-Test Task Configuration
core/Tasks/task-test/error-boundary-abort-task.json, core/Tasks/task-test/error-boundary-ignore-task.json, core/Tasks/task-test/error-boundary-retry-task.json, core/Tasks/task-test/error-boundary-success-task.json, core/Tasks/task-test/error-boundary-timeout-task.json, core/Tasks/task-test/test-http-items.json, core/Tasks/task-test/test-http-task.json
Hostname change from mockoon:3001 to localhost:3001 in API endpoints
New Task Test Configuration
core/Tasks/task-test/test-get-instances.json
New test task configuration for instance data retrieval with pagination, sorting, and subflow parameters
Workflow HTTP Test Files
core/Workflows/account-opening/account-opening-workflow.http, core/Workflows/contract/contract-approval-workflow.http, core/Workflows/oauth/oauth-authentication-workflow.http, core/Workflows/payments/scheduled-payments-workflow.http, core/Workflows/task-test/task-test-workflow.http
Hostname change from mockoon:3001 to localhost:3001 in HTTP test prerequisites and endpoint references
Workflow Diagram Metadata
core/Workflows/payments/.meta/scheduled-payments-workflow.diagram.json
New diagram metadata file with node position mappings for workflow visualization
Data Mapping Scripts
core/Workflows/task-test/src/GetInstanceDataMapping.csx
Modified data extraction paths and output structure: context.Instance?.Id?.ToString()context.Instance?.Id.ToString(), response paths adjusted for nested data access
New Instance Mapping Script
core/Workflows/task-test/src/GetInstancesMapping.csx
New 220-line C# mapping implementing GetInstancesTask with InputHandler (filter configuration, pagination) and OutputHandler (response processing, error handling) for workflow instance retrieval
Initial Transition Configuration
core/Workflows/task-test/src/InitialTransitionMapping.csx
Added testGetInstances = true flag to test configuration in OutputHandler response
Error Boundary Workflow
core/Workflows/task-test/error-boundary-test-workflow.json
Removed inline notificationConfig blocks from error paths; updated transition targets: rollback-staterecovery-to-rollback, manual-reviewreview-approved
Task-Test Workflow Definition
core/Workflows/task-test/task-test-workflow.json
Added new test-get-instances-state (stateType 2) with GetInstancesMapping; inserted new transition get-instances-completed; reordered transitions to route through new state; registered GetInstances task in workflow
Postman Collection
postman/vNext Example Runtime.postman_collection.json
Added new request blocks for instance retrieval (Get Instances, Get Instances Copy) and expanded SubFlow test sequences (Step 3: Complete Sub Flow, Step 4: Proceed After Subflow); updated numeric IDs and nested payload structures; expanded header and query parameter configurations

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • PR #10: Directly related; applies opposite host changes (localhost → mockoon or vice versa) to the same task and workflow configuration files
  • PR #7: Related at code level; modifies the same task configuration and workflow files with host reference updates and task/mapping adjustments
  • PR #11: Related through task-test workflow and mapping code modifications; affects GetInstanceDataMapping and introduces similar task-test workflow extensions

Poem

🐰 From mockoon's distant digital burrow,
We hop to localhost—no need to borrow!
GetInstances now fetches with grace,
While workflows dance in their new place,
One workflow, one service, all in the same space! ✨


📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0b7c31d and 4cb9e32.

📒 Files selected for processing (43)
  • core/Tasks/account-opening/create-bank-account.json
  • core/Tasks/account-opening/validate-account-policies.json
  • core/Tasks/contract/get-contract-documents.json
  • core/Tasks/contract/render-document.json
  • core/Tasks/oauth/check-device-registration.json
  • core/Tasks/oauth/check-push-response.json
  • core/Tasks/oauth/generate-tokens.json
  • core/Tasks/oauth/register-device.json
  • core/Tasks/oauth/send-otp-notification.json
  • core/Tasks/oauth/send-push-notification.json
  • core/Tasks/oauth/validate-authorization-code.json
  • core/Tasks/oauth/validate-client.json
  • core/Tasks/oauth/validate-user-credentials.json
  • core/Tasks/oauth/verify-otp-code.json
  • core/Tasks/payments/activate-payment-schedule.json
  • core/Tasks/payments/archive-payment-record.json
  • core/Tasks/payments/deactivate-payment-schedule.json
  • core/Tasks/payments/get-user-info.json
  • core/Tasks/payments/increment-retry-counter.json
  • core/Tasks/payments/process-payment.json
  • core/Tasks/payments/save-payment-configuration.json
  • core/Tasks/payments/send-payment-notification-sms.json
  • core/Tasks/payments/send-payment-push-notification.json
  • core/Tasks/task-test/error-boundary-abort-task.json
  • core/Tasks/task-test/error-boundary-ignore-task.json
  • core/Tasks/task-test/error-boundary-retry-task.json
  • core/Tasks/task-test/error-boundary-success-task.json
  • core/Tasks/task-test/error-boundary-timeout-task.json
  • core/Tasks/task-test/test-get-instances.json
  • core/Tasks/task-test/test-http-items.json
  • core/Tasks/task-test/test-http-task.json
  • core/Workflows/account-opening/account-opening-workflow.http
  • core/Workflows/contract/contract-approval-workflow.http
  • core/Workflows/oauth/oauth-authentication-workflow.http
  • core/Workflows/payments/.meta/scheduled-payments-workflow.diagram.json
  • core/Workflows/payments/scheduled-payments-workflow.http
  • core/Workflows/task-test/error-boundary-test-workflow.json
  • core/Workflows/task-test/src/GetInstanceDataMapping.csx
  • core/Workflows/task-test/src/GetInstancesMapping.csx
  • core/Workflows/task-test/src/InitialTransitionMapping.csx
  • core/Workflows/task-test/task-test-workflow.http
  • core/Workflows/task-test/task-test-workflow.json
  • postman/vNext Example Runtime.postman_collection.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@yilmaztayfun yilmaztayfun merged commit c7222de into master Jan 13, 2026
1 of 4 checks passed
@gemini-code-assist
Copy link

Summary of Changes

Hello @yilmaztayfun, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly improves the local development experience by standardizing Mockoon endpoint URLs to localhost. It also introduces a powerful new feature allowing developers to retrieve workflow instances with flexible filtering and pagination options, which is integrated and tested within the existing workflow test suite. These changes streamline development setup and expand the capabilities for querying workflow data.

Highlights

  • Mockoon URL Standardization: All references to 'mockoon:3001' URLs across various task and workflow files have been updated to 'localhost:3001' to enhance local development compatibility.
  • New GetInstances Task: A new 'GetInstances' task, along with its corresponding C# mapping script, has been introduced. This task enables fetching workflow instances with advanced filtering, pagination, and sorting capabilities.
  • Workflow Test Enhancements: The 'task-test' workflow has been updated to incorporate the new 'GetInstances' test. This includes modifications to the initial transition mapping to enable the test and adjustments to the error boundary workflow transitions.
  • Error Boundary Workflow Refinements: The error boundary test workflow transitions have been updated, removing specific notification configurations and standardizing transition keys for better flow control.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location> `core/Workflows/task-test/src/GetInstancesMapping.csx:144-150` </location>
<code_context>
+            if (isSuccess)
+            {
+                // Extract response data
+                var instances = response?.data.items;
+
+                LogInformation("GetInstances Test - Successfully retrieved {0} instance(s)", 
+                    args: new object?[] { instances?.Count ?? 0 });
+
+                // Build instance summary for verification
+                var instanceSummary = new List<object>();
+                if (instances != null)
+                {
+                    foreach (var instance in instances)
+                    {
+                        instanceSummary.Add(new
+                        {
+                            testId = instance?.data?.testId
</code_context>

<issue_to_address>
**suggestion (testing):** Expand the instance summary to validate that filters are actually applied (e.g., parentInstanceId, startedBy) rather than only echoing testId.

Right now `instanceSummary` only includes `testId`, so the test can’t verify that the `parentInstanceId` and `startedBy` filters were respected. Please include at least `parentInstanceId`, `testId`, and `startedBy` (and optionally the instance ID) so the `getInstancesResult` output can be checked against all requested filters, not just that instances were returned.

```suggestion
                    foreach (var instance in instances)
                    {
                        instanceSummary.Add(new
                        {
                            instanceId = instance?.id,
                            parentInstanceId = instance?.parentInstanceId,
                            startedBy = instance?.startedBy,
                            testId = instance?.data?.testId
                        });
                    }
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively standardizes the Mockoon URLs to localhost for better local development consistency and introduces a new GetInstances task to test instance filtering and pagination. The workflow and test updates are well-integrated. I've identified a potential null reference exception in the new C# mapping script that should be addressed. Additionally, I have a couple of suggestions to improve the naming of new requests in the Postman collection for better clarity.

Comment on lines +53 to +54
var parentInstanceId = context.Instance.Id.ToString();
var testId = context.Instance.Data?.testId.ToString();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

There's a potential NullReferenceException in this block. context.Instance could be null, which would cause context.Instance.Id to throw an exception. Similarly, context.Instance.Data?.testId could evaluate to null, and calling .ToString() on it would also fail. To prevent this, you should use the null-conditional operator ?. for safer property access, which is a common practice in other mapping files in this repository.

            var parentInstanceId = context.Instance?.Id.ToString();
            var testId = context.Instance?.Data?.testId?.ToString();

"response": []
},
{
"name": "Get Instances Copy",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The name of this new Postman request, "Get Instances Copy", is misleading because the request targets the .../functions/schema endpoint, which retrieves a workflow schema, not instances. For better clarity and maintainability of the collection, I recommend renaming it to something more descriptive, such as "Get Workflow Schema".

"response": []
},
{
"name": "Get Instances",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This request is named "Get Instances", but the URL .../functions/data appears to fetch data for a single instance rather than a list of instances. This could be confusing for others using the collection. Renaming it to "Get Instance Data" would more accurately describe its purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants