ExecutableJobInfo { private void parseFlowId() { this.jobPath = new ArrayList<>(); final String[] flowPairs = this.flowId.split(","); for (final String flowPair : flowPairs) { final String[] pairSplit = flowPair.split(":", 2); final Pair<String, String> pair; if (pairSplit.length == 1) { pair = new Pair<>(pairSplit[0], pairSplit[0]); } else { pair = new Pair<>(pairSplit[0], pairSplit[1]); } this.jobPath.add(pair); } this.immediateFlowId = this.jobPath.get(this.jobPath.size() - 1).getSecond(); } ExecutableJobInfo(final int execId, final int projectId, final int version,
      final String flowId, final String jobId, final long startTime, final long endTime,
      final Status status,
      final int attempt); int getProjectId(); int getExecId(); int getVersion(); String getFlowId(); String getImmediateFlowId(); String getJobId(); long getStartTime(); long getEndTime(); Status getStatus(); int getAttempt(); List<Pair<String, String>> getParsedFlowId(); String getJobIdPath(); Map<String, Object> toObject();  }
@Test public void testParseFlowId() throws Exception { Assert.assertEquals("Unexpected immediate flow id", "root", parseImmediateFlowId("root")); Assert.assertEquals("Unexpected immediate flow id", "root:emb_1", parseImmediateFlowId("root,emb_1:root:emb_1")); Assert.assertEquals("Unexpected immediate flow id", "root:emb_1:emb_2:emb_3", parseImmediateFlowId( "root,emb_1:root:emb_1,emb_2:root:emb_1:emb_2,emb_3:root:emb_1:emb_2:emb_3")); }