Solid::Process uses Solid::Output (which is aliased from Solid::Result) to represent the outcome of a process. This allows for explicit handling of both successful and unsuccessful executions.
Solid::Success: Indicates a successful operation. It can carry a type (a symbol) and a payload (a hash).- Example:
Success(:user_created, user: user)inUser::Creationsignifies that a user was successfully created and provides theuserobject in the payload.
- Example:
Solid::Failure: Indicates a failed operation. Similar toSuccess, it can carry a type and a payload, often containing error messages or invalid objects.- Example:
Failure(:invalid_input, input: input)inUser::Registrationwhen input validations fail.
- Example: