/** * Extracts the job identifier from the tracking info's job task identifier. * * @return the extracted job identifier */ public String getJobId() throws InvalidJobTaskIdException { Objects.requireNonNull(getJobTaskId()); Pattern pattern = Pattern.compile(jobTaskIdPattern); Matcher matcher = pattern.matcher(getJobTaskId()); if (matcher.find()) { return matcher.group(1); } throw new InvalidJobTaskIdException(MessageFormat.format("Failed to extract the job identifier from the job task ID {0}", getJobTaskId())); }