mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
[release] v2.0.0
This commit is contained in:
parent
7fb2e4b0df
commit
04e79d8b22
@ -28,11 +28,14 @@ public class TestWorkflow {
|
|||||||
|
|
||||||
// DAG 图
|
// DAG 图
|
||||||
List<PEWorkflowDAG.Node> nodes = Lists.newLinkedList();
|
List<PEWorkflowDAG.Node> nodes = Lists.newLinkedList();
|
||||||
|
List<PEWorkflowDAG.Edge> edges = Lists.newLinkedList();
|
||||||
|
|
||||||
nodes.add(new PEWorkflowDAG.Node(1L, "node-1"));
|
nodes.add(new PEWorkflowDAG.Node(1L, "node-1"));
|
||||||
nodes.add(new PEWorkflowDAG.Node(2L, "node-2"));
|
nodes.add(new PEWorkflowDAG.Node(2L, "node-2"));
|
||||||
|
|
||||||
PEWorkflowDAG peWorkflowDAG = new PEWorkflowDAG(nodes, null);
|
edges.add(new PEWorkflowDAG.Edge(1L, 2L));
|
||||||
|
|
||||||
|
PEWorkflowDAG peWorkflowDAG = new PEWorkflowDAG(nodes, edges);
|
||||||
SaveWorkflowRequest req = new SaveWorkflowRequest();
|
SaveWorkflowRequest req = new SaveWorkflowRequest();
|
||||||
|
|
||||||
req.setWfName("workflow-by-client");
|
req.setWfName("workflow-by-client");
|
||||||
@ -46,36 +49,36 @@ public class TestWorkflow {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDisableWorkflow() throws Exception {
|
public void testDisableWorkflow() throws Exception {
|
||||||
System.out.println(ohMyClient.disableWorkflow(1L));
|
System.out.println(ohMyClient.disableWorkflow(4L));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testDeleteWorkflow() throws Exception {
|
public void testDeleteWorkflow() throws Exception {
|
||||||
System.out.println(ohMyClient.deleteWorkflow(1L));
|
System.out.println(ohMyClient.deleteWorkflow(4L));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testEnableWorkflow() throws Exception {
|
public void testEnableWorkflow() throws Exception {
|
||||||
System.out.println(ohMyClient.enableWorkflow(1L));
|
System.out.println(ohMyClient.enableWorkflow(4L));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testFetchWorkflowInfo() throws Exception {
|
public void testFetchWorkflowInfo() throws Exception {
|
||||||
System.out.println(ohMyClient.fetchWorkflow(1L));
|
System.out.println(ohMyClient.fetchWorkflow(5L));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testRunWorkflow() throws Exception {
|
public void testRunWorkflow() throws Exception {
|
||||||
System.out.println(ohMyClient.runWorkflow(1L));
|
System.out.println(ohMyClient.runWorkflow(5L));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testStopWorkflowInstance() throws Exception {
|
public void testStopWorkflowInstance() throws Exception {
|
||||||
System.out.println(ohMyClient.stopWorkflowInstance(148003202598436928L));
|
System.out.println(ohMyClient.stopWorkflowInstance(149962433421639744L));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testFetchWfInstanceInfo() throws Exception {
|
public void testFetchWfInstanceInfo() throws Exception {
|
||||||
System.out.println(ohMyClient.fetchWorkflowInstanceInfo(148003202598436928L));
|
System.out.println(ohMyClient.fetchWorkflowInstanceInfo(149962433421639744L));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user