--- alias: user-guide-business-workflow-task-container-create-pre render_macros: false description: "Run a workflow for each pending Container before creation" --- # Before Container Creation Run a workflow for each **Container** before it is created. ![Screenshot of a Business Workflow using If and Throw error to reject an invalid Container capacity before creation.](images/business-workflow-task-container-create-pre.png) ## Event Context The event provides the typed `Container` field to child tasks. Select it in the value editor directly; no entity-type condition or type conversion is required. ??? example "Before Container Creation" Use the pending `Container` in **If** to check its `CapacityPerPosition` against your configured carrier rule. Use **Throw error** to reject an invalid capacity before the container is created. ## Behavior The handler runs once for each **Container** in the native creation collection, in collection order. An empty collection runs no handlers. Singular and generic creation services that reach this collection boundary use the same event. The `Container` may not yet have a persisted ID. Leave `Persist` false when updating its properties so the enclosing creation operation saves the pending values. The handler runs inside the creation transaction. An error can cancel or roll back creation. An After event runs after the operation boundary, while the transaction is still active.