2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2018 Ericsson. All rights reserved.
4 * Modifications Copyright (C) 2019 Nordix Foundation.
5 * Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
6 * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
20 * SPDX-License-Identifier: Apache-2.0
21 * ============LICENSE_END=========================================================
24 package org.onap.policy.apex.services.onappf.parameters.dummyclasses;
27 import java.util.Properties;
28 import org.onap.policy.apex.context.ContextException;
29 import org.onap.policy.apex.core.engine.event.EnEvent;
30 import org.onap.policy.apex.core.engine.executor.TaskExecutor;
31 import org.onap.policy.apex.core.engine.executor.exception.StateMachineException;
32 import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
33 import org.onap.policy.apex.model.policymodel.concepts.AxTask;
36 * Dummy task executor for testing.
38 public class DummyTaskExecutor extends TaskExecutor {
41 public void prepare() throws StateMachineException {
46 public Map<String, Map<String, Object>> execute(final long executionId, final Properties executorProperties,
47 final Map<String, Object> newIncomingFields) throws StateMachineException, ContextException {
49 AxArtifactKey event0Key = new AxArtifactKey("Event0:0.0.1");
50 return Map.of(event0Key.getName(), new EnEvent(event0Key));
54 public AxTask getSubject() {
55 AxArtifactKey taskKey = new AxArtifactKey("FirstTask:0.0.1");
56 return new AxTask(taskKey);
60 public void cleanUp() throws StateMachineException {