const idx = {
	'InProgress': 1,
	'Queued': 2,
	'Completed': 3,
	'CompletedWithWarnings': 4,
	'Failed': 5,
	'Cancelled': 6,
	'Expired': 7
  };

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