Cloning objects
Cloning an object creates a new object with all the same attribute values as the original — except its Workflow attribute values, which need special handling so the clone starts in a valid state.
| Original object's situation | Result for the clone |
|---|---|
| Already in an initial workflow state | Clone uses the same state. |
| Not in an initial state; the workflow attribute isn't required | Clone's workflow attribute is left empty. |
| Not in an initial state; the workflow attribute is required, and there's exactly one initial state | Clone defaults to that initial state. |
| Not in an initial state; the workflow attribute is required, and there are multiple initial states | The clone fails with a validation error — there's no picker for this case. |
Verified against code
AttributeValuesCloneHelper.getWorkflowValues (ObjectCloneService.kt) implements the first three
rows exactly. For the fourth, it throws a validation exception rather than prompting for a choice —
the original migrated text's "you're asked to pick one" doesn't match current behavior.