buildbot failure in on ofbizTrunkFrameworkPlugins

2021-09-10 Thread buildbot
The Buildbot has detected a new failure on builder ofbizTrunkFrameworkPlugins 
while building ofbiz-framework. Full details are available at:
https://ci.apache.org/builders/ofbizTrunkFrameworkPlugins/builds/2206

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: asf946_ubuntu

Build Reason: downstream
Build Source Stamp: [branch trunk] 7d40e0703a61ff146bf3b5a54a7044a6ba980508
Blamelist: Sebastian Berg 

BUILD FAILED: failed testIntegration

Sincerely,
 -The Buildbot





[ofbiz-framework] branch trunk updated: Improved: Convert RoutingServices.xml mini-lang to groovy (OFBIZ-11855)

2021-09-10 Thread nmalin
This is an automated email from the ASF dual-hosted git repository.

nmalin pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 7d40e07  Improved: Convert RoutingServices.xml mini-lang to groovy 
(OFBIZ-11855)
7d40e07 is described below

commit 7d40e0703a61ff146bf3b5a54a7044a6ba980508
Author: Sebastian Berg 
AuthorDate: Fri Jul 2 10:31:34 2021 +0200

Improved: Convert RoutingServices.xml mini-lang to groovy (OFBIZ-11855)
---
 .../groovyScripts/routing/RoutingServices.groovy   | 128 
 .../minilang/routing/RoutingServices.xml   | 131 -
 .../manufacturing/servicedef/services_routing.xml  |   8 +-
 3 files changed, 132 insertions(+), 135 deletions(-)

diff --git 
a/applications/manufacturing/groovyScripts/routing/RoutingServices.groovy 
b/applications/manufacturing/groovyScripts/routing/RoutingServices.groovy
new file mode 100644
index 000..46b63f2
--- /dev/null
+++ b/applications/manufacturing/groovyScripts/routing/RoutingServices.groovy
@@ -0,0 +1,128 @@
+/*
+ * 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 java.sql.Timestamp
+
+import org.apache.ofbiz.base.util.UtilDateTime
+import org.apache.ofbiz.entity.GenericValue
+
+/**
+ * "Get the product's routing and routing tasks
+ * @return
+ */
+def getProductRouting() {
+Map result = success()
+
+// If applicableDate has been passed use the value with all filter-by-date 
calls
+Timestamp filterDate = parameters.applicableDate ?: 
UtilDateTime.nowTimestamp()
+
+GenericValue routingGS = null
+GenericValue routing = null
+List tasks = null
+Map lookupRouting = [productId: parameters.productId, 
workEffortGoodStdTypeId: "ROU_PROD_TEMPLATE"]
+
+// If a workEffortId has been passed, use it to look up the desired routing
+if (parameters.workEffortId) {
+lookupRouting.workEffortId = parameters.workEffortId
+routingGS = from("WorkEffortGoodStandard")
+.where(lookupRouting)
+.filterByDate(filterDate)
+.queryFirst()
+
+// If the routing is not associated with our product and it's a 
variant, then check to see if it's virtual product has the routing
+if (!routingGS) {
+GenericValue virtualProductAssoc = from("ProductAssoc")
+.where(productIdTo: parameters.productId,
+productAssocTypeId: "PRODUCT_VARIANT")
+.filterByDate(filterDate)
+.queryFirst()
+if (virtualProductAssoc) {
+lookupRouting.productId = virtualProductAssoc.productId
+// Consider the validity against a date passed as (optional) 
parameter
+routingGS = from("WorkEffortGoodStandard")
+.where(lookupRouting)
+.filterByDate(filterDate)
+.queryFirst()
+}
+}
+}
+
+// No workEffortId has been passed, so retrieve the first routing found 
for this product
+else {
+// Consider the validity against a date passed as (optional) parameter
+// TODO: we should consider the quantity to select the best routing
+routingGS = from("WorkEffortGoodStandard")
+.where(lookupRouting)
+.filterByDate(filterDate)
+.queryFirst()
+
+// If there are no routings associated with our product and it's a 
variant, then check to see if it's virtual product has a routing
+if (!routingGS) {
+GenericValue virtualProductAssoc = from("ProductAssoc")
+.where(productIdTo: parameters.productId,
+productAssocTypeId: "PRODUCT_VARIANT")
+.filterByDate(filterDate)
+.queryFirst()
+if (virtualProductAssoc) {
+lookupRouting.productId = virtualProductAssoc.productId
+lookupRouting.workEffortGoodStdTypeId = "ROU_PROD_TEMPLATE"
+// Consider the validity against a date passed as (optional) 
parameter
+  

Re: buildbot exception in on ofbizTrunkFrameworkPlugins

2021-09-10 Thread Nicolas Malin
^^ Guest45 it's me

Forgot to update it before ask the force build

Nicolas

On 10/09/2021 17:08, build...@apache.org wrote:
> The Buildbot has detected a build exception on builder 
> ofbizTrunkFrameworkPlugins while building . Full details are available at:
> https://ci.apache.org/builders/ofbizTrunkFrameworkPlugins/builds/2205
>
> Buildbot URL: https://ci.apache.org/
>
> Buildslave for this Build: asf945_ubuntu
>
> Build Reason: forced: by IRC user  (privmsg): forces manual build 
> after supposed BuildBot error
> Build Source Stamp: HEAD
> Blamelist: 
>
> BUILD FAILED: exception upload test-results part 1
>
> Sincerely,
>  -The Buildbot
>
>
>


buildbot exception in on ofbizTrunkFrameworkPlugins

2021-09-10 Thread buildbot
The Buildbot has detected a build exception on builder 
ofbizTrunkFrameworkPlugins while building . Full details are available at:
https://ci.apache.org/builders/ofbizTrunkFrameworkPlugins/builds/2205

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: asf945_ubuntu

Build Reason: forced: by IRC user  (privmsg): forces manual build 
after supposed BuildBot error
Build Source Stamp: HEAD
Blamelist: 

BUILD FAILED: exception upload test-results part 1

Sincerely,
 -The Buildbot





buildbot failure in on ofbizTrunkFrameworkRat

2021-09-10 Thread buildbot
The Buildbot has detected a new failure on builder ofbizTrunkFrameworkRat while 
building ofbiz-framework. Full details are available at:
https://ci.apache.org/builders/ofbizTrunkFrameworkRat/builds/1669

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: asf945_ubuntu

Build Reason: downstream
Build Source Stamp: [branch trunk] fa3e3573dcde4fab74a238472edb1e78c0873625
Blamelist: Nicolas Malin 

BUILD FAILED: failed

Sincerely,
 -The Buildbot





[ofbiz-framework] branch trunk updated: Improved: Improve run test from artefact info (OFBIZ-12312)

2021-09-10 Thread nmalin
This is an automated email from the ASF dual-hosted git repository.

nmalin pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
 new fa3e357  Improved: Improve run test from artefact info (OFBIZ-12312)
fa3e357 is described below

commit fa3e3573dcde4fab74a238472edb1e78c0873625
Author: Nicolas Malin 
AuthorDate: Fri Sep 10 10:17:23 2021 +0200

Improved: Improve run test from artefact info (OFBIZ-12312)

From https://localhost:8443/webtools/control/ViewComponents we have te 
possibility to run each test case or test suite.

We improve it with call with rest schema (like 
https://localhost:8443/webtools/control/RunTest/product/producttagtests) and 
display the result below

By this way, we also improve the groovy syntax to slim the code and extend 
xml form to CommonBasicGrid

Thanks to Gil Portenseigne for is support
---
 .../artifactinfo/TestSuiteInfo.groovy  | 31 +++---
 .../artifactinfo/TestSuiteResults.groovy   | 66 ++
 .../ofbiz/webtools/artifactinfo/RunTestEvents.java | 23 +++-
 .../webapp/webtools/WEB-INF/controller.xml | 15 +++--
 framework/webtools/widget/ArtifactInfoForms.xml| 34 +++
 framework/webtools/widget/ArtifactInfoScreens.xml  |  8 ++-
 6 files changed, 123 insertions(+), 54 deletions(-)

diff --git a/framework/webtools/groovyScripts/artifactinfo/TestSuiteInfo.groovy 
b/framework/webtools/groovyScripts/artifactinfo/TestSuiteInfo.groovy
index d33ebe1..ae6538e 100644
--- a/framework/webtools/groovyScripts/artifactinfo/TestSuiteInfo.groovy
+++ b/framework/webtools/groovyScripts/artifactinfo/TestSuiteInfo.groovy
@@ -21,40 +21,27 @@ import org.apache.ofbiz.base.component.ComponentConfig
 import org.apache.ofbiz.base.config.GenericConfigException
 import org.apache.ofbiz.base.config.ResourceHandler
 import org.apache.ofbiz.base.util.UtilXml
-import org.apache.ofbiz.base.util.UtilMisc
-
-import org.w3c.dom.Document
 import org.w3c.dom.Element
 
 List testList = []
 for (ComponentConfig.TestSuiteInfo testSuiteInfo: 
ComponentConfig.getAllTestSuiteInfos(parameters.compName)) {
-String componentName = testSuiteInfo.componentConfig.getComponentName()
 ResourceHandler testSuiteResource = testSuiteInfo.createResourceHandler()
 
 try {
-Document testSuiteDocument = testSuiteResource.getDocument()
-Element documentElement = testSuiteDocument.getDocumentElement()
-suiteName =  documentElement.getAttribute("suite-name")
-firstLine = true
-for (Element testCaseElement : 
UtilXml.childElementList(documentElement, UtilMisc.toSet("test-case", 
"test-group"))) {
-testMap = [:]
-String caseName = testCaseElement.getAttribute("case-name")
-if (firstLine == true) {
-testMap = UtilMisc.toMap("suiteName", suiteName, 
"suiteNameSave", suiteName, "caseName", caseName)
-firstLine = false
-} else {
-testMap = UtilMisc.toMap("suiteNameSave", suiteName, 
"caseName", caseName)
-}
-testList.add(testMap)
+Element documentElement = 
testSuiteResource.getDocument().getDocumentElement()
+String suiteName = 
testSuiteResource.getDocument().getDocumentElement().getAttribute("suite-name")
+boolean firstLine = true
+for (Element testCaseElement : 
UtilXml.childElementList(documentElement, ["test-case", "test-group"] as Set)) {
+testList << [suiteName : suiteName,
+ caseName  : 
testCaseElement.getAttribute("case-name"),
+ firstSuiteLine: firstLine ? 'Y' : 'N']
+firstLine = false
 }
 } catch (GenericConfigException e) {
-String errMsg = "Error reading XML document from ResourceHandler for 
loader [" + testSuiteResource.getLoaderName() + "] and location [" + 
testSuiteResource.getLocation() + "]"
+String errMsg = "Error reading XML document from ResourceHandler for 
loader [${testSuiteResource.getLoaderName()}] and location 
[${testSuiteResource.getLocation()}]"
 logError(e, errMsg)
 throw new IllegalArgumentException(errMsg)
 }
-
-
-
 }
 
 context.suits = testList
diff --git 
a/framework/webtools/groovyScripts/artifactinfo/TestSuiteResults.groovy 
b/framework/webtools/groovyScripts/artifactinfo/TestSuiteResults.groovy
new file mode 100644
index 000..b0f7813
--- /dev/null
+++ b/framework/webtools/groovyScripts/artifactinfo/TestSuiteResults.groovy
@@ -0,0 +1,66 @@
+/*
+ * 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");