const idx = {
	'CREATED': 1,
	'PENDING': 2,
	'RUNNING': 3,
	'ABORTING': 4,
	'ABORTED': 5,
	'COMPLETED': 6,
	'FAILED': 7,
	'EXPIRED ': 8,
	'PARTIAL': 9
  };

  return typeof idx[value] === 'undefined' ? 0 : idx[value];