1

I'm designing an application which accepts a command, processes it and produces a result. Application will maintain the status of the input command as 'new', 'processing' and 'completed' as it transition through the execution flow.

When the command processing is completed, status will be updated to 'completed'. But it can be completed with either success, failed or ignored. I need a proper name for these substates - success, failure or ignore. Should I call them 'result' or 'statusCode'.

new, inprogress and completed -> status
success, failed and ignored -> ????
  • resultStatus, something with result or completionDegree (allowing negatives like failed / ignored. – Joop Eggen Apr 8 at 9:24
  • 3
    They indicate the status of the completed state, so call then completedState or completedStatus or the like. Do not ever, please, use statusCode. That just tells me I have a code that represents a status, ie it's almost completely devoid of information. – David Arno Apr 8 at 9:26
  • This makes sense. I'll go with completedState – Muthu Apr 8 at 11:42
1

These sound like two different things, so I would be inclined to keep them as separate as possible, probably command.progress and command.completionState then you can have four completionState values, incomplete, success, failed, ignored which would cover all the possible outcomes or indicate no outcome was yet available and whatever progress statuses you need to introduce as time goes on - there's a very good chance those will proliferate as system complexity increases.

  • Great. This was helpful – Muthu Apr 8 at 11:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.