Flowable BPMN Supply Disruption L3
Domain: business_finance — Enterprise Analytics & Planning

Summary: Redesign LY Juice Company's monthly production scheduling workflow in Flowable BPMN 6.5.0 so it handles a compound supply-shortage and quality-hold disruption, then produce the required BPMN and compliance output bundle.

Task prompt:
You are working on a Linux VM with Docker, Docker Compose, Python, and curl available.

## Your Task
Redesign LY Juice Company's monthly production scheduling workflow in Flowable BPMN 6.5.0 so it handles a compound disruption:
1. raw material supply shortage
2. incoming material quality hold

## Visible Inputs
- task prompt: `base/input/task_prompt.md`
- starter project directory: `base/input/starter_project`
- original BPMN: `base/input/starter_project/original_process.bpmn20.xml`
- disruption scenario: `base/input/starter_project/disruption_scenario_L3.md`
- business rules: `base/input/starter_project/business_rules_L3.md`
- org hierarchy: `base/input/starter_project/org_hierarchy.json`
- scenario suite: `base/input/starter_project/test_scenarios_L3.json`
- Flowable stack file: `base/input/starter_project/docker-compose.yml`
- original diagram: `base/input/starter_project/original_process_diagram.png`

## What You Must Do
1. Read the staged task materials.
2. Modify the BPMN while preserving original anchored elements and IDs.
3. Use process definition key `monthlyProductionScheduling_modified_L3`.
4. Start or reuse the local Flowable stack from `base/input/starter_project/docker-compose.yml`.
5. Deploy the modified BPMN and validate it against the provided scenario definitions.
6. Write the final output bundle to `base/output`.

## Runtime Notes
- Flowable REST API base URL: `http://localhost:8080/flowable-task/process-api/`
- Flowable credentials: `admin` / `test`
- For runtime testing, set role assignee variables to `admin`
- Ensure every gateway or assignee expression only references variables that already exist
- Keep new manual work as `userTask` nodes and use `${...}` expressions for gateway logic

## Required Output Files
- `base/output/modified_process.bpmn20.xml`
- `base/output/structural_changes.json`
- `base/output/business_rules_compliance.json`
- `base/output/test_results.json`

You may also write `base/output/deployment_log.json` as an optional diagnostic artifact.

## Important Constraints
- Do not modify the staged input files
- Keep successful exception handling paths rejoined into the main workflow
- Send last-resort escalation to a separate terminal end event
- Keep the JSON artifacts consistent with the BPMN you actually produced


The agent must:
Read the staged task prompt and starter-project materials under `input/`.
Modify the BPMN to handle the L3 compound disruption while preserving anchored original elements and IDs.
Use process definition key `monthlyProductionScheduling_modified_L3` and keep new manual work as `userTask` nodes.
Start or reuse the local Flowable stack from the staged Docker Compose file and validate the design against the provided scenario definitions.
Write the BPMN plus the required structural, compliance, and scenario-result JSON files under `output/`.

Software: Flowable 6.5.0
Docker
Docker Compose
Python

Input files:
name: task_prompt.md
format: Markdown
description: Agent-visible task contract derived from the raw submission prompt with evaluator-only sections removed
name: starter_project/original_process.bpmn20.xml
format: BPMN XML
description: Original Flowable process definition to modify
name: starter_project/disruption_scenario_L3.md
format: Markdown
description: Compound disruption narrative and workflow constraints
name: starter_project/business_rules_L3.md
format: Markdown
description: Authoritative L3 business rules
name: starter_project/org_hierarchy.json
format: JSON
description: Role hierarchy and approval-authority constraints
name: starter_project/test_scenarios_L3.json
format: JSON
description: Scenario definitions the agent should use when validating the redesigned BPMN
name: starter_project/docker-compose.yml
format: YAML
description: Flowable 6.5.0 runtime stack definition
name: starter_project/original_process_diagram.png
format: PNG
description: Visual diagram of the original workflow