@Test public void testMachineRunWithEvent() { PersistMachine p = persistMachineFactory.newInstance(getBizId(), "process_with_event_p"); p.run(); System.out.println(p.getCurrentStateName()); Assert.assertEquals("some info", p.getContext("_info")); PersistMachine p2 = persistMachineFactory.newInstance(p.getBizId()); p2.addContext("goto", 2); p2.addContext("_i", 3); p2.addContext("info", "some info1"); p2.run(); Assert.assertEquals("wok", p2.getContext("_errorInfo")); System.out.println(p2.getContext()); Assert.assertEquals(6, p2.getContext("_a")); }
public String getBizId() { return bizId; }
PersistMachine extends Machine { public String getBizId() { return bizId; } }
PersistMachine extends Machine { public String getBizId() { return bizId; } protected  PersistMachine(String bizId, String processName, int processVersion, ProcessDO processDO,
                             ProcessDOMapper processDOMapper
        , StateDOMapper stateDOMapper
        , PersistHelper persistHelper
        , TaskDOMapper taskDOMapper
        , ParticipationDOMapper participationDOMapper
        , JobDOMapper jobDOMapper); }
PersistMachine extends Machine { public String getBizId() { return bizId; } protected  PersistMachine(String bizId, String processName, int processVersion, ProcessDO processDO,
                             ProcessDOMapper processDOMapper
        , StateDOMapper stateDOMapper
        , PersistHelper persistHelper
        , TaskDOMapper taskDOMapper
        , ParticipationDOMapper participationDOMapper
        , JobDOMapper jobDOMapper); List<StateDOWithBLOBs> getStateDOList(); String getStatePathString(); void rollback(); String getBizId(); boolean isExist(); boolean isCompleted(); ProcessDO getProcessDO(); }
PersistMachine extends Machine { public String getBizId() { return bizId; } protected  PersistMachine(String bizId, String processName, int processVersion, ProcessDO processDO,
                             ProcessDOMapper processDOMapper
        , StateDOMapper stateDOMapper
        , PersistHelper persistHelper
        , TaskDOMapper taskDOMapper
        , ParticipationDOMapper participationDOMapper
        , JobDOMapper jobDOMapper); List<StateDOWithBLOBs> getStateDOList(); String getStatePathString(); void rollback(); String getBizId(); boolean isExist(); boolean isCompleted(); ProcessDO getProcessDO();  }