# ๐Ÿ”„ Execution Lifecycle in CCP An **Execution** is the process of running a Method with user-provided inputs. It captures the full context, metadata, environment, and outputs of that run. --- ## ๐Ÿ“ฆ What Is an Execution? An Execution is triggered when a user fills the form of a Method and runs it. This generates a full execution bundle that includes: - Inputs and parameters - Method descriptor - Infrastructure and runtime details - Output files - Metadata and provenance --- ## ๐Ÿงฌ Execution Data Structure Each Execution is stored as a self-contained directory: ``` execution/ โ”œโ”€โ”€ auth/ โ”‚ โ””โ”€โ”€ jwt.json # Authentication info โ”œโ”€โ”€ metadata/ โ”‚ โ”œโ”€โ”€ method.json # Method used โ”‚ โ”œโ”€โ”€ request.json # Inputs and parameters โ”‚ โ”œโ”€โ”€ infrastructure.json # Runtime platform โ”‚ โ”œโ”€โ”€ instance.json # Runtime container details โ”‚ โ”œโ”€โ”€ jobStatus.json # Lifecycle status โ”‚ โ””โ”€โ”€ provo.xml # Provenance metadata โ”œโ”€โ”€ outputs/ โ”‚ โ”œโ”€โ”€ output_file1.txt # User-generated files โ”‚ โ”œโ”€โ”€ stdout.log / stderr.log # Execution logs โ””โ”€โ”€ output.zip # Archived version of all outputs ``` --- ## ๐Ÿงช How Executions Are Stored Executions live in the user's **Workbench** (temporary area) and can be: - **Re-executed** (same inputs) - **Downloaded** (as `.zip`) - **Shared** (via D4Science Workspace) - **Archived** to workspace under `CCP/executions` They can also be **imported back** into the Workbench using: - A previously exported `.zip` - A Workspace reference --- ## ๐Ÿšฅ Execution Status An Execution moves through these states: 1. **CREATED** โ†’ initial request accepted 2. **SCHEDULED** โ†’ assigned to an infrastructure 3. **STARTED** โ†’ deploy-script begins 4. **EXECUTING** โ†’ main script running 5. **COMPLETED / FAILED** โ†’ terminal state Each state is logged in `metadata_jobStatus.json`. --- ## ๐Ÿ“œ Metadata and Logging CCP produces rich metadata for traceability: - `provo.xml` for reproducibility and FAIR principles - `stdout` / `stderr` logs - JSON summaries of method, infra, inputs, and runtime You can inspect them from the execution view or download them. --- ## ๐Ÿ”— Related Pages - ๐Ÿงฑ [Platform architecture](/05_advanced_topics/01_architecture/01_platform_architecture.md) - ๐Ÿณ [Runtime execution model](/05_advanced_topics/01_architecture/02_runtime_architecture.md) - ๐Ÿ“ฆ [Execution metadata](/03_execution/04_metadata_files.md) - ๐Ÿงฌ [Provenance metadata (provo.xml)](/03_execution/05_metadata_provo.md)