diff --git a/jbpm/jbpm-flow-builder/src/main/java/org/jbpm/process/workitem/WorkDefinitionImpl.java b/jbpm/jbpm-flow-builder/src/main/java/org/jbpm/process/workitem/WorkDefinitionImpl.java deleted file mode 100755 index 8d79a11aaee..00000000000 --- a/jbpm/jbpm-flow-builder/src/main/java/org/jbpm/process/workitem/WorkDefinitionImpl.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.jbpm.process.workitem; - -import java.util.HashMap; -import java.util.Map; - -public class WorkDefinitionImpl extends org.jbpm.process.core.impl.WorkDefinitionExtensionImpl { - - private static final long serialVersionUID = 5L; - - private String[] dependencies; - private String[] mavenDependencies; - private String description; - private String defaultHandler; - private String category; - private String path; - private String file; - private String documentation; - private String iconEncoded; - private String version; - private String widType; - private Map parameterValues = new HashMap<>(); - - public String getDocumentation() { - return documentation; - } - - public void setDocumentation(String documentation) { - this.documentation = documentation; - } - - public String getFile() { - return file; - } - - public void setFile(String file) { - this.file = file; - } - - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public String getCategory() { - return category; - } - - public void setCategory(String category) { - this.category = category; - } - - public String[] getDependencies() { - return dependencies; - } - - public void setDependencies(String[] dependencies) { - this.dependencies = dependencies; - } - - public String getDefaultHandler() { - return defaultHandler; - } - - public void setDefaultHandler(String defaultHandler) { - this.defaultHandler = defaultHandler; - } - - public String getIconEncoded() { - return iconEncoded; - } - - public void setIconEncoded(String iconEncoded) { - this.iconEncoded = iconEncoded; - } - - public String[] getMavenDependencies() { - return mavenDependencies; - } - - public void setMavenDependencies(String[] mavenDependencies) { - this.mavenDependencies = mavenDependencies; - } - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getWidType() { - return widType; - } - - public void setWidType(String widType) { - this.widType = widType; - } - - public Map getParameterValues() { - return this.parameterValues; - } - - public void setParameterValues(Map parameterValues) { - this.parameterValues.clear(); - if (parameterValues != null) { - this.parameterValues.putAll(parameterValues); - } - - } - - public void addParameterValue(String key, Object value) { - this.parameterValues.put(key, value); - } - - public void removeParameterValue(String key) { - this.parameterValues.remove(key); - } - - public String[] getParameterValueNames() { - return this.parameterValues.keySet().toArray(new String[this.parameterValues.size()]); - } - -} diff --git a/jbpm/jbpm-flow-builder/src/main/java/org/jbpm/process/workitem/WorkItemRepository.java b/jbpm/jbpm-flow-builder/src/main/java/org/jbpm/process/workitem/WorkItemRepository.java deleted file mode 100755 index 166f7d40e30..00000000000 --- a/jbpm/jbpm-flow-builder/src/main/java/org/jbpm/process/workitem/WorkItemRepository.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.jbpm.process.workitem; - -import java.net.URL; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.drools.core.util.ConfFileUtils; -import org.jbpm.process.core.ParameterDefinition; -import org.jbpm.process.core.datatype.DataType; -import org.jbpm.process.core.impl.ParameterDefinitionImpl; -import org.jbpm.util.WidMVELEvaluator; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class WorkItemRepository { - - private WorkItemRepository() { - - } - - private static final Logger logger = LoggerFactory.getLogger(WorkItemRepository.class); - - public static Map getWorkDefinitions(String path) { - return getWorkDefinitions(path, null, null); - } - - public static Map getWorkDefinitions(String path, String[] definitionNames) { - return getWorkDefinitions(path, definitionNames, null); - } - - public static Map getWorkDefinitions(String path, String[] definitionNames, String widName) { - Map workDefinitions = new HashMap<>(); - List> workDefinitionsMaps = getAllWorkDefinitionsMap(path, widName); - for (Map workDefinitionMap : workDefinitionsMaps) { - if (workDefinitionMap != null) { - WorkDefinitionImpl workDefinition = new WorkDefinitionImpl(); - workDefinition.setName((String) workDefinitionMap.get("name")); - workDefinition.setDisplayName((String) workDefinitionMap.get("displayName")); - workDefinition.setIcon((String) workDefinitionMap.get("icon")); - workDefinition.setCustomEditor((String) workDefinitionMap.get("customEditor")); - workDefinition.setCategory((String) workDefinitionMap.get("category")); - workDefinition.setPath((String) workDefinitionMap.get("path")); - workDefinition.setFile((String) workDefinitionMap.get("file")); - workDefinition.setDocumentation((String) workDefinitionMap.get("documentation")); - Set parameters = new HashSet<>(); - Map parameterMap = (Map) workDefinitionMap.get("parameters"); - if (parameterMap != null) { - for (Map.Entry entry : parameterMap.entrySet()) { - parameters.add(new ParameterDefinitionImpl(entry.getKey(), entry.getValue())); - } - } - workDefinition.setParameters(parameters); - - if (workDefinitionMap.get("parameterValues") != null) { - workDefinition.setParameterValues((Map) workDefinitionMap.get("parameterValues")); - } - - Set results = new HashSet<>(); - Map resultMap = (Map) workDefinitionMap.get("results"); - if (resultMap != null) { - for (Map.Entry entry : resultMap.entrySet()) { - results.add(new ParameterDefinitionImpl(entry.getKey(), entry.getValue())); - } - } - workDefinition.setResults(results); - - workDefinition.setDefaultHandler((String) workDefinitionMap.get("defaultHandler")); - - if (workDefinitionMap.get("dependencies") != null) { - workDefinition.setDependencies(((List) workDefinitionMap.get("dependencies")).toArray(new String[0])); - } - - if (workDefinitionMap.get("mavenDependencies") != null) { - workDefinition.setMavenDependencies(((List) workDefinitionMap.get("mavenDependencies")).toArray(new String[0])); - } - - if (workDefinitionMap.get("version") != null) { - workDefinition.setVersion((String) workDefinitionMap.get("version")); - } - - if (workDefinitionMap.get("description") != null) { - workDefinition.setDescription((String) workDefinitionMap.get("description")); - } - - if (workDefinitionMap.get("widType") != null) { - workDefinition.setWidType((String) workDefinitionMap.get("widType")); - } - - workDefinitions.put(workDefinition.getName(), workDefinition); - } - } - - if (definitionNames != null) { - if (definitionNames.length > 0) { - workDefinitions.keySet().retainAll(new HashSet(Arrays.asList(definitionNames))); - } else { - return new HashMap<>(); - } - - } - return workDefinitions; - } - - private static List> getAllWorkDefinitionsMap(String directory, String widName) { - List> workDefinitions = new ArrayList<>(); - if (widName != null) { - workDefinitions.addAll(getWorkDefinitionsMapForSingleDir(directory, widName)); - } else { - for (String s : getDirectories(directory)) { - try { - workDefinitions.addAll(getAllWorkDefinitionsMap(directory + "/" + s, null)); - } catch (Exception t) { - logger.error("Error retrieving work definitions: " + t.getMessage()); - } - workDefinitions.addAll(getWorkDefinitionsMap(directory, s)); - } - } - return workDefinitions; - } - - private static String[] getDirectories(String path) { - String content = null; - try { - content = ConfFileUtils.URLContentsToString( - new URL(path + "/index.conf")); - } catch (Exception e) { - // directory has no index.conf - do nothing - } - if (content == null) { - return new String[0]; - } - return content.split("\n"); - } - - private static List> getWorkDefinitionsMapForSingleDir(String parentPath, String widName) { - String path = parentPath + "/" + widName + ".wid"; - return getWorkDefinitionsForPath(parentPath, path, widName); - } - - private static List> getWorkDefinitionsMap(String parentPath, String file) { - String path = parentPath + "/" + file + "/" + file + ".wid"; - return getWorkDefinitionsForPath(parentPath, path, file); - } - - private static List> getWorkDefinitionsForPath(String parentPath, String path, String file) { - String content = null; - try { - content = ConfFileUtils.URLContentsToString(new URL(path)); - } catch (Exception e) { - // Do nothing - } - if (content == null) { - return new ArrayList(); - } - try { - List> result = (List>) WidMVELEvaluator.eval(content); - for (Map wid : result) { - wid.put("path", parentPath + "/" + file); - wid.put("file", file + ".wid"); - wid.put("widType", "mvel"); - } - return result; - } catch (Exception t) { - throw new RuntimeException("Could not parse work definition as mvel.", t); - } - } - -} diff --git a/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceFive/TestServiceFive.wid b/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceFive/TestServiceFive.wid deleted file mode 100755 index e9bb15266ee..00000000000 --- a/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceFive/TestServiceFive.wid +++ /dev/null @@ -1,28 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -[ - [ - "java.util.HashMap", - { - "displayName":"TestServiceFive", - "name":"TestServiceFive" - } - ] -] \ No newline at end of file diff --git a/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceFour/TestServiceFour.wid b/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceFour/TestServiceFour.wid deleted file mode 100755 index de1d864cf22..00000000000 --- a/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceFour/TestServiceFour.wid +++ /dev/null @@ -1,70 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -[ - [ - "java.util.HashMap", - { - "displayName":"TestServiceFour", - "name":"TestServiceFour", - "description":"Test Service Four", - "parameters":[ - "java.util.HashMap", - { - "a":["org.jbpm.process.core.datatype.impl.type.ListDataType", {}], - "b":["org.jbpm.process.core.datatype.impl.type.StringDataType", {}], - "c":["org.jbpm.process.core.datatype.impl.type.StringDataType", {}] - } - ], - "version":"1.0", - "dependencies":[ - "java.util.ArrayList", [ "depends1", "depends2" ] - ] - } - ], - [ - "java.util.HashMap", - { - "displayName":"TestServiceFour2", - "name":"TestServiceFour2", - "description":"Test Service Four2", - "parameters":[ - "java.util.HashMap", - { - "a":["org.jbpm.process.core.datatype.impl.type.ListDataType", {}], - "b":["org.jbpm.process.core.datatype.impl.type.StringDataType", {}] - } - ], - "results":[ - "java.util.HashMap", - { - "c":["org.jbpm.process.core.datatype.impl.type.ListDataType", {}], - "d":["org.jbpm.process.core.datatype.impl.type.StringDataType", {}] - } - ], - "version":"2.0", - "dependencies":[ - "java.util.ArrayList", [ "depends1", "depends2", "depends3" ] - ], - "mavenDependencies":[ - "java.util.ArrayList", [ "jbpm:jbpm-twitter:1.0", "twitter4j:twitter4j-core:3.0.3" ] - ] - } - ] -] \ No newline at end of file diff --git a/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceOne/TestServiceOne.wid b/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceOne/TestServiceOne.wid deleted file mode 100755 index f74dd347596..00000000000 --- a/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceOne/TestServiceOne.wid +++ /dev/null @@ -1,35 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -[ - [ - "name" : "TestServiceOne", - "description" : "Test Service One", - "parameters" : [ - "param1" : new StringDataType(), - "param2" : new StringDataType(), - "param3" : new StringDataType() - ], - "displayName" : "TestServiceOne", - "icon" : "testserviceone.png", - "category" : "MyTestServices", - "dependencies" : [ - ] - ] -] diff --git a/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceThree/TestServiceThree.wid b/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceThree/TestServiceThree.wid deleted file mode 100755 index 592fc3388eb..00000000000 --- a/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceThree/TestServiceThree.wid +++ /dev/null @@ -1,43 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -[ - [ - "name" : "TestServiceThree", - "description" : "TestServiceThree", - "version" : "1.0", - "parameters" : [ - "param1" : new StringDataType() - ], - "displayName" : "TestServiceThree", - "icon" : "testservicethree.png", - "category" : "Communication", - "customEditor" : "org.drools.eclipse.flow.common.editor.editpart.work.SampleCustomEditor", - "defaultHandler" : "org.jbpm.process.workitem.MyHandler", - "documentation" : "index.html", - "dependencies" : [ - "file:./lib/jbpm-twitter.jar", - "file:./lib/twitter4j-core-3.0.3.jar" - ], - "mavenDependencies" : [ - "jbpm:jbpm-twitter:1.0", - "twitter4j:twitter4j-core:3.0.3" - ] - ] -] diff --git a/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceTwo/TestServiceTwo.wid b/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceTwo/TestServiceTwo.wid deleted file mode 100755 index b2f65212886..00000000000 --- a/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceTwo/TestServiceTwo.wid +++ /dev/null @@ -1,39 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -[ - [ - "name" : "TestServiceTwo", - "description" : "TestServiceTwo", - "parameters" : [ - "param1" : new StringDataType(), - "param2" : new StringDataType() - ], - "results" : [ - "result1" : new StringDataType(), - "result2" : new StringDataType() - ], - "displayName" : "TestServiceTwo", - "icon" : "testservicetwo.png", - "category": "MyTestServices", - "dependencies" : [ - ] - ] -] - diff --git a/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceWithParamValues/TestServiceWithParamValues.wid b/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceWithParamValues/TestServiceWithParamValues.wid deleted file mode 100755 index e0825414dee..00000000000 --- a/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceWithParamValues/TestServiceWithParamValues.wid +++ /dev/null @@ -1,44 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -[ - [ - "name" : "TestServiceWithParamValues", - "description" : "TestServiceWithParamValues", - "parameters" : [ - "param1" : new StringDataType(), - "param2" : new StringDataType(), - "param3" : new StringDataType() - ], - "parameterValues" : [ - "param1" : new EnumDataType("org.jbpm.process.workitem.enums.AnimalsEnum"), - "param3" : new EnumDataType("org.jbpm.process.workitem.enums.CarsEnum") - ], - "results" : [ - "result1" : new StringDataType(), - "result2" : new StringDataType() - ], - "displayName" : "TestServiceWithParamValues", - "icon" : "testservicewithparamvalues.png", - "category": "MyTestServices", - "dependencies" : [ - ] - ] -] - diff --git a/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceWithParamValuesThree/TestServiceWithParamValuesThree.wid b/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceWithParamValuesThree/TestServiceWithParamValuesThree.wid deleted file mode 100755 index 8b00866b0a9..00000000000 --- a/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceWithParamValuesThree/TestServiceWithParamValuesThree.wid +++ /dev/null @@ -1,44 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -[ - [ - "name" : "TestServiceWithParamValuesThree", - "description" : "TestServiceWithParamValuesThree", - "parameters" : [ - "param1" : new StringDataType(), - "param2" : new StringDataType(), - "param3" : new StringDataType() - ], - "parameterValues" : [ - "param1" : new EnumDataType("org.jbpm.process.workitem.enums.AnimalsEnum"), - "param3" : "one,two,three" - ], - "results" : [ - "result1" : new StringDataType(), - "result2" : new StringDataType() - ], - "displayName" : "TestServiceWithParamValuesThree", - "icon" : "testservicewithparamvaluesthree.png", - "category": "MyTestServices", - "dependencies" : [ - ] - ] -] - diff --git a/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceWithParamValuesTwo/TestServiceWithParamValuesTwo.wid b/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceWithParamValuesTwo/TestServiceWithParamValuesTwo.wid deleted file mode 100755 index ff6d6759d4c..00000000000 --- a/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/TestServiceWithParamValuesTwo/TestServiceWithParamValuesTwo.wid +++ /dev/null @@ -1,44 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -[ - [ - "name" : "TestServiceWithParamValuesTwo", - "description" : "TestServiceWithParamValuesTwo", - "parameters" : [ - "param1" : new StringDataType(), - "param2" : new StringDataType(), - "param3" : new StringDataType() - ], - "parameterValues" : [ - "param1" : "one,two,three", - "param3" : "four,five,six" - ], - "results" : [ - "result1" : new StringDataType(), - "result2" : new StringDataType() - ], - "displayName" : "TestServiceWithParamValuesTwo", - "icon" : "testservicewithparamvaluestwo.png", - "category": "MyTestServices", - "dependencies" : [ - ] - ] -] - diff --git a/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/index.conf b/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/index.conf deleted file mode 100755 index e33d8d50a86..00000000000 --- a/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repository/index.conf +++ /dev/null @@ -1,27 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -TestServiceOne -TestServiceTwo -TestServiceThree -TestServiceFour -TestServiceFive -TestServiceWithParamValues -TestServiceWithParamValuesTwo -TestServiceWithParamValuesThree diff --git a/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repositorysingledir/repowid.wid b/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repositorysingledir/repowid.wid deleted file mode 100755 index 1aab68affb2..00000000000 --- a/jbpm/jbpm-flow-builder/src/test/resources/org/jbpm/process/workitem/repositorysingledir/repowid.wid +++ /dev/null @@ -1,44 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -[ - [ - "name" : "RepoSingleDir", - "description" : "RepoSingleDir", - "parameters" : [ - "param1" : new StringDataType(), - "param2" : new StringDataType(), - "param3" : new StringDataType() - ], - "parameterValues" : [ - "param1" : new EnumDataType("org.jbpm.process.workitem.enums.AnimalsEnum"), - "param3" : new EnumDataType("org.jbpm.process.workitem.enums.CarsEnum") - ], - "results" : [ - "result1" : new StringDataType(), - "result2" : new StringDataType() - ], - "displayName" : "RepoSingleDir", - "icon" : "RepoSingleDir.png", - "category": "RepoSingleDir", - "dependencies" : [ - ] - ] -] - diff --git a/jbpm/jbpm-flow/src/main/java/org/jbpm/process/core/WorkDefinitionExtension.java b/jbpm/jbpm-flow/src/main/java/org/jbpm/process/core/WorkDefinitionExtension.java deleted file mode 100755 index 890e06c8df9..00000000000 --- a/jbpm/jbpm-flow/src/main/java/org/jbpm/process/core/WorkDefinitionExtension.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.jbpm.process.core; - -public interface WorkDefinitionExtension { - - String getDisplayName(); - - String getExplanationText(); - - String getIcon(); - - String getCustomEditor(); - -} diff --git a/jbpm/jbpm-flow/src/main/java/org/jbpm/process/core/impl/WorkDefinitionExtensionImpl.java b/jbpm/jbpm-flow/src/main/java/org/jbpm/process/core/impl/WorkDefinitionExtensionImpl.java deleted file mode 100755 index e93f3b4ef53..00000000000 --- a/jbpm/jbpm-flow/src/main/java/org/jbpm/process/core/impl/WorkDefinitionExtensionImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.jbpm.process.core.impl; - -import org.jbpm.process.core.WorkDefinitionExtension; - -public class WorkDefinitionExtensionImpl extends WorkDefinitionImpl implements WorkDefinitionExtension { - - private static final long serialVersionUID = 510l; - - private String displayName; - private String explanationText; - private String icon; - private String editor; - - public String getDisplayName() { - return displayName; - } - - public void setDisplayName(String displayName) { - this.displayName = displayName; - } - - public String getExplanationText() { - return explanationText; - } - - public void setExplanationText(String explanationText) { - this.explanationText = explanationText; - } - - public String getIcon() { - return icon; - } - - public void setIcon(String icon) { - this.icon = icon; - } - - public String getCustomEditor() { - return editor; - } - - public void setCustomEditor(String editor) { - this.editor = editor; - } - -} diff --git a/jbpm/jbpm-flow/src/main/java/org/jbpm/process/core/impl/WorkDefinitionImpl.java b/jbpm/jbpm-flow/src/main/java/org/jbpm/process/core/impl/WorkDefinitionImpl.java deleted file mode 100755 index 8c10aba007c..00000000000 --- a/jbpm/jbpm-flow/src/main/java/org/jbpm/process/core/impl/WorkDefinitionImpl.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.jbpm.process.core.impl; - -import java.io.Serializable; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Map; -import java.util.Set; - -import org.jbpm.process.core.ParameterDefinition; -import org.jbpm.process.core.WorkDefinition; - -public class WorkDefinitionImpl implements WorkDefinition, Serializable { - - private static final long serialVersionUID = 510l; - - private String name; - private Map parameters = new HashMap<>(); - private Map results = new HashMap<>(); - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Set getParameters() { - return new HashSet<>(parameters.values()); - } - - public void setParameters(Set parameters) { - this.parameters.clear(); - Iterator iterator = parameters.iterator(); - while (iterator.hasNext()) { - addParameter(iterator.next()); - } - } - - public void addParameter(ParameterDefinition parameter) { - parameters.put(parameter.getName(), parameter); - } - - public void removeParameter(String name) { - parameters.remove(name); - } - - public String[] getParameterNames() { - return parameters.keySet().toArray(new String[parameters.size()]); - } - - public ParameterDefinition getParameter(String name) { - return parameters.get(name); - } - - public Set getResults() { - return new HashSet<>(results.values()); - } - - public void setResults(Set results) { - this.results.clear(); - Iterator it = results.iterator(); - while (it.hasNext()) { - addResult(it.next()); - } - } - - public void addResult(ParameterDefinition result) { - results.put(result.getName(), result); - } - - public void removeResult(String name) { - results.remove(name); - } - - public String[] getResultNames() { - return results.keySet().toArray(new String[results.size()]); - } - - public ParameterDefinition getResult(String name) { - return results.get(name); - } - - public String toString() { - return name; - } -} diff --git a/jbpm/jbpm-flow/src/main/java/org/jbpm/util/WidMVELEvaluator.java b/jbpm/jbpm-flow/src/main/java/org/jbpm/util/WidMVELEvaluator.java deleted file mode 100755 index dd9cac0bb79..00000000000 --- a/jbpm/jbpm-flow/src/main/java/org/jbpm/util/WidMVELEvaluator.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.jbpm.util; - -import java.util.HashMap; - -import org.drools.util.StringUtils; -import org.mvel2.MVEL; -import org.mvel2.ParserContext; -import org.mvel2.compiler.ExpressionCompiler; - -public class WidMVELEvaluator { - - public static ParserContext WID_PARSER_CONTEXT; - // change this if data types change location - public static final String DATA_TYPE_PACKAGE = "org.jbpm.process.core.datatype.impl.type"; - - static { - WID_PARSER_CONTEXT = new ParserContext(); - WID_PARSER_CONTEXT.addPackageImport(DATA_TYPE_PACKAGE); - WID_PARSER_CONTEXT.setRetainParserState(false); - } - - private WidMVELEvaluator() { - - } - - public static Object eval(final String expression) { - ExpressionCompiler compiler = new ExpressionCompiler(getRevisedExpression(expression), - WID_PARSER_CONTEXT); - - return MVEL.executeExpression(compiler.compile(), new HashMap()); - } - - private static String getRevisedExpression(String expression) { - if (StringUtils.isEmpty(expression)) { - return expression; - } - return expression.replaceAll("import org\\.drools\\.core\\.process\\.core\\.datatype\\.impl\\.type\\.*([^;])*;", - "").replaceAll("import org\\.jbpm\\.process\\.core\\.datatype\\.impl\\.type\\.*([^;])*;", - ""); - } -} diff --git a/jbpm/jbpm-flow/src/test/java/org/jbpm/util/WidMVELEvaluatorSafeTest.java b/jbpm/jbpm-flow/src/test/java/org/jbpm/util/WidMVELEvaluatorSafeTest.java deleted file mode 100755 index 97684faf9ad..00000000000 --- a/jbpm/jbpm-flow/src/test/java/org/jbpm/util/WidMVELEvaluatorSafeTest.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.jbpm.util; - -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; - -import static org.assertj.core.api.Assertions.fail; - -@Disabled("This test causes problems to surefire (see same issue with org.drools.core.util.MVELSafeHelperTest) It works when executed by itself.") -public class WidMVELEvaluatorSafeTest extends WidMVELEvaluatorTest { - - private static TestSecurityManager tsm; - - @BeforeEach - public void before() { - try { - String enginePolicy = getResouce("/policy/engine.policy"); - String kiePolicy = getResouce("/policy/kie.policy"); - System.setProperty("java.security.policy", - enginePolicy); - System.setProperty("kie.security.policy", - kiePolicy); - - tsm = new TestSecurityManager(); - System.setSecurityManager(tsm); - } catch (Exception e) { - fail("unable to initiate security manager : " + e.getMessage()); - } - } - - @AfterEach - public void after() { - System.setSecurityManager(null); - System.setProperty("java.security.policy", - ""); - System.setProperty("kie.security.policy", - ""); - } - - public static class TestSecurityManager extends SecurityManager { - - @Override - public void checkExit(int status) { - super.checkExit(status); - throw new ShouldHavePrevented("The security policy should have prevented the call to System.exit()"); - } - } - - public static class ShouldHavePrevented extends SecurityException { - - public ShouldHavePrevented(String message) { - super(message); - } - } -} diff --git a/jbpm/jbpm-flow/src/test/java/org/jbpm/util/WidMVELEvaluatorTest.java b/jbpm/jbpm-flow/src/test/java/org/jbpm/util/WidMVELEvaluatorTest.java deleted file mode 100755 index e9e17392eb2..00000000000 --- a/jbpm/jbpm-flow/src/test/java/org/jbpm/util/WidMVELEvaluatorTest.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.jbpm.util; - -import java.nio.file.Files; -import java.nio.file.Paths; -import java.util.List; -import java.util.Map; - -import org.jbpm.process.core.datatype.DataType; -import org.jbpm.test.util.AbstractBaseTest; -import org.junit.jupiter.api.Test; -import org.mvel2.CompileException; - -import static org.assertj.core.api.Assertions.assertThat; - -public class WidMVELEvaluatorTest extends AbstractBaseTest { - - public void addLogger() { - logger = org.slf4j.LoggerFactory.getLogger(this.getClass()); - } - - @Test - public void testWidNoImports() throws Exception { - assertCorrectWids(WidMVELEvaluator.eval(getResourceContent("/wids/test-noimports.wid"))); - } - - @Test - public void testWidBackwardsCompatImports() throws Exception { - assertCorrectWids(WidMVELEvaluator.eval(getResourceContent("/wids/test-backwardscompat.wid"))); - } - - @Test - public void testWidBackwardsCompatPkgImports() throws Exception { - assertCorrectWids(WidMVELEvaluator.eval(getResourceContent("/wids/test-backwardscompatpkgimport.wid"))); - } - - @Test - public void testWidBackwardsCompatMixedAndMissingImports() throws Exception { - assertCorrectWids(WidMVELEvaluator.eval(getResourceContent("/wids/test-backwardscompatmixedandmissingimports.wid"))); - } - - @Test - public void testWidCustomDataType() throws Exception { - assertCorrectWids(WidMVELEvaluator.eval(getResourceContent("/wids/test-customdatatype.wid"))); - } - - @Test - public void testWidCustomDataTypeNoImport() { - try { - assertCorrectWids(WidMVELEvaluator.eval(getResourceContent("/wids/test-customdatatypenoimport.wid"))); - } catch (Throwable t) { - assertThat(t).isInstanceOf(CompileException.class); - } - } - - protected String getResourceContent(String path) throws Exception { - return new String(Files.readAllBytes(Paths.get(this.getClass().getResource(path).getPath())), "UTF-8"); - } - - protected String getResouce(String path) throws Exception { - return this.getClass().getResource(path).getFile(); - } - - private void assertCorrectWids(Object wids) { - assertThat(wids).isNotNull(); - List> widsMap = (List>) wids; - assertThat(widsMap).hasSize(2); - - Map firstWid = widsMap.get(0); - assertThat(firstWid).isNotNull().containsEntry("name", "MyFirstWorkItem"); - - Map firstWidParams = (Map) firstWid.get("parameters"); - assertThat(firstWidParams).isNotNull().hasSize(6); - - Map firstWidParamValues = (Map) firstWid.get("parameterValues"); - assertThat(firstWidParamValues).isNotNull().hasSize(1); - - Map secondWid = widsMap.get(1); - assertThat(secondWid).isNotNull().containsEntry("name", "MySecondWorkItem"); - - Map secondWidParams = (Map) secondWid.get("parameters"); - assertThat(secondWidParams).isNotNull().hasSize(6); - - Map secondWidParamValues = (Map) secondWid.get("parameterValues"); - assertThat(secondWidParamValues).isNotNull().hasSize(1); - } -} diff --git a/jbpm/jbpm-flow/src/test/resources/wids/test-backwardscompat.wid b/jbpm/jbpm-flow/src/test/resources/wids/test-backwardscompat.wid deleted file mode 100755 index 4b05562c8cf..00000000000 --- a/jbpm/jbpm-flow/src/test/resources/wids/test-backwardscompat.wid +++ /dev/null @@ -1,65 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -import org.drools.core.process.core.datatype.impl.type.StringDataType; -import org.drools.core.process.core.datatype.impl.type.BooleanDataType; -import org.drools.core.process.core.datatype.impl.type.FloatDataType; -import org.drools.core.process.core.datatype.impl.type.IntegerDataType; -import org.drools.core.process.core.datatype.impl.type.ListDataType; -import org.drools.core.process.core.datatype.impl.type.UndefinedDataType; -import org.drools.core.process.core.datatype.impl.type.EnumDataType; -import org.drools.core.process.core.datatype.impl.type.ObjectDataType; - -[ - [ - "name" : "MyFirstWorkItem", - "parameters" : [ - "One" : new StringDataType(), - "Two" : new BooleanDataType(), - "Three" : new FloatDataType(), - "Four" : new IntegerDataType(), - "Five" : new ListDataType(), - "Six" : new UndefinedDataType() - ], - "parameterValues" : [ - "One" : new EnumDataType("org.jbpm.util.CarsEnum") - ], - "Result" : new ObjectDataType(), - "displayName" : "MyFirstWorkItem", - "icon" : "defaultemailicon.gif" - ], - - [ - "name" : "MySecondWorkItem", - "parameters" : [ - "One" : new StringDataType(), - "Two" : new BooleanDataType(), - "Three" : new FloatDataType(), - "Four" : new IntegerDataType(), - "Five" : new ListDataType(), - "Six" : new UndefinedDataType() - ], - "parameterValues" : [ - "One" : new EnumDataType("org.jbpm.util.CarsEnum") - ], - "Result" : new ObjectDataType(), - "displayName" : "MySecondWorkItem", - "icon" : "defaultemailicon.gif" - ], -] diff --git a/jbpm/jbpm-flow/src/test/resources/wids/test-backwardscompatmixedandmissingimports.wid b/jbpm/jbpm-flow/src/test/resources/wids/test-backwardscompatmixedandmissingimports.wid deleted file mode 100755 index ab972200891..00000000000 --- a/jbpm/jbpm-flow/src/test/resources/wids/test-backwardscompatmixedandmissingimports.wid +++ /dev/null @@ -1,63 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -import org.drools.core.process.core.datatype.impl.type.StringDataType; -import org.drools.core.process.core.datatype.impl.type.BooleanDataType; - -import org.jbpm.process.core.datatype.impl.type.StringDataType; - -import org.jbpm.process.core.datatype.impl.type.SomeDataTypeThatDoesNotExist; - -[ - [ - "name" : "MyFirstWorkItem", - "parameters" : [ - "One" : new StringDataType(), - "Two" : new BooleanDataType(), - "Three" : new FloatDataType(), - "Four" : new IntegerDataType(), - "Five" : new ListDataType(), - "Six" : new UndefinedDataType() - ], - "parameterValues" : [ - "One" : new EnumDataType("org.jbpm.util.CarsEnum") - ], - "Result" : new ObjectDataType(), - "displayName" : "MyFirstWorkItem", - "icon" : "defaultemailicon.gif" - ], - - [ - "name" : "MySecondWorkItem", - "parameters" : [ - "One" : new StringDataType(), - "Two" : new BooleanDataType(), - "Three" : new FloatDataType(), - "Four" : new IntegerDataType(), - "Five" : new ListDataType(), - "Six" : new UndefinedDataType() - ], - "parameterValues" : [ - "One" : new EnumDataType("org.jbpm.util.CarsEnum") - ], - "Result" : new ObjectDataType(), - "displayName" : "MySecondWorkItem", - "icon" : "defaultemailicon.gif" - ], -] \ No newline at end of file diff --git a/jbpm/jbpm-flow/src/test/resources/wids/test-backwardscompatpkgimport.wid b/jbpm/jbpm-flow/src/test/resources/wids/test-backwardscompatpkgimport.wid deleted file mode 100755 index 43c8be36a2a..00000000000 --- a/jbpm/jbpm-flow/src/test/resources/wids/test-backwardscompatpkgimport.wid +++ /dev/null @@ -1,58 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -import org.drools.core.process.core.datatype.impl.type.*; - -[ - [ - "name" : "MyFirstWorkItem", - "parameters" : [ - "One" : new StringDataType(), - "Two" : new BooleanDataType(), - "Three" : new FloatDataType(), - "Four" : new IntegerDataType(), - "Five" : new ListDataType(), - "Six" : new UndefinedDataType() - ], - "parameterValues" : [ - "One" : new EnumDataType("org.jbpm.util.CarsEnum") - ], - "Result" : new ObjectDataType(), - "displayName" : "MyFirstWorkItem", - "icon" : "defaultemailicon.gif" - ], - - [ - "name" : "MySecondWorkItem", - "parameters" : [ - "One" : new StringDataType(), - "Two" : new BooleanDataType(), - "Three" : new FloatDataType(), - "Four" : new IntegerDataType(), - "Five" : new ListDataType(), - "Six" : new UndefinedDataType() - ], - "parameterValues" : [ - "One" : new EnumDataType("org.jbpm.util.CarsEnum") - ], - "Result" : new ObjectDataType(), - "displayName" : "MySecondWorkItem", - "icon" : "defaultemailicon.gif" - ], -] diff --git a/jbpm/jbpm-flow/src/test/resources/wids/test-customdatatype.wid b/jbpm/jbpm-flow/src/test/resources/wids/test-customdatatype.wid deleted file mode 100755 index 734d2d4bad0..00000000000 --- a/jbpm/jbpm-flow/src/test/resources/wids/test-customdatatype.wid +++ /dev/null @@ -1,58 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -import org.jbpm.util.CustomDataType; - -[ - [ - "name" : "MyFirstWorkItem", - "parameters" : [ - "One" : new CustomDataType(), - "Two" : new BooleanDataType(), - "Three" : new FloatDataType(), - "Four" : new IntegerDataType(), - "Five" : new ListDataType(), - "Six" : new UndefinedDataType() - ], - "parameterValues" : [ - "One" : new EnumDataType("org.jbpm.util.CarsEnum") - ], - "Result" : new CustomDataType(), - "displayName" : "MyFirstWorkItem", - "icon" : "defaultemailicon.gif" - ], - - [ - "name" : "MySecondWorkItem", - "parameters" : [ - "One" : new StringDataType(), - "Two" : new BooleanDataType(), - "Three" : new FloatDataType(), - "Four" : new IntegerDataType(), - "Five" : new ListDataType(), - "Six" : new UndefinedDataType() - ], - "parameterValues" : [ - "One" : new EnumDataType("org.jbpm.util.CarsEnum") - ], - "Result" : new ObjectDataType(), - "displayName" : "MySecondWorkItem", - "icon" : "defaultemailicon.gif" - ], -] \ No newline at end of file diff --git a/jbpm/jbpm-flow/src/test/resources/wids/test-customdatatypenoimport.wid b/jbpm/jbpm-flow/src/test/resources/wids/test-customdatatypenoimport.wid deleted file mode 100755 index dc3c7004bfd..00000000000 --- a/jbpm/jbpm-flow/src/test/resources/wids/test-customdatatypenoimport.wid +++ /dev/null @@ -1,56 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -[ - [ - "name" : "MyFirstWorkItem", - "parameters" : [ - "One" : new CustomDataType(), - "Two" : new BooleanDataType(), - "Three" : new FloatDataType(), - "Four" : new IntegerDataType(), - "Five" : new ListDataType(), - "Six" : new UndefinedDataType() - ], - "parameterValues" : [ - "One" : new EnumDataType("org.jbpm.util.CarsEnum") - ], - "Result" : new CustomDataType(), - "displayName" : "MyFirstWorkItem", - "icon" : "defaultemailicon.gif" - ], - - [ - "name" : "MySecondWorkItem", - "parameters" : [ - "One" : new StringDataType(), - "Two" : new BooleanDataType(), - "Three" : new FloatDataType(), - "Four" : new IntegerDataType(), - "Five" : new ListDataType(), - "Six" : new UndefinedDataType() - ], - "parameterValues" : [ - "One" : new EnumDataType("org.jbpm.util.CarsEnum") - ], - "Result" : new ObjectDataType(), - "displayName" : "MySecondWorkItem", - "icon" : "defaultemailicon.gif" - ], -] \ No newline at end of file diff --git a/jbpm/jbpm-flow/src/test/resources/wids/test-noimports.wid b/jbpm/jbpm-flow/src/test/resources/wids/test-noimports.wid deleted file mode 100755 index 79afd0d819c..00000000000 --- a/jbpm/jbpm-flow/src/test/resources/wids/test-noimports.wid +++ /dev/null @@ -1,56 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -[ - [ - "name" : "MyFirstWorkItem", - "parameters" : [ - "One" : new StringDataType(), - "Two" : new BooleanDataType(), - "Three" : new FloatDataType(), - "Four" : new IntegerDataType(), - "Five" : new ListDataType(), - "Six" : new UndefinedDataType() - ], - "parameterValues" : [ - "One" : new EnumDataType("org.jbpm.util.CarsEnum") - ], - "Result" : new ObjectDataType(), - "displayName" : "MyFirstWorkItem", - "icon" : "defaultemailicon.gif" - ], - - [ - "name" : "MySecondWorkItem", - "parameters" : [ - "One" : new StringDataType(), - "Two" : new BooleanDataType(), - "Three" : new FloatDataType(), - "Four" : new IntegerDataType(), - "Five" : new ListDataType(), - "Six" : new UndefinedDataType() - ], - "parameterValues" : [ - "One" : new EnumDataType("org.jbpm.util.CarsEnum") - ], - "Result" : new ObjectDataType(), - "displayName" : "MySecondWorkItem", - "icon" : "defaultemailicon.gif" - ], -] \ No newline at end of file diff --git a/quarkus/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-processes-persistence-common/src/main/resources/CustomTask.wid b/quarkus/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-processes-persistence-common/src/main/resources/CustomTask.wid deleted file mode 100644 index e91c5545afd..00000000000 --- a/quarkus/integration-tests/integration-tests-quarkus-processes-persistence/integration-tests-processes-persistence-common/src/main/resources/CustomTask.wid +++ /dev/null @@ -1,33 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -[ - [ - "name" : "CustomTask", - "displayName" : "Custom Task", - "documentation" : "Basic minimal custom task.", - - "parameters" : [ - "Input" : new StringDataType() - ], - "results" : [ - "Result" : new StringDataType() - ] - ] -] \ No newline at end of file diff --git a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-filesystem/.gitignore b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-filesystem/.gitignore index c2ca403117d..e5746b6cbea 100644 --- a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-filesystem/.gitignore +++ b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-filesystem/.gitignore @@ -18,5 +18,4 @@ ### *.bpmn -*.wid /target/ diff --git a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-filesystem/pom.xml b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-filesystem/pom.xml index 1552f63af67..5e09343afcb 100644 --- a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-filesystem/pom.xml +++ b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-filesystem/pom.xml @@ -95,7 +95,6 @@ ${project.basedir}/src/main/resources **/*.bpmn - **/*.wid diff --git a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-infinispan/.gitignore b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-infinispan/.gitignore index c2ca403117d..e5746b6cbea 100644 --- a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-infinispan/.gitignore +++ b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-infinispan/.gitignore @@ -18,5 +18,4 @@ ### *.bpmn -*.wid /target/ diff --git a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-infinispan/pom.xml b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-infinispan/pom.xml index 81108b3bfbd..5054c7c4156 100644 --- a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-infinispan/pom.xml +++ b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-infinispan/pom.xml @@ -120,7 +120,6 @@ ${project.basedir}/src/main/resources **/*.bpmn - **/*.wid diff --git a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-jdbc/.gitignore b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-jdbc/.gitignore index c2ca403117d..e5746b6cbea 100644 --- a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-jdbc/.gitignore +++ b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-jdbc/.gitignore @@ -18,5 +18,4 @@ ### *.bpmn -*.wid /target/ diff --git a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-jdbc/pom.xml b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-jdbc/pom.xml index f967b626380..790361dfe8f 100644 --- a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-jdbc/pom.xml +++ b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-jdbc/pom.xml @@ -112,7 +112,6 @@ ${project.basedir}/src/main/resources **/*.bpmn - **/*.wid diff --git a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-mongodb/.gitignore b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-mongodb/.gitignore index a180e83ba79..cd27123c4fc 100644 --- a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-mongodb/.gitignore +++ b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-mongodb/.gitignore @@ -18,4 +18,3 @@ ### *.bpmn -*.wid diff --git a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-mongodb/pom.xml b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-mongodb/pom.xml index 07a2eec267d..7f8bb15e3e6 100644 --- a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-mongodb/pom.xml +++ b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-mongodb/pom.xml @@ -104,7 +104,6 @@ ${project.basedir}/src/main/resources **/*.bpmn - **/*.wid diff --git a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-persistence-common/src/main/resources/CustomTask.wid b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-persistence-common/src/main/resources/CustomTask.wid deleted file mode 100644 index e91c5545afd..00000000000 --- a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-persistence-common/src/main/resources/CustomTask.wid +++ /dev/null @@ -1,33 +0,0 @@ -// -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. -// - -[ - [ - "name" : "CustomTask", - "displayName" : "Custom Task", - "documentation" : "Basic minimal custom task.", - - "parameters" : [ - "Input" : new StringDataType() - ], - "results" : [ - "Result" : new StringDataType() - ] - ] -] \ No newline at end of file diff --git a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-postgresql/.gitignore b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-postgresql/.gitignore index a180e83ba79..cd27123c4fc 100644 --- a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-postgresql/.gitignore +++ b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-postgresql/.gitignore @@ -18,4 +18,3 @@ ### *.bpmn -*.wid diff --git a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-postgresql/pom.xml b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-postgresql/pom.xml index 7ed90b3c37e..b454ed8004f 100644 --- a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-postgresql/pom.xml +++ b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/integration-tests-springboot-processes-postgresql/pom.xml @@ -109,7 +109,6 @@ ${project.basedir}/src/main/resources **/*.bpmn - **/*.wid diff --git a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/pom.xml b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/pom.xml index ac43bc7bec8..a44daa7807f 100644 --- a/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/pom.xml +++ b/springboot/integration-tests/integration-tests-springboot-processes-persistence-it/pom.xml @@ -196,7 +196,6 @@ ${project.parent.basedir}/integration-tests-springboot-processes-persistence-common/src/main/resources **/*.bpmn - **/*.wid