blob: b11e83592b8eb8c2a1a431d1f497da3c5def2087 [file] [log] [blame]
jaegonkim6a7b5242018-09-12 23:09:42 +09001/*
2 * Copyright 2018-present Open Networking Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.workflow.api;
17
18
19import com.fasterxml.jackson.databind.JsonNode;
20
21/**
22 * Interface for workflow service.
23 */
24public interface WorkflowService {
25
26 /**
27 * Creates workplace.
28 * @param wpDesc workplace description
29 * @throws WorkflowException workflow exception
30 */
31 void createWorkplace(WorkplaceDescription wpDesc) throws WorkflowException;
32
33 /**
34 * Removes workplace.
35 * @param wpDesc workplace description
36 * @throws WorkflowException workflow exception
37 */
38 void removeWorkplace(WorkplaceDescription wpDesc) throws WorkflowException;
39
40 /**
41 * Clears all workplaces.
42 * @throws WorkflowException workflow exception
43 */
44 void clearWorkplace() throws WorkflowException;
45
46 /**
47 * Invokes workflow.
48 * @param wfDesc workflow description
49 * @throws WorkflowException workflow exception
50 */
51 void invokeWorkflow(WorkflowDescription wfDesc) throws WorkflowException;
52
53 /**
54 * Invokes workflow.
55 * @param worklowDescJson workflow description json
56 * @throws WorkflowException workflow exception
57 */
58 void invokeWorkflow(JsonNode worklowDescJson) throws WorkflowException;
59
60 /**
61 * Terminates workflow.
62 * @param wfDesc workflow description
63 * @throws WorkflowException workflow exception
64 */
65 void terminateWorkflow(WorkflowDescription wfDesc) throws WorkflowException;
66}