Re: Backporting OFBIZ-12836 to 22.01?

2023-08-02 Thread Paul Foxworthy
OK, thanks Dan.

On Wed, 2 Aug 2023 at 17:23, Daniel Watford  wrote:

> Hi Paul,
>
> I would hold off backporting anything to 22.01 for the time being as we may
> abandon that branch in favour of creating a new release branch once the
> groovy refactoring effort is complete and has had a chance to stabilise.
>
> Although the idea was proposed to abandon 22.01, we didn't get round to
> voting on the topic. Please see
> https://lists.apache.org/thread/8pyhnjs65ss6btsl8r93w6z21pyksclt
>
> Thanks,
>
> Dan.
>
> On Wed, 2 Aug 2023 at 07:48, Paul Foxworthy 
> wrote:
>
> > Hi,
> >
> > I have committed fixes for OFBIZ-12836 to trunk.
> >
> > I tried backporting to 22.01, but if I'm reading the gradle config
> > correctly, the version of Groovy seems to be 2.5.18 and that appears to
> not
> > support try-with-resources syntax. Is that expected?
> >
> > Thanks
> >
> > Paul Foxworthy
> >
>
>
> --
> Daniel Watford
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Backporting OFBIZ-12836 to 22.01?

2023-08-02 Thread Paul Foxworthy
Hi,

I have committed fixes for OFBIZ-12836 to trunk.

I tried backporting to 22.01, but if I'm reading the gradle config
correctly, the version of Groovy seems to be 2.5.18 and that appears to not
support try-with-resources syntax. Is that expected?

Thanks

Paul Foxworthy


Re: Resource leaks in EntitySQLProcessor.groovy?

2023-07-13 Thread Paul Foxworthy
Thanks Deepak.

Created Jira at https://issues.apache.org/jira/browse/OFBIZ-12836 .

Cheers

Paul


On Tue, 11 Jul 2023 at 21:19, Deepak Dixit  wrote:

> Hi Paul,
>
> The resource should be closed properly, we can use groovy withClosable or
> groovy 3 try with resource.
>
> No one touched the groovy code for the ARM.
>
>
> Thanks & Regards
> --
> Deepak Dixit
> ofbiz.apache.org
>
>
> On Tue, Jul 11, 2023 at 11:09 AM Paul Foxworthy
> 
> wrote:
>
> > Hi all,
> >
> > I want to check in case I'm missing something, but I think there are some
> > problems with
> >
> > framework/webtools/groovyScripts/entity/EntitySQLProcessor.groovy
> >
> > At line 35
> >
> >
> https://github.com/apache/ofbiz-framework/blob/e080f0bfa657b8b6ffd4cbf5629e0c648440b5f0/framework/webtools/groovyScripts/entity/EntitySQLProcessor.groovy#L35
> >
> > it creates an SQLProcessor. SQLProcessor has a Close method and
> implements
> > AutoCloseable, but we're not using try-with-resources, nor directly
> calling
> > the Close method. I'm thinking there should be a try-with-resources. Any
> > reason why not?
> >
> > Similarly,
> >
> >
> >
> https://github.com/apache/ofbiz-framework/blob/e080f0bfa657b8b6ffd4cbf5629e0c648440b5f0/framework/webtools/groovyScripts/entity/EntitySQLProcessor.groovy#L38
> >
> > obtains a java.sql.Resultset, which will be closed when everything works,
> > but would leak if there was an exception. Again, we should be using
> > try-with-resources.
> >
> > Note that according to
> >
> >
> >
> https://docs.oracle.com/en/java/javase/20/docs/api/java.sql/java/sql/ResultSet.html#close()
> >
> > "Calling the method close on a ResultSet object that is already closed
> is a
> > no-op.", if you obtain a ResultSet from the SQLProcessor and directly
> close
> > that ResultSet, it's not a problem when the SQLProcessor.close also
> > attempts to close the ResultSet.
> >
> > The problem is minor, most of the time. The groovy script is in the
> > webtools, so used for developer tinkering and not production use.
> >
> > When you're doing a SELECT, the script is closing the ResultSet, so the
> > important resources are cleaned up (assuming no exception occurred).
> >
> > However, if you are doing INSERT, UPDATE or DELETE, the script creates a
> > prepared statement that is not closed, so there's a resource leak.
> >
> > Am I missing anything? I'll create a Jira if necessary.
> >
> > Thanks
> >
> > Paul Foxworthy
> >
> > --
> > Coherent Software Australia Pty Ltd
> > PO Box 2773
> > Cheltenham Vic 3192
> > Australia
> >
> > Phone: +61 3 9585 6788
> > Web: http://www.coherentsoftware.com.au/
> > Email: i...@coherentsoftware.com.au
> >
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Resource leaks in EntitySQLProcessor.groovy?

2023-07-10 Thread Paul Foxworthy
Hi all,

I want to check in case I'm missing something, but I think there are some
problems with

framework/webtools/groovyScripts/entity/EntitySQLProcessor.groovy

At line 35
https://github.com/apache/ofbiz-framework/blob/e080f0bfa657b8b6ffd4cbf5629e0c648440b5f0/framework/webtools/groovyScripts/entity/EntitySQLProcessor.groovy#L35

it creates an SQLProcessor. SQLProcessor has a Close method and implements
AutoCloseable, but we're not using try-with-resources, nor directly calling
the Close method. I'm thinking there should be a try-with-resources. Any
reason why not?

Similarly,

https://github.com/apache/ofbiz-framework/blob/e080f0bfa657b8b6ffd4cbf5629e0c648440b5f0/framework/webtools/groovyScripts/entity/EntitySQLProcessor.groovy#L38

obtains a java.sql.Resultset, which will be closed when everything works,
but would leak if there was an exception. Again, we should be using
try-with-resources.

Note that according to

https://docs.oracle.com/en/java/javase/20/docs/api/java.sql/java/sql/ResultSet.html#close()

"Calling the method close on a ResultSet object that is already closed is a
no-op.", if you obtain a ResultSet from the SQLProcessor and directly close
that ResultSet, it's not a problem when the SQLProcessor.close also
attempts to close the ResultSet.

The problem is minor, most of the time. The groovy script is in the
webtools, so used for developer tinkering and not production use.

When you're doing a SELECT, the script is closing the ResultSet, so the
important resources are cleaned up (assuming no exception occurred).

However, if you are doing INSERT, UPDATE or DELETE, the script creates a
prepared statement that is not closed, so there's a resource leak.

Am I missing anything? I'll create a Jira if necessary.

Thanks

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Upgradation from OFBiz 13.07 to OFBiz 18.12

2023-02-26 Thread Paul Foxworthy
Hi Siddarth,

Skip Dever had a lot to say about upgrading earlier versions of OFBiz
during 2013. The first post is here:

http://ofbiz.116.s1.nabble.com/Upgrading-to-12-x-td4640861.html

This might also be useful:

http://ofbiz.116.s1.nabble.com/Re-Updating-10-year-old-version-of-entity-engine-and-service-engine-td4708274.html#a4708283

Cheers

Paul Foxworthy


On Sat, 25 Feb 2023 at 21:46, Jacques Le Roux 
wrote:

> Hi Siddharth,
>
> At least one thing that could help you :
> https://cwiki.apache.org/confluence/display/OFBIZ/Revisions+Requiring+Data+Migration+-+upgrade+ofbiz
>
> It's about data, for the code I fear it's every man for himself, because
> of specificities you may have
>
> HTH
>
> Jacques
>
> Le 01/02/2023 à 08:13, Siddharth Singh a écrit :
> > Hello All,
> >
> > I hope you all are doing great
> >
> > I'd like to know your thoughts on the OFBiz project version upgrade.
> >
> > I am working on a project where the project is in production and deployed
> > on OFBiz 13.07 and it needs to be upgraded to the latest OFBiz 18.12
> > release.
> >
> > Can anyone provide some insight, major steps or any related documentation
> > to fulfil the above requirement?
> >
> > Thanks and Regards
> > Siddharth Singh



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [DISCUSSION] R16 and R17: email password issue and releases

2020-01-25 Thread Paul Foxworthy
Hi Gil,

Debian releases are approximately two years apart...
https://en.wikipedia.org/wiki/Debian_version_history

Cheers

Paul


On Sat, 25 Jan 2020 at 03:36, Gil Portenseigne 
wrote:

> I wonder if it is bad for the project to have 2 years between two
> releases, 16 => 18 => 20
>
> WDYT ?
>
> Gil
>
> On Fri, Jan 24, 2020 at 05:31:14PM +0100, Jacques Le Roux wrote:
> > Le 24/01/2020 à 15:09, Nicolas Malin a écrit :
> > > On 24/01/2020 14:57, Jacques Le Roux wrote:
> > >
> > > > I must say I'm mostly against because of the surplus of effort
> > > > necessary to backport to both R17 and R18
> > > >
> > > > About R20, as Pierre Smits mentioned in Slack should we not create a
> > > > R19 before ;)
> > > If we follow the years, 2019 is now behind.
> >
> > Actually it's not a set in stone rule, we could still create a R19
> branch, why wait one year more, and at least 2 years to publish R20?
> >
> > Jacques
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [VOTE] Do not release R17 and directly publish R18 instead.

2020-01-25 Thread Paul Foxworthy
+1

Thanks

Paul Foxworthy

On Fri, 24 Jan 2020 at 21:27, Jacques Le Roux 
wrote:

> Hi,
>
> R16 is now an old distribution and has almost reached its end of support.
> We can soon expect a last release but we need to think about the next to be
> released package
>
> Some would prefer to release R17 before releasing R18, some would prefer
> to bypass R17 release and directly publish R18 instead.
>
> Vote:
> [ +1] Do not release R17 and directly publish R18 instead.
> [ -1]  Release R17 before releasing R18
>
> We had already 3 months to discuss without reaching a consensus, so this
> vote will be only open for a week.
>
> Note that it's not a formal vote to release R17 or R18, as that is another
> process documented at
>
> https://cwiki.apache.org/confluence/display/OFBIZ/Release+Management+Guide+for+OFBiz
>
> Thank you for your attention
>
> Jacques
>
>

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: What is OFBiz public API?

2020-01-07 Thread Paul Foxworthy
On Mon, 6 Jan 2020 at 20:29, Samuel Trégouët 
wrote:


>   what is OFBiz public API?
>
> In my opinion we need an answer for this question otherwise we need to
> discuss every single changement! which seems to be really cumbersome!
> And even if we discuss every single changement how to decide it is good
> for our community: *one* other contributor thumb-up is enough? maybe
> *two*? do we need to wait forever if others don't care about a
> particular changement?
>

Hi Samuel,

I think this isn't a choice between having a public API and cumbersome
decision making. An API is a bits and bytes thing and won't magically
streamline decision making. A better architected, designed and understood
API will help **people** get an **initial impression** of what is easy to
refactor and re-implement.  Being clearer about it would be a good thing.
There is still the potential that a change that seems simple and
straightforward to one contributor is disruptive to others. And if it truly
is disruptive, we should collaborate on what comes next. Are the benefits
worth the disruption? Should there be some sort of deprecation, phase-out
or backwards compatibility option? I can't clearly define what "big" is,
but I know it when I see it.

And as a starting point for making these decisions, I suggest
https://www.apache.org/foundation/how-it-works.html#decision-making .

Cheers

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Default transaction timeout on screen widget

2019-10-06 Thread Paul Foxworthy
On Tue, 1 Oct 2019 at 19:06, Scott Gray 
wrote:

> Hi Paul,
>
> I've never seen a transaction timeout actually cause locks to be released
> ahead of time before the transaction finally attempts to commit, are you
> saying that happens?


OK, now we need to talk about context.

The OFBiz transaction timeout uses
javax.transaction.TransactionManager.setTransactionTimeout, so it depends
on your JDBC driver, but I reckon that's what I'd want - the transaction
should fail if it can't do the job within the time limit. Often the default
timeout is infinite, so never happens, because what's a reasonable timeout
depends on the work the application is doing. An end of financial year
transaction might quite legitimately take a weekend to complete.

InnoDB has an option innodb_rollback_on_timeout (
https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_rollback_on_timeout).
By default it rolls back only the last statement. That seems very weird to
me - a rollback should roll back the transaction, not any one statement.

Postgres has statement_timeout and idle_in_transaction_session_timeout (
https://www.postgresql.org/docs/9.6/runtime-config-client.html)

In my experience if you have a 60 second timeout but
> your transaction doesn't try to commit for 15 minutes then the locks will
> be held for the full 15 minutes (before finally rolling back when you
> attempt to commit).
>

Then I'd agree with you - the timeout is only informing you your query was
slow to execute, and there is no other benefit to the timeout. Might as
well have some sort of monitoring for query execution times, and turn off
timeouts. If the locks are going to stay on anyway, might as well commit
the first transaction if it completes without error.


> But no sooner did I ask this question about the relevance of timeouts than
> I came across a good use case for them.  If your transaction is wrapping an
> API call and the intermediate gateways (like a proxy server or whatever)
> have a timeout, then it can be better to have the transaction timeout
> shorter than the gateway timeout.  In this manner the client won't
> encounter situations where they receive a gateway timeout error response
> but the API call they made is actually successful on the server.
>

We are used to transactions spanning several changes within a database -
the classic example is a transfer between two bank accounts. And
transactions should give us the famous all-or-nothing ACID behaviour. Mix
in anything else, like the API call, and it gets harder. Queuing services
like JMS, MSMQ, ServiceBus, RabbitMQ, AMQP give the same transactional
behaviour to sending and receiving messages. Posting a message to a queue
is a pending operation that becomes real when you commit a transaction, so
any other processing before or after must complete successfully. You can
rollback if any error occurs, which undoes the posting of the message.
Similarly, at the other end we pull a message off the queue and try to
process it. In the event of any failure, a transaction is rolled back and
the message is still safely there on the queue.

In the absence of queuing, the best you can probably do is build in
compensation - call the API, and in the event of a subsequent failure issue
a second API call to undo the first. The analogy is like clearing a cheque
instead of transferring between your own bank accounts - in the event of a
failure, the second bank sends a decline message that undoes the effect of
the deposit. Conceptually, there's a transaction but it's built by
composing a sequence of smaller and simpler transactions rather than having
an overarching one. When you are managing compensation, you have to
implement an undo stack for yourself rather than relying on a transaction
to do it for you.

Cheers

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [DISCUSSION] (OFBIZ-11206) Edit the user login security question from party profile

2019-10-06 Thread Paul Foxworthy
I agree with Jacques and Nicolas - remove it.

Security is only as good as its weakest link (
https://www.schneier.com/essays/archives/2005/02/the_curse_of_the_sec.html)
, and security questions can be a real weakness. Any organisation using
OFBiz that really hates passwords could look at security keys from Yubico
or the like.

Cheers

Paul Foxworthy

On Tue, 1 Oct 2019 at 03:29, Nicolas Malin  wrote:

> I lean in remove it, it's not a functionality really up to date with
> code complexity for a few 'most valuable'.
>
> Nicolas
>
> On 9/29/19 11:08 AM, Jacques Le Roux wrote:
> > Le 26/09/2019 à 11:47, Jacques Le Roux a écrit :
> >> Hi,
> >>
> >> Below is a summary of the situation, you can refer to the Jira issues
> >> comments for more information.
> >>
> >> With  OFBIZ-4983 and r1716915, basically a feature was implemented to
> >> allow an eCommerce customer to create a security question while
> >> creating his/her account. The user could then answer the security
> >> question to get his/her password through email.
> >>
> >> This feature was partly removed while fixing OFBIZ-4361, where
> >> basically a JWT is used to safely ask for a new password through and
> >> email
> >>
> >> With OFBIZ-11206 patch it's possible to create a security question
> >> but only in partymgr. When used from "forgot your password" feature,
> >> if you have also set a password hint, you get on screen the value of
> >> your password hint.
> >>
> >> As I wrote in OFBIZ-11206:
> >>
> >>/"I wonder if it makes sense to keep this feature as is. It seems
> >> convoluted to me. Why ask a question to get a password hint? //
> >>//It seems a lot to remember:/
> >>
> >>//
> >>
> >> 1. /The choice of the security question/
> >> 2. /The answer to this security question/
> >> 3. /The relation between the password hint and the password itself/
> >>
> >>//
> >>
> >>/I see only a good thing in this feature: you don't have to change
> >> your password. But sincerely do we really need a such feature? I
> >> finally think
> >>than rather fixing the current state we should remove the feature
> >> all together. IMO, the password link in an email done a safe way is
> >> enough. //
> >>/
> >>
> >>/The point to keep in mind is that OOTB all OFBiz users must have
> >> an email, apart anonymous which have no passwords anyway."/
> >>
> >> So, as suggested Nicolas, either we
> >>
> >>  * /"We continue to support this and I will increase coherence of
> >> that/
> >>  * /We abandon it and I will remove all code linked to this
> >> deprecated feature"/
> >>
> >> What do you think?
> >>
> >> Thanks
> >>
> >> Jacques
> >>
> >>
> > Hi All,
> >
> > Without answers I'll consider that we don't want to keep the password
> > hint stuff. It seems like a duplicate of the now safe emailed password
> > change to me.
> >
> > So I'll remove it in a week
> >
> > Thanks
> >
> > Jacques
> >
> >
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Default transaction timeout on screen widget

2019-09-25 Thread Paul Foxworthy
On Tue, 17 Sep 2019 at 18:45, Scott Gray 
wrote:

> Has anyone ever had a good experience with transaction timeouts?  I feel
> like they achieve nothing useful in that:
> 1. They don't interrupt any work that is taking too long (they just prevent
> it from being committed)
> 2. By the time the exception is thrown, all the work is already done and
> the result is that it just gets thrown away in exchange for an error
>
> Surely there's a positive side to them, and I've just never seen it?
>

Hi Scott,

Timeouts are not good for the transaction, they're good for competing
transactions.

In many DBMSes, a transaction keeps things locked until commit, to
achieve isolation, the I in ACID. If an unusual error situation arises, or
somebody has designed a transaction (badly) to include a user's think time,
it's possible the transaction does not commit at all, blocking access to
data touched by the transaction for everyone else, indefinitely.

A transaction timeout is an estimate of a reasonable amount of time within
which the transaction should complete. If it doesn't complete, the timeout
ensures it will roll back, so other transactions won't have to wait too
long. It's something like an operating system segfaulting a rogue process
in order to protect all the others.

Cheers

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [DISCUSSION] Best of both Groovy worlds: compile and on the fly

2019-09-19 Thread Paul Foxworthy
Thanks Jacques,

Yes, on the fly rebuild is very cool. This will encourage and accelerate
moving Java services to Groovy, I think.

Big +1 from me.

Cheers

Paul

On Mon, 16 Sep 2019 at 20:29, Jacques Le Roux 
wrote:

> Hi Devs,
>
> While working on OFBIZ-10226 "Adds groovyScripts in the Gradle sourceSets"
> I discussed with Mathieu and we had some ideas.
>
> Mathieu suggested to move Groovy scripts from /groovyScripts/
> to/src/main/groovy/.
>
> I was initially reluctant because I love to be able to change things on
> the fly. That's why I liked Minilang and still like widgets, Freemarker
> templates and Groovy Scripts.
>
> We also know the advantages of compilation. But then I thought: why not
> have best of both Groovy worlds: compile and on the fly.
>
> I tried and it works. So here is the (simple) plan:
>
>  1. We move all Groovy scripts from /groovyScripts/ to /src/main/groovy/
>  2. We add the necessary packages names
>  3. Devs can then open "gradlew --continuous" in a terminal and let it
> like that. It will continuously build on any changes in Gradle sourcesets
>
> So, if you modify a Groovy scripts while running an OFBiz instance, the
> changes will be reflected in the instance and you can check possible syntax
> or
> alike issues in the terminal running the continuous build. It's very fast
> since only changes have an impact on the build.
>
> I'm sure there are other benefits to follow "the common convention of
> putting groovy compiled sources in ${COMPONENT}/src/main/groovy.", as
> suggested
> Mathieu.
>
> I see no disadvantages, do you? If nobody disagree with this idea, I'll
> create a Jira for that.
>
> Feedback welcome, thanks
>
> Jacques
>
>

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [VOTE] [RELEASE] Apache OFBiz 16.11.06 - second attempt

2019-08-29 Thread Paul Foxworthy
+1

On Thu, 29 Aug 2019 at 17:12, Taher Alkhateeb 
wrote:

> +1
>
> On Thu, Aug 29, 2019, 8:55 AM Aditya Sharma 
> wrote:
>
> > +1
> >
> > --
> > Thanks and Regards,
> > Aditya Sharma
> >
> > On Thu, Aug 29, 2019 at 10:52 AM Suraj Khurana 
> wrote:
> >
> > > +1
> > >
> > > --
> > > Best Regards,
> > > Suraj Khurana
> > > Technical Consultant
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > On Wed, Aug 28, 2019 at 1:20 PM Nicolas Malin <
> nicolas.ma...@nereide.fr>
> > > wrote:
> > >
> > > > same here
> > > >
> > > > +1
> > > >
> > > > On 8/28/19 9:25 AM, Swapnil M Mane wrote:
> > > > > +1, thank you Jacopo!
> > > > >
> > > > > Everything seems good -
> > > > >
> > > > > 1. Checksums and signing certificate
> > > > > $  ../ofbiz-tools/verify-ofbiz-release.sh apache-ofbiz-16.11.06.zip
> > > > > sha check of file: apache-ofbiz-16.11.06.zip
> > > > > Using sha file: apache-ofbiz-16.11.06.zip.sha512
> > > > > apache-ofbiz-16.11.06.zip: 407F03CF C0A60B0F 363E83FC 55C0D301
> > DDF323DC
> > > > > 016B2C96 CA624791 046E8367 AE629A38 F4CE597F AE1E1F2E C504E895
> > D22E6C6A
> > > > > 4FA2E958 30F1EB3F 62A81E01
> > > > > apache-ofbiz-16.11.06.zip: 407F03CF C0A60B0F 363E83FC 55C0D301
> > DDF323DC
> > > > > 016B2C96 CA624791 046E8367 AE629A38 F4CE597F AE1E1F2E C504E895
> > D22E6C6A
> > > > > 4FA2E958 30F1EB3F 62A81E01
> > > > > sha checksum OK
> > > > >
> > > > > GPG verification output
> > > > > gpg: Signature made Tue Aug 27 15:05:16 2019 IST
> > > > > gpg:using RSA key 7A580908847AF9E0
> > > > > gpg: Good signature from "Jacopo Cappellato (CODE SIGNING KEY) <
> > > > > jaco...@apache.org>"
> > > > >
> > > > > 2. Initializing gradle wrapper, build, and tests are successful,
> the
> > > > steps
> > > > > followed are as follows (using macOS Mojave OS) -
> > > > > -- Unzip apache-ofbiz-16.11.06.zip
> > > > > -- Executed the ./gradle/init-gradle-wrapper cmd
> > > > > -- Executed load and test command
> > > > > $ ./gradlew loadDefault testIntegration
> > > > > BUILD SUCCESSFUL
> > > > >
> > > > >
> > > > > Best regards,
> > > > > Swapnil M Mane,
> > > > > ofbiz.apache.org
> > > > >
> > > > >
> > > > >
> > > > > On Tue, Aug 27, 2019 at 3:18 PM Jacopo Cappellato <
> > > > > jacopo.cappell...@gmail.com> wrote:
> > > > >
> > > > >> This is the second vote thread to release a new bug fix release
> for
> > > the
> > > > >> release16.11 branch.
> > > > >> This new release, "Apache OFBiz 16.11.06" will supersede all the
> > > > previous
> > > > >> releases from the same branch.
> > > > >> The release files can be downloaded from here:
> > > > >>
> > > > >> https://dist.apache.org/repos/dist/dev/ofbiz/
> > > > >>
> > > > >> and are:
> > > > >>
> > > > >> * apache-ofbiz-16.11.06.zip
> > > > >> * KEYS: text file with keys
> > > > >> * apache-ofbiz-16.11.06.zip.asc: the detached signature file
> > > > >> * apache-ofbiz-16.11.06.zip.sha512: checksum file
> > > > >>
> > > > >> Please download and test the zip file and its signatures (for
> > > > instructions
> > > > >> on testing the signatures see
> > > > http://www.apache.org/info/verification.html
> > > > >> ).
> > > > >>
> > > > >> The preview of the Release Notes can be found at:
> > > > >> https://ofbiz.apache.org/release-notes-16.11.06.html
> > > > >>
> > > > >> Vote:
> > > > >> [ +1] release as Apache OFBiz 16.11.06
> > > > >> [ -1] do not release
> > > > >>
> > > > >> In order to provide enough time to discuss and test the candidate
> > > files,
> > > > >> this vote will be open for at least 10 days.
> > > > >>
> > > > >> For more details about this process please read
> > > > >> http://www.apache.org/foundation/voting.html
> > > > >>
> > > > >> Best Regards,
> > > > >> Jacopo Cappellato
> > > > >>
> > > >
> > >
> >
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: View Entity Behaviour

2019-07-30 Thread Paul Foxworthy
On Mon, 29 Jul 2019 at 23:51, Rishi Solanki  wrote:


> Thanks for your input, I see delimited can be use for column names as well.
> Are you proposing to limit it for entity alias name to wrap in the code as
> I have reported it for that only. I'll convert a query and wait for input
> from others.
>

Hi Rishi,

There is less risk we'll see a problem with column names. A column name
will be longer and more descriptive and less likely to collide with an SQL
keyword. Aliases are more the danger, as you've found.

However, if we do this at all we should do it for column names as well so a
collision can never happen. That's better than hoping that anyone adding a
new column knows what they're doing. Instead of a low risk of collision, we
can be certain there's *no* risk.

Cheers

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: View Entity Behaviour

2019-07-27 Thread Paul Foxworthy
Hi Rishi,

I think we can fix the problem in the SQL generation and not worry about it
anywhere else. Just wrap alias names in double quotes - see
https://en.wikibooks.org/wiki/SQL_Dialects_Reference/Data_structure_definition/Delimited_identifiers
 .

For MySQL and Microsoft SQL Server, there are configuration options to get
double quotes to work as per the ISO SQL standard. We could either document
that that's necessary, or use the native characters instead of double
quotes for those databases (backquotes for MySQL, square brackets for
MSSQL).

I've had a quick look and I think the changes might need to be in
GenericDAO. The point is once we get this right you can use any alias name
without needing to know the complete list of SQL keywords, and nowhere else
in OFBiz needs to worry about the issue.

What do you think?

Thanks

Paul Foxworthy

On Sat, 27 Jul 2019 at 23:56, Rishi Solanki  wrote:

> Hello All,
> While working on one view entity creation, I faced one problem and thought
> to share with you all.
> I used OR as entity alias for OrderRole, and while fetching the data the
> entity throws exception of incorrect SQL.
>
> On research I found that while creating SQL query sql executer treat OR as
> OR operator and misinterpret the query. So I would suggest never ever use
> any SQL keyword for entity alias in view entity like OR, AND or any other
> while creating abbreviations for entity alias.
>
> Now I would like to ask to community, do we need to handle this?
>
> If yes then how, in code or in best practice document. Please advise.
>
> Best Regards,
> --
> Rishi Solanki
> Sr Manager, Enterprise Software Development
> *HotWax Systems*
> *Enterprise open source experts*
> cell: +91-98932-87847
> http://www.hotwaxsystems.com
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Getting Started with Apache OFBiz Manufacturing in 5 Easy Steps

2019-07-01 Thread Paul Foxworthy
>
> > > On Tue, Jun 25, 2019 at 2:34 AM Sharan Foga  wrote:
> > >
> > >> Swapnil has already followed up with me and I am happy to release the
> > >> copyright for this tutorial document and fully contribute it back to
> > under
> > >> ASL v2 so the project so the community is free to use, change or
> update
> > it
> > >> as needed.
>

Thanks Sharan, that's great news.

Cheers

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [PROPOSAL] DataModel - Improve entities using fromPartyId & toPartyId

2019-06-21 Thread Paul Foxworthy
On Mon, 20 May 2019 at 18:27, Scott Gray 
wrote:


> I'm sure there are scenarios where from/to partyIds are suitable (like
> PartyRelationship) but I disagree with a broad proposal such as this to
> apply them to a range of entities.  I'd prefer to see us move in the other
> direction and remove top-level entitiy from/to fields if there is an
> existing *Role entity in order to simplify the datamodel while maintaining
> flexibility.
>

I agree with Scott.

Cheers

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Reply-to address missing for dev and user mailing list

2019-06-16 Thread Paul Foxworthy
Hi all,

Please do not set reply-to.

I agree with Mathieu and Jacques, and the sentiment in
http://www.unicom.com/pw/reply-to-harmful.html .

In a formal vote I would want to say -0.8: if absolutely everybody was in
favour, I could live with it, but it is still a bad idea. We are talking
about guarding against mistakes, either sending to the list when the intent
was to communicate with only one person, or the other way around. If
someone mistakenly sends to just one person, the damage is minimal - the
recipient may well notice and say "hey, did you intend this to go to the
list?". A personal message mistakenly sent to the list could be much more
embarrassing and damaging.

I administer another mailing list for a non-profit group and this issue has
cropped up. We added to the footer of the messages "Reply will send a
response to the sender. Please use Reply To All to send a response to the
list." That seemed to satisfy everyone.

I have no problem with additional headers that some email clients might
understand.

Cheers

Paul Foxworthy


On Sun, 16 Jun 2019 at 20:08, Mathieu Lirzin 
wrote:

> Hello Jacques,
>
> Jacques Le Roux  writes:
>
> > Le 13/06/2019 à 15:19, Mathieu Lirzin a écrit :
> >> Jacques Le Roux  writes:
> >>
> >>> I don't agree, as an ASF member I reply to a lot of MLs. I don't want
> to be bothered by that for all of them.
> >>> Deepak's answer with INFRA-18478 seems to be the way we should handle
> that.
> >>
> >> If you have a huge pile of ML subscriptions (50? 100?), you can
> >> configure your email client incrementally each time you send an email to
> >> a list that is not already configured and someday they will eventually
> >> all be properly configured. \o/
> >>
> >> Thanks.
> > I tried but could not find a way in a reasonable time
>
> After doing some research I have found a documentation [1] which is not
> directly about setting the ‘Reply-to’ header but the ‘Mail-Followup-To’
> and ‘Mail-Reply-To’ headers which are workarounds for the “reply-to
> munging” done by mailing-lists [2].
>
> After configuring Thunderbird this way, people using Mail User Agents
> (MUA) understanding those headers [3] will not have to remember to
> remove you from the recipient list when responding to the list.
>
> I haven't found any information regarding Gmail or other Webmail
> clients, but hopefully they understand those headers too.
>
> Thanks.
>
> [1]
> https://wiki.mozilla.org/Thunderbird:Help_Documentation:Mail-Followup-To_and_Mail-Reply-To
> [2] http://cr.yp.to/proto/replyto.html
> [3] https://www.leptonite.org/mft/software.html
>
> --
> Mathieu Lirzin
> GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Reformat and homogenize displaying number

2019-04-16 Thread Paul Foxworthy
On Fri, 12 Apr 2019 at 05:30, Nicolas Malin 
wrote:

>
> > I would probably limit the types of formatting to percentage and
> > currency and quantity. Between those three you probably have all cases
> > covered no?
>

"Currency" should not imply a fixed number of decimal places.
Foreign exchange rates are normally quoted to four decimal places and are
not really currencies anyway.
There has been discussion by people wanting to integrate blockchain into
OFBiz, and they want at least six DPs.

Cheers

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [DISCUSS} Declutter Accounting functionality

2019-03-12 Thread Paul Foxworthy
+1

Thanks Pierre.

On Wed, 13 Mar 2019 at 03:03, wp.rauchh...@gmail.com 
wrote:

> I agree with Pierre and would even extend on his idea to move agreements
> and subscriptions to the order management model.
>
> If a responsibility matrix like RACI would be applied to agreement and
> subscription functions, I think we would see that in most companies
> Responsibility and Accountability for these two processes lie with sales
> and sourcing. I would think that finance would be Consulted and Informed
> about the outcome of these negotiations.
> Finance only get involved at the end of the process.
>
> So yes, I think Pierre has a good point here; this helps to unclutter the
> system and allows to implement more logical process flow.
>
> Wolfgang
>
>
> On 2019/03/12 12:07:23, Pierre Smits  wrote:
> > Hi All,
> >
> > Recently (started somewhere in 2018) some activities have been started to
> > enhance the Accounting component (See list of related below).
> >
> > Removing the Accounting-AR and Accounting-AP functionality from the main
> > navigator will reduce the number of applications shown there (and thus
> > enhance usability), but will lead to the same number of menu-items in the
> > main menu of accounting. This menu already has so many menu-items that it
> > will lead to the situation that it will not fit into a single line (in
> > FlatGray, RainbowStone).
> >
> > Therefore, I suggest that functionalities will be removed from the
> > Accounting component and be placed in other (more) suitable components:
> >
> >1. Agreements
> >2. FixedAssets
> >
> > *Re 1. Agreements *
> > Agreements are of the same nature as orders (an order is an agreement
> > between two - or more - parties). And are expected to be associated more
> to
> > Sales and Purchasing roles than Accounting roles. In our OFBiz they are
> > also a source for Orders. Also, there seem to be no Gl/Financial
> > transaction functionalities  that are directly related to agreements.
> > Thus it seems more fitting to have the functionalities regarding
> agreements
> > in the OrderMgt component.
> >
> > *Re 2. Fixed Assets*
> > The majority of the functions/services related to Fixed Assets are
> related
> > to the registration of Fixed Assets, maintenance of these registrations,
> > and how the Fixed Assets are used (e.g. Rental - through product/order,
> > and/or work effort). Only a minority of Agreement related
> > functions/services are related to actual accounting functions like Gl
> > transactions, and the most complex thereof is/are related to calculating
> > depreciation.
> > Given that we have a specific - and optional - component related to
> Assets
> > (AssetMaint), I suggest that we move all FixedAsset related object to
> that
> > specific component.
> >
> > Both suggestions will, IMO, lead to a better usability of the Accounting
> > component, better alignment of functions with the expectations of
> adopters,
> > and thus an increase in favourabilty of OFBiz over similar products,
> > potentially leading to more contributors.
> >
> > [1] Move accounting ap and ar to plugin ?
> > <
> https://ofbiz.markmail.org/message/bhxjdt65usz6tdcz?q=%22move+accounting%22+order:date-forward
> >
> > [2] OFBIZ-10552 
> >
> > What are your thoughts?
> >
> > Best regards,
> >
> > Pierre Smits
> >
> > *Apache Trafodion , Vice President*
> > *Apache Directory , PMC Member*
> > Apache Incubator , committer
> > *Apache OFBiz , contributor (without
> privileges)
> > since 2008*
> > Apache Steve , committer
> >
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [SUGGESTION] Common .derived file and AutoDeriv Eclipse plugin

2018-12-17 Thread Paul Foxworthy
Would it be possible to organise any Eclipse-specific files into a .eclipse
directory so it's easy for anyone else to ignore?

Cheers

Paul Foxworthy

On Tue, 18 Dec 2018 at 00:13, Jacques Le Roux 
wrote:

> Hi,
>
> I know we don't all use Eclipse but I though want to make a suggestion.
>
> 2 years ago I put this tip at
> https://cwiki.apache.org/confluence/display/OFBIZ/Eclipse+Tips#EclipseTips-Hidefoldersfromsearches
> :
>
>
> < a file.
>
> Most of the time you don't want to look into some folders because
> there is nothing interesting there and they sometimes annoy you because of
> search errors (triste)
> It's also annoying to see *.class files when you look for a similarly
> named Java source.
> Then you tool of choice is https://nodj.github.io/AutoDeriv/>>
> <https://nodj.github.io/AutoDeriv/>
>
> As it's convenient, I suggest now to put the .derived file and its content
> (maybe updated) into the svn repo as we have .xmlcatalog.xml which is also
> Eclipse specific.
>
> Can I get a consensus about that?
>
> Jacques
>
>

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: svn commit: r1846159 [1/2] - in /ofbiz/tools: ./ wiki-files/ wiki-files/birt/

2018-11-11 Thread Paul Foxworthy
On Fri, 9 Nov 2018 at 22:01, Mathieu Lirzin 
wrote:


> Shouldn't the documentation be available on the Web directly in HTML
> form with the output of AsciiDoctor?


Thanks Mathieu. That was my thought too.

Cheers

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: svn commit: r1834389 - in /ofbiz/ofbiz-framework/trunk/framework: base/src/main/java/org/apache/ofbiz/base/util/collections/ webapp/config/ webapp/dtd/ webapp/src/main/java/org/apache/ofbiz/webapp

2018-06-26 Thread Paul Foxworthy
On 26 June 2018 at 17:58, Taher Alkhateeb 
wrote:

> I could be mistaken, but this seems like a very major change that did
> not have a thorough and proper discussion at the mailing list? I would
> rather at least have an explanation of what was committed and to
> discuss the merits and cons of the implementation.
>

Hi all,

I haven't found the specific issue, but wasn't there a major change several
years ago from GET to POST to help guard against XSS attacks?

Cheers

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Update our HTTP headers

2018-05-18 Thread Paul Foxworthy
Hi Jacques,

I'm happy to get rid of X-UA-Compatible.

Cheers

Paul Foxworthy


On 18 May 2018 at 23:47, Jacques Le Roux <jacques.le.r...@les7arts.com>
wrote:

> Hi,
>
> At https://issues.apache.org/jira/browse/OFBIZ-6766 I have attached a
> minor OFBIZ-6766-UtilHttp.java.patch for updating our HTTP headers
>
> I think it's OK to commit, but before I'd like to know if we really want
> to keep x-ua-compatible in several *.html files.
>
> https://stackoverflow.com/questions/26346917/why-use-x-ua-
> compatible-ie-edge-anymore
>
> I ever wonder who uses Windows nowadays (kidding ;))
>
> Jacques
>
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: datamodel book query : page 2-Top Level Product Entities, Entity ProductCategory

2018-04-23 Thread Paul Foxworthy
Hi,

I think Rajesh is referring to the Big Book of Apache OFBiz Data Model (
https://cwiki.apache.org/confluence/display/OFBIZ/Data+Model+Diagrams), not
the Data Model Resource Book by Len Silverston.

Cheers

Paul

On 24 April 2018 at 05:10, Rishi Solanki  wrote:

> Rajesh,
> Where you are referring, could you please share the link. I checked the
> data model book vol1 do not see anything related you are sharing.
>
> Thanks!
>
> Rishi Solanki
> Sr Manager, Enterprise Software Development
> HotWax Systems Pvt. Ltd.
> Direct: +91-9893287847
> http://www.hotwaxsystems.com
> www.hotwax.co
>
> On Mon, Apr 23, 2018 at 4:07 PM, Rajesh Mallah 
> wrote:
>
> > Hi ,
> >
> > The entity  ProductCategory in Page 2 is abridged and there is no
> > indication of
> > that. Page 14 has the full blown version.
> >
> > Should we inflate in page 1 , so indicate that fact ?
> >
> > regds
> > mallah.
> >
>



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: HTTP based API using REST architectural style

2018-04-13 Thread Paul Foxworthy
Hello Mathieu,

This might be of interest too:

https://martinfowler.com/articles/richardsonMaturityModel.html

Cheers

Paul Foxworthy


On 13 April 2018 at 17:51, Mathieu Lirzin <mathieu.lir...@nereide.fr> wrote:

> Hello Jacques,
>
> Jacques Le Roux <jacques.le.r...@les7arts.com> writes:
>
> > Le 10/04/2018 à 11:05, Mathieu Lirzin a écrit :
> >>
> >> I have recently started a 5 month internship at Néréide
> >> <https://nereide.fr/> during which I will work on implementing a
> >> HTTP based API using REST architectural style for OFBiz.  Nicolas
> >> Malin will be my mentor during this internship.
> >
> > It's great to see this initiative. For months, if not years, I have a
> > Firefox REST tab groups with 35 tabs I collected.
> >
> > I have not yet completely re-read all the references but I'll and will
> > come back if I have something to add.
>
> Here is a subset of the materials I have already read/seen:
>
> - Roy Fielding. 'Architectural styles and the design of network-based
>   software architectures'. Addison-Wesley. University of California,
>   Irvine Doctoral dissertation . 2000
>   https://www.ics.uci.edu/~fielding/pubs/dissertation/
> fielding_dissertation.pdf
>
> - Roy Fielding et Richard Taylor 'Principled design of the modern Web
>   architecture'. ACM Transactions on Internet Technology (TOIT), 2002,
>   vol. 2, no 2, p. 115-150.
>   https://www.ics.uci.edu/~taylor/documents/2002-REST-TOIT.pdf
>
> - Roy T. Fielding . 'REST APIs must be hypertext-driven'. Untangled
>   musings of Roy T. Fielding (2008): 24.
>   http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven
>
> - Stefan Tilkov 'REST: I don't Think it Means What You Think it Does'
>   https://www.infoq.com/presentations/rest-misconceptions Mach 2015.
>
> > For now I simply wanted to give you this link which I think can be
> > useful https://www.owasp.org/index.php/REST_Security_Cheat_Sheet
>
> Indeed the security aspects are important, I will take a look.
>
> Thanks for your feedback.
>
> --
> Mathieu Lirzin
> GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37
>



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: svn commit: r1827439 - /ofbiz/ofbiz-framework/trunk/framework/common/servicedef/services.xml

2018-03-26 Thread Paul Foxworthy
Hi Jacques,

On 27 March 2018 at 08:16, Jacques Le Roux <jacques.le.r...@les7arts.com>
wrote:

> What makes you think that Tomcat SSO depends on servlet4preview?
>

Only your words

"So when James introduced Tomcat SSO and optionally passed a
javax.servlet.http.HttpServletRequest to the userLogin service it did not
break.
But when I removed HttpServletRequestWrapper from ContextFilter it popped
up".

In the the analysis I did for https://issues.apache.org/jira
> /browse/OFBIZ-10304 I only found that using Tomcat 8.5 (hence
> servlet4preview) we no longer can pass a standard HttpServletRequest  or
> HttpServletResponse with current code. Did you find something else?


No.

 If we now say OFBiz requires Servlet 4.0 and move to Tomcat 9, could we
>> then use the
>> standard HttpServletRequest?
>>
> Yes, that would remove the problem and is IMO the best solution.
>

I hadn't read through OFBIZ-9833 until this morning. My understanding is
now:

- Tomcat SSO is a red herring. It can be implemented with
HttpServletRequest. As you say, it doesn't need Servlet 4 or the
servlet4preview
package.

- HttpServletRequestWrapper implements HttpServletRequest anyway, so
whether we use it or not shouldn't affect services that want
HttpServletRequest.

- The crux of the problem is a one-generation type check in the OFBiz
service input checking, which uses Class.getInterfaces(). If a class
implements a derived interface, the service type checking
doesn't detect that an object of that class is compatible with the base
interface of the derived one.

One-generation type checking is not foolproof, but probably faster than
using recursion to search for base interfaces. OFBiz has been happily
running for years without a multi-generation type check. I like Scott's
idea: for the tiny fraction of services that accept HttpServletRequest,
define the type as Object with a custom validation method. We can probably
revert to HttpServletRequest with Tomcat 9, but that is a bigger and more
disruptive change.

Cheers

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788 <+61%203%209585%206788>
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Separation database for inventory module

2018-03-24 Thread Paul Foxworthy
On 25 March 2018 at 01:58, Rishi Solanki <rishisolan...@gmail.com> wrote:


> Register new group in entityengine.xml with new name and data resource;
>
>  datasource-name="yourDataResourceName"/>
>
> Add new data resource entry in the entityengine.xml like we have many. In
> your case entityengine will contains two entry as localmysql and
> localmysql2 (or any name you prefer).
> Now register all the entities with "your.group.name" in entity-group.xml.
>
> Refer  datasource-name="localderbytenant"/> and related entries for more details.
>

Thanks Rishi.

If you do define a new group, does that mean:

- any transaction that modifies entities in two different groups will be
slower as the transaction must be a distributed transaction with two-phase
commit? To put it another way, with good design decisions, entity groups
may well give you  faster reads, but writes very likely won't be?
- Foreign key constraints and thus guaranteed referential integrity might
not be possible between groups because not all DBMSes support FKs that
refer to another database?

Thanks

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: svn commit: r1827439 - /ofbiz/ofbiz-framework/trunk/framework/common/servicedef/services.xml

2018-03-24 Thread Paul Foxworthy
Hi all,

The servlet4preview package in Tomcat 8.5 "provides early access to some of
the features of Servlet 4.0" (
https://tomcat.apache.org/tomcat-8.5-doc/api/org/apache/catalina/servlet4preview/package-summary.html
).

Does use of this package make OFBiz dependent on a preview version, and if
so is that a good idea? Should features that use some preview (like support
for Tomcat SSO, it appears) be contained in a branch or plugin until the
API has been stabilised?

Tomcat 9 was released in January, with support for Servlet 4.0. If we now
say OFBiz requires Servlet 4.0 and move to Tomcat 9, could we then use the
standard HttpServletRequest?

Thanks

Paul Foxworthy


On 25 March 2018 at 04:49, Scott Gray <scott.g...@hotwaxsystems.com> wrote:

> So to summarize your long email ;-)
>
> "The service engine has a limitation in that it only checks the interfaces
> directly implemented by the object being tested.  Tomcat's RequestFacade
> doesn't directly implement javax.servlet.http.HttpServletRequest so it
> fails to pass the type validation."
>
> On the surface your suggested fix looks fine to me, my only concern being
> that we may need to do some performance testing.  For every service that
> specifies an interface we'll now be checking the full type hierarchy which
> I imagine will be more expensive but I'm not sure how expensive.
>
> I'm also not even sure if our custom ObjectType methods for checking this
> type of thing are necessary any more with so many new java versions since
> it was decided these were needed for performance reasons.
>
> Regards
> Scott
>
> On 24 March 2018 at 10:59, Jacques Le Roux <jacques.le.r...@les7arts.com>
> wrote:
>
> > Le 23/03/2018 à 17:09, Scott Gray a écrit :
> >
> >> I don't need to try anything, I *know* that the service engine is
> supposed
> >> to accept a concrete class of an interface if the interface is specified
> >> as
> >> the attribute type.
> >>
> >> Either the service engine is broken by not accepting concrete
> >> implementations, or the bug report is incorrect.
> >>
> > Neither, it's "unfortunate", and a bit complicated.
> >
> > Tomcat servlet4preview was introduced with Tomcat 8.5
> > https://tomcat.apache.org/tomcat-8.5-doc/api/org/apache/cata
> > lina/servlet4preview/package-summary.html
> >
> > Before James introduced Tomcat SSO, we had only one service passing a
> > javax.servlet.http.HttpServletRequest to a service:
> payPalCheckoutUpdate.
> >
> > AFAIK, we have actually always passed a org.apache.catalina.connector.
> RequestFacade
> > to services when asking for javax.servlet.http.HttpServletRequest in
> > services definition.
> > Since Tomcat 8.5 RequestFacade implements javax.servlet.http.
> HttpServletRequest
> > indirectly through org.apache.catalina.servlet4pr
> > eview.http.HttpServletRequest
> > https://tomcat.apache.org/tomcat-8.5-doc/api/org/apache/cata
> > lina/connector/RequestFacade.html
> >
> > Since we have no tests on the payPalCheckoutUpdate service we did not
> spot
> > that Tomcat servlet4preview was introduced with Tomcat 8.5
> >
> > The classes check is done by the deeper interfaceOf() method of the
> > ObjectType class using Class.getInterfaces()
> > https://docs.oracle.com/javase/8/docs/api/java/lang/Class.
> > html#getInterfaces--
> > Class.getInterfaces() does not recurse and stops at one level up. So in
> > case of RequestFacade it returns only servlet4preview.http.
> HttpServletRequest
> > and not javax.servlet.http.HttpServletRequest
> > So when interfaceOf() compares the Classes it fails.
> >
> > What happened with my introduction of the HttpServletRequestWrapper in
> > ContextFilter is it hid the RequestFacade because
> HttpServletRequestWrapper
> > implements javax.servlet.http.HttpServletRequest
> > https://docs.oracle.com/javaee/7/api/javax/servlet/http/
> > HttpServletRequest.html
> >
> > So when James introduced Tomcat SSO and optionally passed a
> > javax.servlet.http.HttpServletRequest to the userLogin service it did
> not
> > break.
> > But when I removed HttpServletRequestWrapper from ContextFilter it popped
> > up
> >
> > Summary: it's unfortunate because we have no tests on the
> > payPalCheckoutUpdate service.
> > Because I temporarily introduced HttpServletRequestWrapper James was able
> > to pass a javax.servlet.http.HttpServletRequest, like in
> > payPalCheckoutUpdate.
> > When I reverted (removed HttpServletRequestWrapper  from ContextFilter) I
> > discovered that we had a problem with Tomcat

Re: Welcome Paul Foxworthy as a new PMC member

2018-03-22 Thread Paul Foxworthy
On 22 March 2018 at 16:27, Jacques Le Roux 
wrote:

> Though it's not the official page, you might want to change
>
> https://cwiki.apache.org/confluence/display/OFBIZ/Apache+
> OFBiz+PMC+Members+and+Committers


Yes, a good idea. I've done that now.

Thanks Jacques.

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Welcome Paul Foxworthy as a new PMC member

2018-03-21 Thread Paul Foxworthy
Thanks everyone!

Cheers

Paul Foxworthy

On 22 March 2018 at 03:25, Michael Brohl <michael.br...@ecomify.de> wrote:

> Good to have you on board, Paul. Congratulations!
>
> Regards,
>
> Michael
>
>
> > Am 21.03.2018 um 09:42 schrieb Jacopo Cappellato <
> jacopo.cappell...@gmail.com>:
> >
> > The OFBiz PMC has invited Paul Foxworthy to become a new member of the
> > committee and we are glad to announce that Paul has accepted the
> nomination.
> >
> > Welcome on board Paul!
> >
> > Jacopo Cappellato (on behalf of the OFBiz PMC)
>
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Separation database for inventory module

2018-03-19 Thread Paul Foxworthy
Hi Jaya,

As you've just shown, inventory data is interconnected with many other
things. If you were to proceed with this, I doubt it could be contributed
to the OFBiz project.

If you want to integrate OFBiz with other data in other databases, have you
considered database replication to synchronise OFBiz inventory data with an
external database?

If the problem is that inventory data could get very large and you want to
manage separate storage for it, have you considered using a DBMS that
provides partitioned tables?

Cheers

Paul Foxworthy


On 20 March 2018 at 02:23, Rajesh Mallah <mallah.raj...@gmail.com> wrote:

> Hello Jaya ,
>
> Could you consider hinting why you would want certain entities in a
> separate database?
> What are you trying to achieve?
>
> regds
> mallah.
>
>
> On Mon, Mar 19, 2018 at 8:23 PM, jayachandr...@gmail.com <
> jayachandr...@gmail.com> wrote:
>
> > Hi All,
> >
> > In Ofbiz I  want to  create separate database for inventory module with
> > dependency tables like InentoryItem & so on. I don't see any issue
> foreign
> > key relations between dependency tables(like product, order related) but
> i
> > see the view entities are using many places in application hence some of
> > the inventory process may breaks.
> >
> > Appreciate the response/solution for this. Thanks for advance.
> >
> > Below are the tables list and view entity list.
> >
> > Inventory Entities
> > ---
> >
> > InventoryItem
> > InventoryItemDetail
> > InventoryItemAttribute
> > InventoryItemStatus
> > InventoryItemTempRes
> > InventoryItemType
> > InventoryItemTypeAttr
> > InventoryItemVariance
> > InventoryTransfer
> > OldOrderItemInventoryRes
> > PhysicalInventory
> > InventoryItemLabel
> > InventoryItemLabelAppl
> > InventoryItemLabelType
> > OrderItemShipGrpInvRes
> >
> >
> > View Entity with depenndencies
> > 
> >
> > OrderHeaderItemAndInv(Not in use)
> > MemberEntity
> > -
> > OrderHeader
> > OrderItem
> > OrderItemShipGrpInvRes
> > OrderHeaderItemAndInvRoles(Not in use)
> > MemberEntity
> > -
> > OrderHeader
> > OrderItem
> > OrderRole
> > OrderItemShipGrpInvRes
> >
> > OrderItemAndShipGrpInvResAndItem - Using to calculation  time of
> inventory
> > MemberEntity
> > 
> > OrderItem
> > OrderItemShipGrpInvRes
> > InventoryItem
> >
> > OrderItemAndShipGrpInvResAndItemSum - Packing time using in ofbiz
> > MemberEntity
> > 
> > OrderItem
> > OrderItemShipGrpInvRes
> > InventoryItem
> >
> > OrderItemShipGrpInvResAndItem - Reserve time usage in ofbiz
> > MemberEntity
> > 
> > InventoryItem
> > OrderItemShipGrpInvRes
> >
> > ProductInventoryItem - Prouction usage
> > MemberEntity
> > 
> > Product
> > InventoryItem
> >
> > ProductInventoryItemAndItemIssuance
> > MemberEntity
> > 
> > Product
> > InventoryItem
> > ItemIssuance
> >
> > ItemIssuanceAndInventoryItem
> > MemberEntity
> > 
> > ItemIssuance
> > InventoryItem
> > ItemIssuanceInventoryItemAndProduct
> > MemberEntity
> > 
> > ItemIssuance
> > InventoryItem
> > Product
> >
> > ProductInventoryItemAndItemIssuance
> > MemberEntity
> > 
> > Product
> > InventoryItem
> > ItemIssuance
> >
> > InventoryItemAndDetail
> > MemberEntity
> > 
> > InventoryItem
> > InventoryItemDetail`
> >
> > WorkEffortAndInventoryAssign
> > MemberEntity
> > 
> > InventoryItem
> > WorkEffortInventoryAssign
> > WorkEffortAndInventoryProduced`
> > MemberEntity
> > 
> > WorkEffortInventoryProduced
> > InventoryItem
> >
> >
> >
> >
> >
> > Facility Related Entities
> > ---

Re: support for schema , ofbiz database , ofbiz olap database specification in tenant_data_source

2018-03-12 Thread Paul Foxworthy
On 13 March 2018 at 13:12, Rajesh Mallah <mallah.raj...@gmail.com> wrote:


> I was not suggesting to use schemas  in general for for accommodating
> tenants.
> Each tenant can reside in its own dedicated DB.
>
> When we use OFBiz as a part of some application that has other relational
> data as well, then schema partitioning comes handy.
>
> Eg, The OFBiz data lies in its own schema say 'ofbiz'  and the other
> application data lies in another schema say 'general' or 'app' etc. it
> makes utilizing
> ofbiz.*  and general.* tables easier. It allows close integration of
> applications with
> OFBiz.
>
> As far as other DBs are concerned that do not have same notion of schema,
> the feature can be done on an optional basis (ie controlled by the args) ,
>  i guess the current form of entityengine.xml is already doing it i.e,
> handling diverse DBs and supporting (Pg) schema at the same time.
>
> Also the DBname specification is currently embedded in the jdbc_uri , if we
> can have an option for specifying / overriding the 2 kinds of DBs
> (org.apache.ofbiz
> and org.apache.ofbiz.olap) while creating a tenant it shall allow to use
> existing DBs.
>
> This shall be very handy for migrations /  consolidation of DBs in
> enterprise environments.
>

Hi Rajesh,

OK, thanks.

I agree it would be useful to have the database name as a separate logical
thing rather than embedded in the URI.

Integrating two applications and two schemas within one database might be
the best. But managing permissions gets tricky - each application would
have its own security management, and yet requires some access to the other
application's data, even if read-only. It would be difficult to scale one
application independently of the other using a cluster or some other
technique. Have you considered using XML-RPC services instead?

Cheers

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Listing All Menu Items

2018-03-12 Thread Paul Foxworthy
Hi Craig,

The major menu items correspond to major entities in the data model (Party,
Product, Facility and so on). But many of the menu items are verbs and the
entities are nouns.

To explore the data model:

Read the Data Model Resource Books, especially volume 1.
https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Related+Books#OFBizRelatedBooks-TheDataModelResourceBook,Volumes1,2&3
  http://isbn.nu/9781118082324

Download the Big Book of Apache OFBiz Data Model from
https://cwiki.apache.org/confluence/display/OFBIZ/Data+Model+Diagrams

Use the Web Tools to explore the entities and the data. On the demo site,
start at https://demo-trunk.ofbiz.apache.org/webtools/control/entitymaint .

Cheers

Paul Foxworthy


On 13 March 2018 at 07:00, Craig Parker <cr...@fossfolks.com> wrote:

> I'm not a dev, so a lot of what you had me read wasn't clear. I am
> familiar with MySQL though. These menu "sub items" aren't listed in the db
> anywhere? I'm looking manually now in my servers information_schema db, but
> if you know how to save me looking through a gazillion column names, I'm
> all ears. :) If you can't, no biggie. I'd just hate to look all this time
> and find out in the end that they're not there.
>
>
>
> On 03/12/2018 01:47 PM, Deepak Dixit wrote:
>
>> Hi Craig,
>>
>> Please have a look at LoginWorker.getAppBarWebInfos and ComponentConfig.
>> getAppBarWebInfos method.
>> For reference you can have a look at themes/flatgrey/template/AppBar.ftl
>>
>> Thanks & Regards
>> --
>> Deepak Dixit
>> www.hotwaxsystems.com
>> www.hotwax.co
>>
>> On Mon, Mar 12, 2018 at 9:56 PM, Craig Parker <cr...@fossfolks.com>
>> wrote:
>>
>> I'm running a clean slate install on MySQL, and trying to locate the main
>>> OFBiz menu. Looks like there's a db named ofbiztenant with a table called
>>> COMPONENT, and that appears to have at least the top level menu items.
>>> Where are the others?
>>>
>>> Nothing official, but I'm trying to make a spreadsheet or something I can
>>> print out for myself so that I can keep track of things going on in each
>>> part of the software. I don't see the big picture yet, and I'm hoping
>>> this
>>> might help. :)
>>>
>>>
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: support for schema , ofbiz database , ofbiz olap database specification in tenant_data_source

2018-03-12 Thread Paul Foxworthy
Hi Rajesh,

Schemas are not available in all databases. In MySQL/MariaDB, schemas and
databases are the same thing, or if you like, a database has exactly one
schema. So any work to take advantage of schemas in other DBMSes should not
break in those that don't support them.

Even if you did use schemas where possible, e.g. in Postgres, in a very
large situation with many tenants, might you want to partition so a given
database has some maximum number of tenants? So you might not escape
cross-database joins altogether.

Cheers

Paul Foxworthy


On 13 March 2018 at 03:41, Rajesh Mallah <mallah.raj...@gmail.com> wrote:

> Hi ,
>
> I felt the need for using a specific schema of an existing databases for
> holding tenant data.
> I eventually achieved the objective by updating the jdb_uri column of the
> tenant_data_source
>
> Currently the command  for creating new Tenant is :
>
> ./gradlew createTenant -PtenantId=tenant001
> -PtenantName="My Tenant 001" -PdomainName=tenant001.example.com
> -PtenantReaders=seed,seed-initial,ext
> -PdbPlatform=P -PdbIp=127.0.0.1
> -PdbUser=ofb_tenant001
> -PdbPassword=ofbiz@tenant
>
>
> This creates following data sources in tenant_data_source table.
>
> -+
> tenant_id | tenant001
> entity_group_name | org.apache.ofbiz
> jdbc_uri  | jdbc:postgresql://127.0.0.1/ofbiz_tenant001
> jdbc_username | ofb_tenant001
> jdbc_password | ofbiz@tenant
>  -[ RECORD 2 ]-+
> tenant_id | tenant001
> entity_group_name | org.apache.ofbiz.olap
> jdbc_uri  | jdbc:postgresql://127.0.0.1/ofbizolap_tenant001
> jdbc_username | ofb_tenant001
> jdbc_password | ofbiz@tenant
>
> -
>
> I feel IF the *command* and entity *TenantDataSource* are extended to
> allow specification of *database *and *database-schema * it shall
> be very useful in certain use cases.
>
>
> schemas in databases allow a level of compartmentalization between
> database and tables . The advantage of having schema over separate
> databases
> is that it allows joining of tables across schemas whereas cross database
> joins are not supported well in many databases.
>
> In current use case I had housed the ofbiz entities in a schema of a
> database
> and utilized the  schema-name attribute of  element in
> entityengine.xml. In the same database other schema was being used to
> store non-OFBiz custom entities.
>
> Since current tenant_data_source does not allows specification of schema
>
> it shall be difficult to use that dataset as a part of multi-tenant setup.
>
> Fortunately PostgreSQL supports a feature that i used to
> work-around and deal with this situation. PgSQL allows to set a config
> parameter at per user level.This feature can be exploited set set the
> 'search_path' of a given user so that a user "sees" only that schema in DB.
>
> given the fact that  allows specification of schema
> and DB in entityengine.xml i feel it should be possible.
>
>
> regds
> mallah.
>



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: OFBiz in cluster, load balance, different availability zones

2018-03-07 Thread Paul Foxworthy
Hi Sergei,

On 7 March 2018 at 23:58, biletni...@gmail.com <biletni...@gmail.com> wrote:


> Maybe someone knows the reason why we use externalLoginKey and why not to
> use cookie only?
>

My guess: your users can turn cookies off. So if you rely on them, you
risk the application breaking for reasons beyond your control.

It would be better if the OFBiz uses cookies if available, and falls back
to key-in-URL only if necessary, but that would take additional work to
implement.

Cheers

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: OFBiz in cluster, load balance, different availability zones

2018-03-07 Thread Paul Foxworthy
On 7 March 2018 at 17:53, Michael Brohl <michael.br...@ecomify.de> wrote:

> How does an in-memory database like Redis hel with the setup of
> clustering/load balancing?
>

Hi Michael,

I think that was for non-sticky sessions.

Cheers

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [Discussion] Creating a unified service-library component

2018-03-07 Thread Paul Foxworthy
On 7 March 2018 at 16:57, Taher Alkhateeb <slidingfilame...@gmail.com>
wrote:


> Yeah I am proposing one big component to house all services. The reason is
> that it makes no sense in separating them because they are tightly coupled
> and depend on each other heavily (because they share the full data model)
>
> As I mentioned in my first email, we can perhaps create a new component and
> call it "service-library". Inside this component we follow a similar
> pattern to the datamodel component in organizing the files.
>
> To me the big win out of this move is that all the complexity we have right
> now in figuring out the dependencies between components almost completely
> goes away. Remember that big spaghetti diagram in the wiki for component
> dependencies? We get rid of that.
>
> Did I understand your question correctly and WDYT?
>

You did understand correctly and I think I agree.

Would there be folders for human understanding and some organisation, but
without them defining separate components?

Thanks

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [Discussion] Creating a unified service-library component

2018-03-06 Thread Paul Foxworthy
Thanks Taher, I agree with your idea.

I agree that most services can and should be decoupled from user
interfaces. As you say if a service exists only to support a UI, it can
stay with the UI component. Services that only make sense to support AJAX
calls would be one example.

If most services move somewhere else, should there be one monolithic
component, or several? So where we now have accounting, content and so on,
would we have accounting-ui, accounting, content-ui, content and so on?
Possibly accounting-services, accounting-ui etc, but -services is
long-winded and I think not very useful.

Cheers

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [Discussion] Creating a unified service-library component

2018-03-04 Thread Paul Foxworthy
On 5 March 2018 at 00:45, Taher Alkhateeb <slidingfilame...@gmail.com>
wrote:


> I think If you look at both the "data model" and "services" in OFBiz
> you will notice the following:
>
> - They are highly coupled and everything is connected to everything
> (orders, parties, work efforts, contents, etc ...)
> - Some services and entity models are component-specific and do not
> belong to the generic data models and services.
>
> So what does that mean? It means in order to achieve real flexibility
> and a clean architecture, perhaps we need to separate our data model
> and services from the rest of the components in the system, and we
> already did this with the datamodel component.
>
> So I propose creating a new component, perhaps calling it
> "service-library" that houses all "generic" services that operate on
> the "generic" data model. I propose we implement this new component as
> follows:
>
> - Slowly move services (one at a time) from components to this central
> library, cleaning and refactoring as we move.
> - Migrate any minilang services to another engine while moving
> (groovy, entityauto, etc ...)
> - Keep any services that are component-specific and do not operate on
> the generic data model in the component
>
> What do you think? Do you agree with the general idea? Can we do this
> in a better way? Anyone interested in helping out?
>

Hi Taher,

It is the nature of a business process to cross many functional areas. To
fulfil an order, we might need to commission manufacturing involving people
and equipment, order from suppliers, manage inventory, schedule shipments
and create accounting records.

What proportion of services do you think would turn out to be generic?

Any OFBiz implementor can add SECAs which cross component boundaries, when
the original design of a service did not anticipate that. Do we still want
to allow that? If so, the split between "generic" and "component-specific"
is only approximate, and adding SECAs will blur the distinction.

If most services move to be generic, there will be one component with many
tightly-coupled services, and we'll have lost some partitioning and
organisation. So will we have gained anything?
Could we think of services as being partitioned into components only for
the purpose of rough categorisation and human understanding, and for no
technical or communication reason?

If a component-specific service is modified to be slightly more complex or
general, so it now interacts with generic services or services in other
components, does that mean it should move to be generic? As we extend OFBiz
to be more capable, would there be a drift of services from one component
to generic?

Would a better approach be to reduce the number of entry points between
components, to better manage and understand the critical services that are
called by other components? In other words, is there the possibility of
encapsulation, so many simpler services are only used within one component,
while others are larger in scope? To take that a step further, could your
idea of generic services turn out to be big cross-component business
processes, which *only* call into smaller services within several
components, and contain no business logic of their own?

TIA

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Are tests failing for createAcctgTransForPurchaseInvoice and createAcctgTransForCustomerReturnInvoice?

2018-02-19 Thread Paul Foxworthy
On 20 February 2018 at 00:48, Jacques Le Roux 
wrote:

> It could be related with Paul's last commit r1824740. I see a lot of error
> at https://ci.apache.org/projects/ofbiz/logs/trunk/framework/html/


Hi Jacques,

I see 100% pass when I look there. If you are seeing failing tests, can you
give me more details?

Thanks

Paul

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: MD5 removing?

2018-02-15 Thread Paul Foxworthy
Thanks Jacques.

I bet it is the OpenSSL syntax which is documented here:
https://www.openssl.org/docs/man1.0.2/apps/ciphers.html .

Cheers

Paul Foxworthy


On 16 February 2018 at 01:43, Jacques Le Roux <jacques.le.r...@les7arts.com>
wrote:

> Done with OFBIZ-10223
>
> Jacques
>
>
>
> Le 15/02/2018 à 15:32, Jacques Le Roux a écrit :
>
>> Thanks Paul,
>>
>> It did not occur to me that the ! in MD5 was to prevent the use of MD5 :)
>>
>> I must say that the syntax is not explained in Tomcat doc (or at least I
>> could not find it, even Googling everywhere)
>>
>> Anyway I tried https://www.ssllabs.com/ssltest/analyze.html?d=demo-trunk.
>> ofbiz.apache.org
>>
>> And I can confirm that MD5 and the other weak ciphers are not used and we
>> are safe (good results and a 90% for ciphers)
>>
>> About using Tomcat default, yes I plenty agree and that's what I wanted
>> to do initially but did not because did not understand the ! meaning
>>
>> I'd do that in trunk and backport
>>
>> Cheers
>>
>> Jacques
>>
>>
>> Le 14/02/2018 à 07:00, Paul Foxworthy a écrit :
>>
>>> Hi Jacques,
>>>
>>> Doesn't the !MD5 mean Tomcat and OFBiz's default configuration is to
>>> *not*
>>> allow MD5 even if a client requests it? So I think we're OK already.
>>>
>>> Is it possible for us to leave out the ciphers property from OFBiz
>>> altogether, so Tomcat's default rules would come into play, and as they
>>> evolve over time OFBiz would naturally track them, without us having to
>>> maintain our own copy?
>>>
>>> Cheers
>>>
>>> Paul Foxworthy
>>>
>>>
>>> On 14 February 2018 at 00:03, Jacques Le Roux <
>>> jacques.le.r...@les7arts.com>
>>> wrote:
>>>
>>> Hi,
>>>>
>>>> Following a recent "distribution policy : make .md5 optional" thread at
>>>> us...@infra.apache.org and looking at https://en.wikipedia.org/wiki/MD5
>>>>
>>>> "Although MD5 was initially designed to be used as a cryptographic hash
>>>> function <https://en.wikipedia.org/wiki/Cryptographic_hash_function>,
>>>> it
>>>> has been found to suffer from extensive vulnerabilities. It can still be
>>>> used as a checksum <https://en.wikipedia.org/wiki/Checksum> to verify
>>>> data integrity <https://en.wikipedia.org/wiki/Data_integrity>, but only
>>>> against unintentional corruption."
>>>>
>>>> I was wondering so I checked and we no longer use MD5 anywhere but for
>>>> last usable ciphers in Catalina ofbiz-component.xml
>>>>
>>>> I copied that recently from [1] and read now at [2] that MD5 is still
>>>> used, though still almost at the end of the possible default ciphers.
>>>>
>>>> I also read at [3] "HOW TO -- Disable weak ciphers in Tomcat 7 & 8" how
>>>> to
>>>> used only nowadays reliable ciphers
>>>>
>>>> Maybe we could ask Tomcat user ML for advice, but reading
>>>> https://wiki.apache.org/tomcat/Security/Ciphers it seems it's a
>>>> tradeoff
>>>> and we will get the same answer from the ML.
>>>>
>>>> What are your opinions? Should we follow [3] suggestion or let it as is
>>>> OOTB and just warn users about that in a comment? Note that [4] is
>>>> really
>>>> complete and interesting, MD5 as a cypher is not recommended there.
>>>>
>>>> [1] http://tomcat.apache.org/tomcat-8.0-doc/config/http.html
>>>>
>>>> [2] http://tomcat.apache.org/tomcat-8.5-doc/config/http.html
>>>>
>>>> [3] https://s.apache.org/h2vH
>>>>
>>>> [4] https://wiki.mozilla.org/Security/Server_Side_TLS
>>>>
>>>> Jacques
>>>>
>>>>
>>>
>>>
>>
>>
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: MD5 removing?

2018-02-13 Thread Paul Foxworthy
Hi Jacques,

Doesn't the !MD5 mean Tomcat and OFBiz's default configuration is to *not*
allow MD5 even if a client requests it? So I think we're OK already.

Is it possible for us to leave out the ciphers property from OFBiz
altogether, so Tomcat's default rules would come into play, and as they
evolve over time OFBiz would naturally track them, without us having to
maintain our own copy?

Cheers

Paul Foxworthy


On 14 February 2018 at 00:03, Jacques Le Roux <jacques.le.r...@les7arts.com>
wrote:

> Hi,
>
> Following a recent "distribution policy : make .md5 optional" thread at
> us...@infra.apache.org and looking at https://en.wikipedia.org/wiki/MD5
>
> "Although MD5 was initially designed to be used as a cryptographic hash
> function <https://en.wikipedia.org/wiki/Cryptographic_hash_function>, it
> has been found to suffer from extensive vulnerabilities. It can still be
> used as a checksum <https://en.wikipedia.org/wiki/Checksum> to verify
> data integrity <https://en.wikipedia.org/wiki/Data_integrity>, but only
> against unintentional corruption."
>
> I was wondering so I checked and we no longer use MD5 anywhere but for
> last usable ciphers in Catalina ofbiz-component.xml
>
> I copied that recently from [1] and read now at [2] that MD5 is still
> used, though still almost at the end of the possible default ciphers.
>
> I also read at [3] "HOW TO -- Disable weak ciphers in Tomcat 7 & 8" how to
> used only nowadays reliable ciphers
>
> Maybe we could ask Tomcat user ML for advice, but reading
> https://wiki.apache.org/tomcat/Security/Ciphers it seems it's a tradeoff
> and we will get the same answer from the ML.
>
> What are your opinions? Should we follow [3] suggestion or let it as is
> OOTB and just warn users about that in a comment? Note that [4] is really
> complete and interesting, MD5 as a cypher is not recommended there.
>
> [1] http://tomcat.apache.org/tomcat-8.0-doc/config/http.html
>
> [2] http://tomcat.apache.org/tomcat-8.5-doc/config/http.html
>
> [3] https://s.apache.org/h2vH
>
> [4] https://wiki.mozilla.org/Security/Server_Side_TLS
>
> Jacques
>



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Invoice Item type copied into GL Account type?

2018-02-08 Thread Paul Foxworthy
Once again I find Kongrath has been ahead of us. See
https://issues.apache.org/jira/browse/OFBIZ-6722



-
--
Coherent Software Australia Pty Ltd
http://www.coherentsoftware.com.au/

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/

--
Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-Dev-f165671.html


Re: Changing per-install categories in production deployment.

2018-01-29 Thread Paul Foxworthy
Hi Julian,

There isn't a screen in OFBiz to create new PaymentMethodTypes. For most
people, the values in the seed data are OK.

You could use the Web Tools:

https://demo-trunk.ofbiz.apache.org/webtools/control/ViewGeneric?entityName=PaymentMethodType=true

or you could import a value or values using the XML Import tool:

https://demo-trunk.ofbiz.apache.org/webtools/control/EntityImport

This question is probably better on the user mailing list, dev is more for
the development of the internals of OFBiz.

Cheers

Paul Foxworthy


On 29 January 2018 at 08:15, Julian Smith <julian.sm...@blockfreight.com>
wrote:

> How does a technical (developer) user change these key/value paid in
> production code?
>
> <>/accounting/control/editPaymentMethodType
>



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Jira blocker priority used for release

2018-01-27 Thread Paul Foxworthy
Hi Jacques

Blocker - the fault stops the system itself from starting or working. It
simply *must* be fixed as soon as possible. The system cannot be released
in this state.
Critical - A feature of critical importance is faulty. A workaround is
possible, or a quick fix could be applied after release. While you usually
would not release with a critical fault present, it's conceivable.

https://stackoverflow.com/questions/2469178/how-do-you-define-the-severity-critical-high-low-etc-of-bugs

Cheers

Paul


On 21 January 2018 at 23:36, Jacques Le Roux 
wrote:

> Done,
>
> I wonder when we should recommend to use Critical, any ideas?
>
> Jacques
>
>
> Le 15/01/2018 à 11:04, Jacques Le Roux a écrit :
>
>>
>> Hi,
>>
>> The Jira blocker status can be used when something really blocks OFBiz to
>> start. There are certainly other cases where it can be used. I propose a
>> peculiar one: when an issue blocks a release.
>>
>> That's why I changed the status of OFBIZ-10012
>>
>> If we agree I'll document that in our "OFBiz Committers Roles and
>> Responsibilities > luence/display/OFBIZ/OFBiz+Committers+Roles+and+Responsibilities>" page
>>
>> Jacques
>>
>
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [Discussion] documentation framework for OFBiz

2018-01-27 Thread Paul Foxworthy
On 26 January 2018 at 19:53, Michael Brohl <michael.br...@ecomify.de> wrote:


> with a small modification: I don't think we'll need a two-folder structure
> /docs/asciidoc, only /docs should be sufficient, no?
>

Hi Michael,

We have streamlined the build system in other places by having folders for
the source language: groovyScripts, minilang, src/main/java .

It means Groovy and other build tools can have default rules for what to do
with the contents of a language folder, and allows for the possibility of
other languages in future if necessary.

The extra layer is only a minor nuisance. I think I'd prefer to keep it.
What do you see as the disadvantages?

Cheers

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Adding new company detail. ?

2018-01-22 Thread Paul Foxworthy
Hi Julian and Jacques,

Problem was sequence numbers were too low after an import of data. Should
be fine now.

Cheers

Paul Foxworthy


On 22 January 2018 at 19:39, Jacques Le Roux <jacques.le.r...@les7arts.com>
wrote:

> Le 22/01/2018 à 09:35, Julian Smith a écrit :
>
>> The Following Errors Occurred:
>>
>> Exception thrown while creating the "newValue" GenericValue:
>> org.apache.ofbiz.entity.GenericEntityException: Error while inserting:
>> [GenericEntity:ContactMech][contactMechId,10002(java.lang.
>> String)][contactMechTypeId,WEB_ADDRESS(java.lang.String)][
>> createdStamp,2018-01-22
>> 19:30:51.839(java.sql.Timestamp)][createdTxStamp,2018-01-22
>> 19:30:51.788(java.sql.Timestamp)][infoString,https://blockfreight.com
>> (java.lang.String)][lastUpdatedStamp,2018-01-22 19:30:51.839(java.sql.
>> Timestamp)][lastUpdatedTxStamp,2018-01-22 19:30:51.788(java.sql.Timestam
>> p)]
>> (SQL Exception while executing the following:INSERT INTO CONTACT_MECH
>> (CONTACT_MECH_ID, CONTACT_MECH_TYPE_ID, INFO_STRING, LAST_UPDATED_STAMP,
>> LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?,
>> ?,
>> ?, ?, ?) ((conn=1857) Duplicate entry '10002' for key 'PRIMARY')) (Error
>> while inserting: [GenericEntity:ContactMech][co
>> ntactMechId,10002(java.lang.
>> String)][contactMechTypeId,WEB_ADDRESS(java.lang.String)][
>> createdStamp,2018-01-22
>> 19:30:51.839(java.sql.Timestamp)][createdTxStamp,2018-01-22
>> 19:30:51.788(java.sql.Timestamp)][infoString,https://blockfreight.com
>> (java.lang.String)][lastUpdatedStamp,2018-01-22 19:30:51.839(java.sql.
>> Timestamp)][lastUpdatedTxStamp,2018-01-22 19:30:51.788(java.sql.Timestam
>> p)]
>> (SQL Exception while executing the following:INSERT INTO CONTACT_MECH
>> (CONTACT_MECH_ID, CONTACT_MECH_TYPE_ID, INFO_STRING, LAST_UPDATED_STAMP,
>> LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?,
>> ?,
>> ?, ?, ?) ((conn=1857) Duplicate entry '10002' for key 'PRIMARY')))
>>
>> You need to give us more context, which version for instance?
>
> Jacques
>
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Tree View of Call Graph for Services and Simple Methods

2018-01-04 Thread Paul Foxworthy
On 4 January 2018 at 19:47, Jacques Le Roux <jacques.le.r...@les7arts.com>
wrote:

> I thought about that too, what about http://yaml.org/xml.html ?
>

So the point of the XML binding for YAML is that it is XML, but can be
transformed to YAML?

If the XML is the capture format, transforming to any other format would be
purely for the purpose of human readability, yes?

If so, what's the benefit of YAML compared to plain text?

Cheers

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Tree View of Call Graph for Services and Simple Methods

2018-01-03 Thread Paul Foxworthy
Hi Taher,

Yes, that had occurred to me. How about a capture format of XML and an XSLT
transform to HTML and/or plain text for human readability?

Cheers

Paul Foxworthy


On 4 January 2018 at 04:55, Taher Alkhateeb <slidingfilame...@gmail.com>
wrote:

> Hmm, I'm not sure it would be a great idea to introduce a new data
> format to OFBiz. It would mean adding new libraries to the framework
> and thus more complexity.
>
> I know XML is not the greatest data format in the world, but it is
> what OFBiz uses, and so we should always try to stay consistent in our
> approach.
>
> On Wed, Jan 3, 2018 at 1:24 PM, Jacques Le Roux
> <jacques.le.r...@les7arts.com> wrote:
> > +1 for YAML
> >
> > Jacques
> >
> >
> >
> > Le 03/01/2018 à 01:22, Paul Foxworthy a écrit :
> >>
> >> Hi James,
> >>
> >> I have been pondering something like this.
> >>
> >> I suggest the output should be in a structured format like XML, JSON or
> >> YAML, so it can be parsed by tools. Maybe YAML because it's intended to
> >> give wiki-like human readability.
> >>
> >> I suggest the ability to capture parameter values. You might make that
> >> optional, with "summary" and "verbose" options. Parameter values would
> >> only
> >> be logged if the "verbose" option is enabled.
> >>
> >> With both of these in place, one could use this to capture a series of
> >> steps to generate a reproducible unit test, or to compose existing
> >> services
> >> into a super-service.
> >>
> >> The minilang  element and its implementation might have some
> >> relevance.
> >>
> >> Cheers
> >>
> >> Paul Foxworthy
> >>
> >>
> >> On 24 December 2017 at 03:37, James Yong <jamesy...@apache.org> wrote:
> >>
> >>> Hi All,
> >>>
> >>> Would like implement a feature to log a tree view of services, simple
> >>> methods, events that are called during a request.
> >>> Something like:
> >>> -> Service A
> >>>  -> Simple Method B
> >>>  -> Service C (Async)
> >>>  -> Simple Method D
> >>>
> >>> All feedback is greatly appreciated.
> >>>
> >>> Regards,
> >>> James Yong
> >>>
> >>
> >>
> >
>



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Tree View of Call Graph for Services and Simple Methods

2018-01-02 Thread Paul Foxworthy
Hi James,

I have been pondering something like this.

I suggest the output should be in a structured format like XML, JSON or
YAML, so it can be parsed by tools. Maybe YAML because it's intended to
give wiki-like human readability.

I suggest the ability to capture parameter values. You might make that
optional, with "summary" and "verbose" options. Parameter values would only
be logged if the "verbose" option is enabled.

With both of these in place, one could use this to capture a series of
steps to generate a reproducible unit test, or to compose existing services
into a super-service.

The minilang  element and its implementation might have some
relevance.

Cheers

Paul Foxworthy


On 24 December 2017 at 03:37, James Yong <jamesy...@apache.org> wrote:

> Hi All,
>
> Would like implement a feature to log a tree view of services, simple
> methods, events that are called during a request.
> Something like:
> -> Service A
> -> Simple Method B
> -> Service C (Async)
> -> Simple Method D
>
> All feedback is greatly appreciated.
>
> Regards,
> James Yong
>



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Facility on OrderHeader

2017-12-01 Thread Paul Foxworthy
Hi Suraj,

Is there still a ship group for intangibles like services or digital
downloads?

Thanks

Paul Foxworthy


On 1 December 2017 at 19:37, Suraj Khurana <suraj.khur...@hotwaxsystems.com>
wrote:

> Hello,
>
> We can associate facility at ship group level, every SO or PO contains at
> least one ship group as well.
> Is there any other case for which we need to maintain the facility at
> OrderHeader level?
> If not, I propose we should remove it from OrderHeader level and always
> maintain it at ship group level.
>
> Please share your thoughts on this.
> --
> Thanks and Regards,
> *Suraj Khurana* | Sr. Enterprise Software Engineer
> *HotWax Commerce*  by  *HotWax Systems*
> Plot no. 80, Scheme no. 78, Vijay Nagar, Indore, M.P. India 452010
>



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [PROPOSAL] Extend returnId and shipmentId in FinAccountTrans entity

2017-11-21 Thread Paul Foxworthy
On 21 November 2017 at 21:48, Suraj Khurana <suraj.khur...@hotwaxsystems.com
> wrote:

>
> I think in this case, one *FinAccountTrans* record will be created when you
> receive a cheque payments from a customer with DEPOSIT purpose which marks
> *paymentId* in *FinAccountTrans *entity.
>

Yes, there's a paymentId in the FinAccountTrans entity. That assumes there
will be one and only one Payment for the FinAccountTrans. That assumption
is flawed to my mind. There is also a finAccountTransId in the Payment. If
we dropped the paymentId, we would have a one-to-many between
FinAccountTrans and Payment, instead of one-to-one. That would be an
improvement.

If you pay my invoice by direct deposit to my bank account, that should be
recorded with both a Payment and a FinAccountTrans in OFBiz. If you send me
a cheque, that should be recorded with a Payment. When I deposit a batch of
cheques, there should be a FinAccountTrans for that.

Think of the statement you receive from the bank and you want to reconcile
against your own records. As far as the bank is concerned, there was one
deposit of a total amount. That's the amount you want to reconcile against
your FinAccountTrans. A payment from a customer is not necessarily the same
thing or the same amount as a FinAccountTrans.

And moving further when certain amount from that payment is applied to any
> invoice, another *FinAccountTrans *will be created with corresponding
> orderId/shipmentId with WITHDRAWAL purpose.
>

Nope. I receive a payment from a customer, and deposit the money in my bank
account. Applying the payment to a sale invoice does *not* reduce my bank
balance. It does mean the invoice has been paid. There are two separate
balances: the Accounts Receivable balance in an account in my GL, and the
balance of my account with the financial institution.

The accounting transaction that varies the Accounts Receivable balance is
not a FinAccountTrans. It's an AcctgTrans.

Any shipment will already be associated with an order. Storing the
shipmentId a second time in FinAccountTrans is redundant. There may be more
than one shipment anyway, so a single shipmentId attribute in
FinAccountTrans is not enough to hold the truth and would be misleading.


> In this manner I think we can track every transaction happened with the
> *FinAccount.*
>

I do not dispute the need to track all this. Where I disagree is which
entities should be doing the tracking. Are you thinking any accounting
transaction is a FinAccountTrans? I think FinAccountTrans is more
specialised than that. A FinAccountTrans should correspond to and be
reconciled against a single line in a statement from a bank or other
financial institution.

If you want to know the order or orders for a FinAccountTrans, go

FinAccountTrans -> Payment -> PaymentApplication -> Invoice -> InvoiceItem
-> OrderItem -> OrderHeader

If you want to know the shipment or shipments for a FinAccountTrans, go

FinAccountTrans -> Payment -> PaymentApplication -> Invoice -> InvoiceItem
-> OrderItem -> ItemIssuance -> Shipment

As I said, if you know that in your organisation there will always be only
one shipment, create custom screens and views to hide that complexity. But
the entities should be able to handle more complex organisations too.

Cheers

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [PROPOSAL] Extend returnId and shipmentId in FinAccountTrans entity

2017-11-21 Thread Paul Foxworthy
Hi Suraj,

Yes, that information is valuable, and you should be able to find it. I
still don't think it all belongs in the FinAccountTrans.

You are right that a credit card payment or a store account payment will
almost certainly be for one order. But other FinAccountTrans instances will
be more complicated than that. There may be more than one reason for the
FinAccountTrans.

I might receive ten cheque payments from ten different customers. If I
deposit them in the bank all at once, that's one deposit and one
FinAccountTrans associated with ten Payments. Each payment might be for
several orders. Each order might have several shipments, and each shipment
might be invoiced separately. Each payment might have several
PaymentApplications for several Invoices. The world is more complicated,
and the right thing to do is to have separate FinAccountTrans, Payment,
PaymentApplication, Order, Shipment and Invoice entities. There are
one-to-many relationships between these.

These entities and the resulting flexibility are already there in OFBiz.
There is no harm in the simpler situation where there is only one order,
shipment, return. Well, the only harm is if your business seems simpler,
all these entities seem more complicated than you need. However, each of
the entities have distinct semantics and will be needed by some companies
implementing OFBiz.

If your organisation will only ever encounter a simpler FinAccountTrans, by
all means define a screen to prompt for only one order and so on, and a
view to bring together the FinAccountTrans and associated entities.But
please don't make the OFBiz data model less flexible than it currently is.

Cheers

Paul Foxworthy


On 21 November 2017 at 19:16, Suraj Khurana <suraj.khur...@hotwaxsystems.com
> wrote:

> Hello all,
>
> Just adding some thoughts, *FinAccount* is also used for various other
> types as well such as *STORE_CREDIT_ACCT, CREDIT_CARD_ACCOUNT *etc. and
> IMO, recording these transactions (orderId, returnId, shipmentId etc.) for
> such accounts is a valuable information to be stored to track reason behind
> every transaction.
>
> Hello Paul,
> >> So a FinAccountTrans may have several associated orders, and several
> associated
> shipments.
>
> I think every order must have a unique FinAccountTrans which is already
> available OOTB in case of *STORE_CREDIT_ACCT* or *CREDIT_CARD_ACCOUNT *
> (Not
> sure about other types)
>
> --
> Best Regards,
> *Suraj Khurana* | Sr. Enterprise Software Engineer
> *HotWax Commerce*  by  *HotWax Systems*
> Plot no. 80, Scheme no. 78, Vijay Nagar, Indore, M.P. India 452010
>
>
> On Tue, Nov 21, 2017 at 1:05 PM, Jacques Le Roux <
> jacques.le.r...@les7arts.com> wrote:
>
> > +1
> >
> > Jacques
> >
> >
> >
> > Le 21/11/2017 à 08:27, Scott Gray a écrit :
> >
> >> I agree with Paul that FinAccountTrans shouldn't reference orderId or
> >> returnId.  I have nothing to add, his reasoning is spot on.
> >>
> >> Regards
> >> Scott
> >>
> >> On 21 November 2017 at 16:56, Paul Foxworthy <p...@cohsoft.com.au>
> wrote:
> >>
> >> Hi Vaibhav,
> >>>
> >>> I'm really uncomfortable about this.
> >>>
> >>> As Pierre said, FinAccountTrans is for a transaction for a financial
> >>> account (likely a bank account), rather than a transaction on an
> account
> >>> in
> >>> the accounting sense, i.e. an account in your chart of accounts.
> >>>
> >>> So a FinAccountTrans records a deposit or withdrawal to a financial
> >>> account.
> >>>
> >>> It has a foreign key for a Payment. The Payment has related
> >>> PaymentApplications, each of which apply some of the payment to an
> >>> invoice.
> >>> An order may have one or more invoices, and an order may have one or
> more
> >>> shipments.
> >>>
> >>> So a FinAccountTrans may have several associated orders, and several
> >>> associated shipments. Wouldn't it be an oversimplification to carry one
> >>> and
> >>> only one shipmentId in a FinAccountTrans? And if there was one in
> >>> FinAccountTrans and anything in OFBiz used it, that would break the
> more
> >>> flexible data model that we have at the moment.
> >>>
> >>> By the same token, I think a FinAccountTrans should not have an orderId
> >>> either - there might be more than one.
> >>>
> >>> Am I missing something? Maybe what you really need is a view that
> >>> conveniently shows the shipment or shipments related to a
> >

Re: [PROPOSAL] Extend returnId and shipmentId in FinAccountTrans entity

2017-11-20 Thread Paul Foxworthy
Hi Vaibhav,

I'm really uncomfortable about this.

As Pierre said, FinAccountTrans is for a transaction for a financial
account (likely a bank account), rather than a transaction on an account in
the accounting sense, i.e. an account in your chart of accounts.

So a FinAccountTrans records a deposit or withdrawal to a financial account.

It has a foreign key for a Payment. The Payment has related
PaymentApplications, each of which apply some of the payment to an invoice.
An order may have one or more invoices, and an order may have one or more
shipments.

So a FinAccountTrans may have several associated orders, and several
associated shipments. Wouldn't it be an oversimplification to carry one and
only one shipmentId in a FinAccountTrans? And if there was one in
FinAccountTrans and anything in OFBiz used it, that would break the more
flexible data model that we have at the moment.

By the same token, I think a FinAccountTrans should not have an orderId
either - there might be more than one.

Am I missing something? Maybe what you really need is a view that
conveniently shows the shipment or shipments related to a FinAccountTrans .

Thanks

Paul Foxworthy


On 20 November 2017 at 23:41, Vaibhav Jain <vaibhav.j...@hotwaxsystems.com>
wrote:

> Hello all,
>
> Currently, orderId field is available and returnId, shipmentId fields can
> be introduced in the FinAccountTrans entity.
>
> These fields are useful while recording fin account transactions.
>
> Please let me know your thoughts on it.
>
> Thanks in advance
>
> Vaibhav Jain
> Hotwax Systems,
> vaibhav.j...@hotwaxsystems.com
>



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [Discussion] documentation framework for OFBiz

2017-11-09 Thread Paul Foxworthy
On 9 November 2017 at 18:26, Taher Alkhateeb <slidingfilame...@gmail.com>
wrote:


> Anyway I don't see a reason so far to use pandoc to publish to pdf.
> Asciidoctor can publish to html, docbook, pdf and others.


Thanks Taher. That's fine by me.

Cheers

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [Discussion] documentation framework for OFBiz

2017-11-08 Thread Paul Foxworthy
On 8 November 2017 at 20:33, Taher Alkhateeb 
 wrote:

> If you check the link you sent, you will notice that asciidoc is not an
> input format in pandoc, but rather an ouput format.
>

Thanks Taher,

My impression was pandoc can read just about any structured input. It's
curious AsciiDoc isn't there.

So for HTML it's

AsciiDoc -- (asciidoctor) --> HTML

and for PDF it's

AsciiDoc -- (asciidoctor) --> DocBook XML -- (pandoc) --> PDF

That sound right?

Cheers

Paul

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [Discussion] documentation framework for OFBiz

2017-11-08 Thread Paul Foxworthy
On 17 October 2017 at 20:25, Michael Brohl <michael.br...@ecomify.de> wrote:


> I assume that we can use any Asciidoc editor and need not to use
> Asciidoctor?
>

Hi Michael,

Asciidoctor is not an editor, it's a text processor that can convert
AsciiDoc to HTML or DocBook XML. So it's an alternative processor to Pandoc
(https://pandoc.org/).

One of the reasons to choose any wiki-like language (AsciiDoc, Markdown,
etc) is you can use any text editor at all. I use a nice AsciiDoc plugin
for IntelliJ IDEA. Your tastes may vary.

Cheers

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Updates to EntityQuery

2017-10-26 Thread Paul Foxworthy
Hi all,

As far as I know, FOR UPDATE would only break SQLite, and I can live with
that.

Gareth, would optimistic instead of pessimistic work for your situation?
The database does less of the work and it's more scalable. I haven't tested
it out, but OFBiz provides optimistic locking if you turn on enable-lock.

Cheers

Paul Foxworthy



On 27 October 2017 at 03:49, Jacques Le Roux <jacques.le.r...@les7arts.com>
wrote:

> I agree with Scott and Taher,
>
> About your question Gareth, we once had a hard coded  "for update"
> somewhere in OFBiz code (in SequenceUtil.SequenceBank.fillBank() ).
> I put it in. Then Jacopo crossed an issue in a cluster and rightly changed
> it to something better
> See https://issues.apache.org/jira/browse/OFBIZ-2353 for more where
> Adrian gave some directions also.
>
> Since I did not read all in the thread and there is no patch yet I don't
> know if something alike applies to EntityQuery API. Putting a for update is
> certainly much simpler, so just saying for now.
>
> Jacques
>
>
>
> Le 26/10/2017 à 10:46, Gareth Carter a écrit :
>
>> HI all
>>
>> Thank for the response
>>
>> It could be considered a hint, if the underlying db does not support it
>> then don't use it. Adding an attribute on the datasource could be the way
>> to go but I also believe we need methods to tell the system when to use it,
>> you don't need it all the time only in selective cases.
>>
>> Until support is added I see ofbiz as purely RDMS. I don't believe ofbiz
>> should restrict itself on the assumption it might support different
>> databases such as nosql.
>>
>> There could be an alternative to forUpdate, anyone considered
>> implementing a distributed locking mechanism? The whole point for using
>> forUpdate is to prevent one or more code blocks changing the same database
>> records concurrently, db row locks help but are not supported by all
>> databases but an external locking mechanism may provide a generic way of
>> dealing with this. OFBiz already provides a semaphore on services but I
>> believe you need something at entity level
>> Gareth Carter
>> Software Development Analyst
>> Stannah Management Services Ltd
>> IT Department
>> Ext:
>> 7036
>> DDI:
>> 01264 364311
>>
>>
>> Please consider the environment before printing this email.
>>
>> -Original Message-
>> From: Taher Alkhateeb [mailto:slidingfilame...@gmail.com]
>> Sent: 26 October 2017 6:13 AM
>> To: OFBIZ Development Mailing List <dev@ofbiz.apache.org>
>> Subject: Re: Updates to EntityQuery
>>
>> Hmmm usually my first gut reaction would be "keep things consistent",
>> however Scott made a good argument for supporting non-common DB features.
>> So my suggestion would be to use something like the widget's
>>  tag (or equivalent in code) for any features not
>> supported in all DBMSs. By labeling it as such the user is aware that the
>> DB selection is restricted.
>>
>> Now with regards to your comment about NoSQL, such databases are
>> fundamentally different, and act more like a key-value based entities
>> without a schema or the resulting ACID properties. It is possible to make
>> it work with the entity engine, but then you'd lose the flexibility it
>> gives you because you want to restrict yourself to the relational model
>> that we apply in OFBiz. The idea of NoSQL is to think at a different
>> conceptual level of your domain model.
>>
>> On Thu, Oct 26, 2017 at 4:33 AM, Scott Gray <scott.g...@hotwaxsystems.com>
>> wrote:
>>
>>> I think it's better to have for-update available for use for the
>>> majority of use-cases than it is to exclude it altogether.  I'd rather
>>> lose the databases that don't support it than constrain the ones that
>>> do and are used most by pretty much everyone.  It would be nice to
>>> hear from anyone using a database that doesn't support it since I'm
>>> just guessing most of us use postgres or mysql.
>>>
>>> Has anyone actually looked at how NoSQL databases might work with the
>>> OFBiz entity engine or are the concepts too far removed from SQL for
>>> it to even be workable?
>>>
>>> If we did want to support for-update globally, we could always have
>>> the delegator simulate it by issuing an UPDATE to lock the rows prior
>>> to performing the SELECT.  Although it might not work perfectly in all
>>> cases, it could be a good compromise. e.g.
>>> UPDATE table SET lastUpdatedTxStamp = NOW() WHERE ...conditions --
>>&g

Re: Updates to EntityQuery

2017-10-25 Thread Paul Foxworthy
Hi Gareth,

FOR UPDATE is standard SQL, but even so SQLite for one doesn't support it:

http://sqlite.1065341.n5.nabble.com/SELECT-FOR-UPDATE-td89630.html
https://sqlite.org/lang_select.html

FOR UPDATE only makes sense for relational databases. Adding assumptions
it's available would make it harder to use a NoSQL database in future.

In the case of SQLite, in effect it's got serialized isolation anyway, so
the FOR UPDATE is not strictly necessary.

I suggest OFBiz shouldn't have a method that generates syntactically
incorrect SQL for any database we want to support, and we claim to support
several. Where there are variations between SQL dialects, we have
attributes in the data source, such as "join-style".

So think our choices are:

1. Add an attribute to say "SELECT ... FOR UPDATE" is supported by a data
source. OFBiz would only add the "FOR UPDATE" if it is supported. In the
case of SQLite, I suspect we'd get away without it, but there may be other
databases where the absence of "FOR UPDATE" might bring on unexpected
behaviour.

2. Don't provide a method to expose FOR UPDATE.

Could you achieve the results you want with a higher transaction isolation
level like repeatable read, or with optimistic locking (enable-lock)?

What do you think?

Cheers

Paul Foxworthy


On 26 October 2017 at 07:50, Gareth Carter <gareth.car...@stannah.co.uk>
wrote:

> Ok I will create a Jira with patch for review.
>
>
>
> Sent from my Samsung Galaxy smartphone.
>
>
>
> Gareth Carter
>
>
> Software Development Analyst
>
>
> Stannah Management Services Ltd
>
>
> IT Department
>
>
> Ext:
>
>
> 7036
>
>
> DDI:
>
>
> 01264 364311
>
>
>
>
> [http://logos.stannah.co.uk/stan150.jpg]
>
>
> [http://logos.stannah.co.uk/enviro.jpg]Please consider the environment
> before printing this email.
>
>
>  Original message 
> From: deepak nigam <deepak.nigam1...@gmail.com>
> Date: 25/10/2017 14:06 (GMT+00:00)
> To: dev@ofbiz.apache.org
> Subject: Re: Updates to EntityQuery
>
> Looking good to me also. Let me know if I can be of any help.
>
>
> Thanks & Regards
> --
> Deepak Nigam
>
> On Wed, Oct 25, 2017 at 6:26 PM, Yash Sharma <
> yash.sha...@hotwaxsystems.com>
> wrote:
>
> > I am all up for it, please let me know if I could help.
> >
> > Thanks & Regards,
> > --
> > *Pradhan Yash Sharma*
> > *HotWax Systems* | www.hotwaxsystems.com<http://www.hotwaxsystems.com>
> >
> > On Wed, Oct 25, 2017 at 6:23 PM, Yash Sharma <
> > yash.sha...@hotwaxsystems.com>
> > wrote:
> >
> > > Yes, Usage of the stream will surely enhance performance to a certain
> > > extent and removes ceremony from the code base. I think Parallel
> streams
> > > will add enhancements in many folds as we are using a multicore
> processor
> > > (I have not tested yet), but the Functional approach seems promising.
> > >
> > > Thanks & Regards,
> > > --
> > > *Pradhan Yash Sharma*
> > > *HotWax Systems* | www.hotwaxsystems.com<http://www.hotwaxsystems.com>
> > >
> > > On Wed, Oct 25, 2017 at 5:59 PM, Gareth Carter <
> > > gareth.car...@stannah.co.uk> wrote:
> > >
> > >> forUpdate
> > >>
> > >> We patched EntityFindOptions with a new field "forUpdate" with
> shorthand
> > >> methods in EntityQuery to enable. We then made a change to
> > >> GenericDAO.selectListIteratorByCondition to add "FOR UPDATE" on the
> end
> > >> of the SQL select statement - this allows for DB row locks (we use
> > postgres
> > >> and works but have not tested other databases). I believe there may
> have
> > >> been a discussion about this before
> > >>
> > >>
> > >> forEach on EntityQuery
> > >>
> > >> Use Consumer in java and groovy to iterate over a query. This can
> reduce
> > >> memory consumption (replacement for queryList()) and boiler plate code
> > (eg
> > >> queryIterator(), while loop and close)
> > >>
> > >> Example:
> > >>
> > >> EntityQuery.use(delegator).from("Foobar")
> > >> .forEach(item ->
> > >> Debug.logInfo(item.toString(), module);
> > >> );
> > >>
> > >> A further update could be to provide stream capabilities
> > >>
> > >> Hope this helps, I can provide a patch aswell
> > >>
> > >> Gareth Carter
> 

Re: Packing using backorder reservations?

2017-09-05 Thread Paul Foxworthy
Hi Jacques,

I'm pretty sure there is a problem here. I've created Jira OFBIZ-9677 with
a patch. The patch is fairly simple and has fixed the problem in my tests.

Cheers

Paul

On 4 September 2017 at 19:53, Paul Foxworthy <p...@cohsoft.com.au> wrote:

> Thanks Jacques. I did know that :( .
>
> On 4 September 2017 at 18:52, Jacques Le Roux <
> jacques.le.r...@les7arts.com> wrote:
>
>> Hi Paul,
>>
>> I did not review yet, but by and large you should rather refer to
>> ofbiz-framework
>>
>> https://github.com/apache/ofbiz-framework/blob/trunk/applica
>> tions/product/src/main/java/org/apache/ofbiz/shipment/packin
>> g/PackingSession.java#L132
>>
>> ;)
>>
>> Jacques
>>
>>
>>
>> Le 04/09/2017 à 08:58, Paul Foxworthy a écrit :
>>
>>> Hi all,
>>>
>>> Please have a look at the code at
>>> https://github.com/apache/ofbiz/blob/trunk/applications/prod
>>> uct/src/main/java/org/apache/ofbiz/shipment/packing/PackingS
>>> ession.java#L132
>>>
>>> I have been testing a situation where there are three serialized items in
>>> stock, and three on back order. So there are four reservations
>>> (OrderItemShipGrpInvRes instances), and four inventory items: one for
>>> each
>>> of the serialized items in stock, and one more for the back order.
>>>
>>> While packing, the code here is looking for a reservation or reservations
>>> for the order, in descending order of quantity. So it finds the back
>>> order
>>> reservation first, and proceeds to use it and its associated inventory
>>> item
>>> (with zero QOH and negative ATP) for the shipment, which is stupid.
>>>
>>> I think that the code at this point should only look for
>>> OrderItemShipGrpInvRes instances where the quantity exceeds the
>>> quantityNotAvailable, and should only allocate to packing the difference
>>> between the two, and not the full quantity.
>>>
>>> I think the problem is not unique to serialized inventory items, but
>>> these
>>> will exacerbate the problem, because reservations will have quantity one
>>> and it's more likely that a backorder will have a quantity higher than
>>> that.
>>>
>>> Am I missing something?
>>>
>>> Thanks
>>>
>>> Paul Foxworthy
>>>
>>>
>>
>
>
> --
> Coherent Software Australia Pty Ltd
> PO Box 2773
> Cheltenham Vic 3192
> Australia
>
> Phone: +61 3 9585 6788 <+61%203%209585%206788>
> Web: http://www.coherentsoftware.com.au/
> Email: i...@coherentsoftware.com.au
>



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Packing using backorder reservations?

2017-09-04 Thread Paul Foxworthy
Thanks Jacques. I did know that :( .

On 4 September 2017 at 18:52, Jacques Le Roux <jacques.le.r...@les7arts.com>
wrote:

> Hi Paul,
>
> I did not review yet, but by and large you should rather refer to
> ofbiz-framework
>
> https://github.com/apache/ofbiz-framework/blob/trunk/applica
> tions/product/src/main/java/org/apache/ofbiz/shipment/
> packing/PackingSession.java#L132
>
> ;)
>
> Jacques
>
>
>
> Le 04/09/2017 à 08:58, Paul Foxworthy a écrit :
>
>> Hi all,
>>
>> Please have a look at the code at
>> https://github.com/apache/ofbiz/blob/trunk/applications/prod
>> uct/src/main/java/org/apache/ofbiz/shipment/packing/Packing
>> Session.java#L132
>>
>> I have been testing a situation where there are three serialized items in
>> stock, and three on back order. So there are four reservations
>> (OrderItemShipGrpInvRes instances), and four inventory items: one for each
>> of the serialized items in stock, and one more for the back order.
>>
>> While packing, the code here is looking for a reservation or reservations
>> for the order, in descending order of quantity. So it finds the back order
>> reservation first, and proceeds to use it and its associated inventory
>> item
>> (with zero QOH and negative ATP) for the shipment, which is stupid.
>>
>> I think that the code at this point should only look for
>> OrderItemShipGrpInvRes instances where the quantity exceeds the
>> quantityNotAvailable, and should only allocate to packing the difference
>> between the two, and not the full quantity.
>>
>> I think the problem is not unique to serialized inventory items, but these
>> will exacerbate the problem, because reservations will have quantity one
>> and it's more likely that a backorder will have a quantity higher than
>> that.
>>
>> Am I missing something?
>>
>> Thanks
>>
>> Paul Foxworthy
>>
>>
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Packing using backorder reservations?

2017-09-04 Thread Paul Foxworthy
Hi all,

Please have a look at the code at
https://github.com/apache/ofbiz/blob/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/packing/PackingSession.java#L132

I have been testing a situation where there are three serialized items in
stock, and three on back order. So there are four reservations
(OrderItemShipGrpInvRes instances), and four inventory items: one for each
of the serialized items in stock, and one more for the back order.

While packing, the code here is looking for a reservation or reservations
for the order, in descending order of quantity. So it finds the back order
reservation first, and proceeds to use it and its associated inventory item
(with zero QOH and negative ATP) for the shipment, which is stupid.

I think that the code at this point should only look for
OrderItemShipGrpInvRes instances where the quantity exceeds the
quantityNotAvailable, and should only allocate to packing the difference
between the two, and not the full quantity.

I think the problem is not unique to serialized inventory items, but these
will exacerbate the problem, because reservations will have quantity one
and it's more likely that a backorder will have a quantity higher than that.

Am I missing something?

Thanks

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: svn commit: r1807045 - /ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbi z/common/CommonEvents.java

2017-09-02 Thread Paul Foxworthy
Hi Jacques,

These fields and methods will have package scope, but your description
suggests you intended protected. I'm really uncomfortable about fields with
package scope. Is it really necessary? Could they be protected?

In the case of ignoreAttrs, the array should remain private. The loop
in jsonResponseFromRequestAttributes that uses the array should be made a
method in its own right, with a name such as removeSensitiveAttributes.
That method could have higher visibility such as protected. The general
principle is "don't ask for data, ask for help" (
https://martinfowler.com/bliki/TellDontAsk.html).

Cheers

Paul Foxworthy


On 3 September 2017 at 04:45, Jacques Le Roux <jacques.le.r...@les7arts.com>
wrote:

> I think Wai asked for that because he needs it for a custom project. It's
> sill reasonably encapsulated.
>
> You can revert if you want
>
> Jacques
>
>
>
> Le 02/09/2017 à 20:06, Taher Alkhateeb a écrit :
>
>> Do we have any derived classes that require exposing these interfaces?
>>
>> I think it's not a good design to break encapsulation just because of
>> things we "might" need.
>>
>> On Sat, Sep 2, 2017 at 3:25 PM,  <jler...@apache.org> wrote:
>>
>>> Author: jleroux
>>> Date: Sat Sep  2 12:25:13 2017
>>> New Revision: 1807045
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1807045=rev
>>> Log:
>>> Improved: CommonEvents improvements
>>> (OFBIZ-9673)
>>>
>>> Replaces private to protected so that CommonEvents.java is more usable to
>>> derived classes.
>>>
>>> Thanks: Wai
>>>
>>> Modified:
>>>  ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/
>>> org/apache/ofbiz/common/CommonEvents.java
>>>
>>> Modified: ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/
>>> org/apache/ofbiz/common/CommonEvents.java
>>> URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/fra
>>> mework/common/src/main/java/org/apache/ofbiz/common/Common
>>> Events.java?rev=1807045=1807044=1807045=diff
>>> 
>>> ==
>>> --- ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/
>>> org/apache/ofbiz/common/CommonEvents.java (original)
>>> +++ ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/
>>> org/apache/ofbiz/common/CommonEvents.java Sat Sep  2 12:25:13 2017
>>> @@ -68,7 +68,7 @@ public class CommonEvents {
>>>
>>>   public static final String module = CommonEvents.class.getName();
>>>
>>> -private static final String[] ignoreAttrs = new String[] { //
>>> Attributes removed for security reason; _ERROR_MESSAGE_ is kept
>>> +static final String[] ignoreAttrs = new String[] { // Attributes
>>> removed for security reason; _ERROR_MESSAGE_ is kept
>>>   "javax.servlet.request.key_size",
>>>   "_CONTEXT_ROOT_",
>>>   "_FORWARDED_FROM_SERVLET_",
>>> @@ -82,7 +82,7 @@ public class CommonEvents {
>>>   "thisRequestUri"
>>>   };
>>>
>>> -private static final UtilCache<String, Map<String, String>>
>>> appletSessions = UtilCache.createUtilCache("AppletSessions", 0, 60,
>>> true);
>>> +static final UtilCache<String, Map<String, String>> appletSessions
>>> = UtilCache.createUtilCache("AppletSessions", 0, 60, true);
>>>
>>>   public static String checkAppletRequest(HttpServletRequest
>>> request, HttpServletResponse response) {
>>>   Delegator delegator = (Delegator)
>>> request.getAttribute("delegator");
>>> @@ -309,7 +309,7 @@ public class CommonEvents {
>>>   return "success";
>>>   }
>>>
>>> -private static void writeJSONtoResponse(JSON json,
>>> HttpServletRequest request, HttpServletResponse response) throws
>>> UnsupportedEncodingException {
>>> +static void writeJSONtoResponse(JSON json, HttpServletRequest
>>> request, HttpServletResponse response) throws UnsupportedEncodingException {
>>>   String jsonStr = json.toString();
>>>   if (jsonStr == null) {
>>>   Debug.logError("JSON Object was empty; fatal error!",
>>> module);
>>>
>>>
>>>
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: svn commit: r1806058 - in /ofbiz/branches/ofbiz-new-website: ofbiz-demos.html template/page/ofbiz-demos.tpl.php

2017-08-30 Thread Paul Foxworthy
On 28 August 2017 at 20:04, Jacques Le Roux 
wrote:


> I also remember from my first experience as an OFBiz new user that I found
>> the catalog manager screen not a very friendly place to start but if our
>> community like it then it's easy to change.
>>
> I agree that order UI is maybe easier, but IMO it's more logical to start
> with products because you can't have orders before defining products.


I can see your point that parties aren't top of mind for a business owner.
You enter them the first time you do business with them. For repeat orders,
you just call up the party and add to an order. By the same token, you
define a product once and call it up for an order. Accounting, products,
even parties, are means to the end of earning a buck. The earning is what
happens repeatedly, and that's what's important to a business owner. So I
suggest order, not product. In a demo, products and parties will already
exist, and should not be the first thing to consider.

The sequence in which you have to prepare things in OFBiz is not in order
of importance or relevance. Just because it's necessary to prepare
accounting, products, shippers doesn't mean they are of most interest to a
business owner.

Cheers

Paul

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Keep javaScriptEnabled manage on the framework ?

2017-08-28 Thread Paul Foxworthy
See also

https://lists.apache.org/thread.html/ffec3d998998db85655e1003f64268d52f9c7e9b6a4e537008e4b691@1295177952@%3Cdev.ofbiz.apache.org%3E
https://issues.apache.org/jira/browse/OFBIZ-4120
https://issues.apache.org/jira/browse/OFBIZ-4121

Cheers

Paul Foxworthy


On 29 August 2017 at 10:08, Paul Foxworthy <p...@cohsoft.com.au> wrote:

> Hi Nicolas,
>
> Adrian said something about this in https://issues.apache.org/
> jira/browse/OFBIZ-1648 .
>
> Cheers
>
> Paul Foxworthy
>
>
> On 29 August 2017 at 07:46, Nicolas Malin <nicolas.ma...@nereide.fr>
> wrote:
>
>> Hello,
>>
>> During my refactoring to introduce the common-theme I saw that we
>> currently manage on the framework a variable naming javaScriptEnabled to
>> indicate if a user want or not use the javascipt.
>> This functionality has been introduction by Adrian in 2008 (1) and I not
>> found the origin thread (2) (maybe pre-apache)
>>
>> Now I didn't see why we keep this on the framework for two reasons:
>> * With Html5, without javascript we haven't operational screen
>> * If we don't want javascript for a specific case, we can create a
>> dedicate theme for that and simplify the current code.
>>
>> Do you have a reason to keep the management of javaScriptEnabled ? Or I
>> can start the cleaning ?
>>
>> Cheers,
>> Nicolas
>> (1) http://svn.apache.org/viewvc?view=revision=655712
>> (2) https://lists.apache.org/list.html?dev@ofbiz.apache.org:lte=
>> 1M:javaScriptEnabled
>> --
>> logoNrd <https://nereide.fr/>
>> Nicolas Malin
>> The apache way <http://theapacheway.com/> : *Openness* Technical
>> decisions are made publicly
>> informat...@nereide.fr
>> 8 rue des Déportés 37000 TOURS, 02 47 50 30 54
>>
>> Apache OFBiz <http://ofbiz.apache.org/>|The Apache Way <
>> http://theapacheway.com/>|ofbiz-fr <http://www.ofbiz-fr.org/>|réseau LE <
>> http://www.libre-entreprise.org/>
>>
>
>
>
> --
> Coherent Software Australia Pty Ltd
> PO Box 2773
> Cheltenham Vic 3192
> Australia
>
> Phone: +61 3 9585 6788 <+61%203%209585%206788>
> Web: http://www.coherentsoftware.com.au/
> Email: i...@coherentsoftware.com.au
>



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Keep javaScriptEnabled manage on the framework ?

2017-08-28 Thread Paul Foxworthy
Hi Nicolas,

Adrian said something about this in
https://issues.apache.org/jira/browse/OFBIZ-1648 .

Cheers

Paul Foxworthy


On 29 August 2017 at 07:46, Nicolas Malin <nicolas.ma...@nereide.fr> wrote:

> Hello,
>
> During my refactoring to introduce the common-theme I saw that we
> currently manage on the framework a variable naming javaScriptEnabled to
> indicate if a user want or not use the javascipt.
> This functionality has been introduction by Adrian in 2008 (1) and I not
> found the origin thread (2) (maybe pre-apache)
>
> Now I didn't see why we keep this on the framework for two reasons:
> * With Html5, without javascript we haven't operational screen
> * If we don't want javascript for a specific case, we can create a
> dedicate theme for that and simplify the current code.
>
> Do you have a reason to keep the management of javaScriptEnabled ? Or I
> can start the cleaning ?
>
> Cheers,
> Nicolas
> (1) http://svn.apache.org/viewvc?view=revision=655712
> (2) https://lists.apache.org/list.html?dev@ofbiz.apache.org:lte=
> 1M:javaScriptEnabled
> --
> logoNrd <https://nereide.fr/>
> Nicolas Malin
> The apache way <http://theapacheway.com/> : *Openness* Technical
> decisions are made publicly
> informat...@nereide.fr
> 8 rue des Déportés 37000 TOURS, 02 47 50 30 54
>
> Apache OFBiz <http://ofbiz.apache.org/>|The Apache Way <
> http://theapacheway.com/>|ofbiz-fr <http://www.ofbiz-fr.org/>|réseau LE <
> http://www.libre-entreprise.org/>
>



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Keep deleteProductionRunRoutingTask?

2017-08-23 Thread Paul Foxworthy
Hi Gil,

Jacques counted 157 services with names starting with "remove" and 538
starting with "delete" . OFBiz is inconsistent here, but "delete" is more
commonly used. Why make it any worse by adding another "remove"?

Thanks

Paul Foxworthy

On 14 August 2017 at 23:50, gil portenseigne <gil.portensei...@nereide.fr>
wrote:

> Hi Jacques,
>
> In my opinion when I read deleteWorkEffort i'm expecting an entity-auto
> service, that will remove my workEffort entry from database.
>
> In this case it's removing the workEffort and all related entity, so i
> propose to rename the service to removeWorkEffortAndRelated.
>
> This service is to be used when i really don't care about related data.
>
> Then we could replace deleteProductionRunRoutingTask with
> removeWorkEffortAndRelated service...
>
> The question remains, should we still define a deleteWorkEffort
> entity-auto service ? I'm not sure that will be useful, but that's not
> costly to have one defined...
>
> Gil
>
>
>
>
> On 11/08/2017 17:21, Jacques Le Roux wrote:
>
>> Hi Nicolas, All,
>>
>> Nicolas: are you speaking about deleteProductionRunRoutingTask
>> (OFBIZ-9568), deleteWorkEffort (OFBIZ-9185) or both ?
>>
>> I think you answered only about deleteWorkEffort and then I agree.
>>
>> I was also reluctant to remove it. But then we need to define what would
>> be it's minimal implementation.
>> Because as Deepak said, when you want to delete a workeffort with
>> relations with other entities (hence FKs); then you need to delete those
>> other entities before.
>> And in some case it can be quite hard (I try to generalise from this
>> case).
>>
>> I wonder if a new simpler service like deleteSimpleWorkeffort would not
>> be appropriate. A simple workEffort would not have any relations with any
>> entities, else the call would be rejected by this new service.
>> Because generalising seems hard, even more when considering all entities,
>> like eg OrderHeader
>> see https://cwiki.apache.org/confluence/display/OFBENDUSER/How+
>> to+delete+tuples+added+to+test+a+setup and also related thread
>> https://s.apache.org/DCiI
>>
>> This time I want to get to some action :D
>>
>> Jacques
>>
>> Le 11/08/2017 à 11:20, Nicolas Malin a écrit :
>>
>>> Hello Jacques,
>>>
>>> It's a good example why I explained that delete is interesting in some
>>> cases.
>>>
>>> We implemented a process with template workeffort where an operator
>>> create a production run from the templating and delete some task that is
>>> not needed before start. In this context, I have no reason to keep these
>>> workeffort on the database.
>>>
>>> I'm in favor to keep these services as simple as possible and in
>>> coherence with the create service with information that the delete service
>>> doesn't manage all foreign key and we need prepare the delete before. For
>>> all other case, expire will own friend :)
>>>
>>> Nicolas
>>>
>>> Le 10/08/2017 à 11:56, Jacques Le Roux a écrit :
>>>
>>>> Hi,
>>>>
>>>> Please give your opinion on OFBIZ-9568 before I continue on OFBIZ-9185
>>>>
>>>> Thanks
>>>>
>>>> Jacques
>>>>
>>>>
>>>>
>>>
>>>
>>
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Remove as much as possible delete and remove services

2017-08-03 Thread Paul Foxworthy
On 2 August 2017 at 18:14, Taher Alkhateeb 
wrote:

> what I meant is a new single component where move all
> services to it. The reason I suggested that is to reduce "mass
> operations" and make them into one.
>

Hi Taher,

I'm still not clear what you have in mind. By "mass operation", I think you
mean that we are proposing significant change that will affect most or all
components in OFBiz. When you say "all services", do you really mean every
one of them, or just all the expire and delete services?

Partitioning of services by business area (accounting, catalog, facility,
party etc) is deeply entrenched in OFBiz, and I think preferable to
partitioning by technical function (e.g. expire and delete services). Or
are you suggesting we eliminate components altogether?

Cheers

Paul

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Remove as much as possible delete and remove services

2017-08-02 Thread Paul Foxworthy
On 2 August 2017 at 16:37, Taher Alkhateeb 
wrote:

> If you are willing to make the effort towards
> naming all these services then you might as well consider unifying
> them.


Hi Taher,

Are you proposing one expire service for all entities, which sets the
thruDate attribute?

If I understand you right, what would we do for entities without a
thruDate? How would we define the expected paramaters, when primary keys
vary between the different entities?

Cheers

Paul

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Remove as much as possible delete and remove services

2017-08-02 Thread Paul Foxworthy
On 2 August 2017 at 15:49, Deepak Dixit 
wrote:

> In case of calling update service we have to pass thruDate as mandatory
> parameter, We have expire as entityAuto service that care of setting up the
> thruDate if not passed. So instead of doing it controller level its good
> idea to have expire service.
>

Thanks Deepak, I agree., the expire services will only need a primary key
and an optional thru date and will do the rest internally. Update services
can be more complicated.

Cheers

Paul

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Remove as much as possible delete and remove services

2017-08-01 Thread Paul Foxworthy
Hi all,

Some services already expire rather than delete, so it's not as bad as
Jacques suggests.

One example is deletePaymentMethod (
https://github.com/apache/ofbiz-framework/blob/5fa047abd5c0f96d81cd3f9c9547564abe7fe369/applications/accounting/src/main/java/org/apache/ofbiz/accounting/payment/PaymentMethodServices.java#L98
).

I would be in favour of changing the names of these services to say
"expire" instead of "delete", but that's a big change and we would need to
think carefully about what might be disrupted by that.

Cheers

Paul

On 2 August 2017 at 00:34, Jacques Le Roux 
wrote:

> Hi,
>
> After a 1st discussion with Deepak at OFBIZ-9185, we had another at
> OFBIZ-9543.
>
> We claim that we should not remove entities records because of auditing.
> But we have at 157 services with names starting with "remove" and 538
> starting with "delete"
>
> I suggest that we remove as much as possible of these services and have
> only expire services for those which support expire (ie have from and thru
> dates).
>
> For instance I was curious about deleteParty, but what it currently does
> is only returning the "partyservices.cannot_delete_party_not_implemented"
> label. This is pre Apache era (ie there for 10+ years)!
>
> In OFBIZ-9543 Deepak rightly suggested that we keep delete services for
> Assoc kind of entities. But definitely remove delete service for entity
> like Party, WorkEffort, Product, etc those have n number of foreign key
> constraints...
>
> What do you think, other ideas?
>
> Jacques
>
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: New Website Branch Created

2017-07-30 Thread Paul Foxworthy
On 30 July 2017 at 19:42, Jacques Le Roux 
wrote:


> For demos, why do you prefer a link to accounting than product (catalog
> webapp) as we did before (David did it long ago)? BTW developers, was
> catalog the best place?
>

Hi all,

Kathy Sierra was head of Java training at Sun and co-founder of the Head
First series of books at O'Reilly. She was and is very opinionated about
how people learn. See http://www.headfirstlabs.com/readme.php . In
particular:

"We use *people*. In stories, examples, pictures, etc., because, well,
because *you're* a person. And your brain pays more attention to people
than it does to things."

The first thing people should see should be something they can relate to.
People, or in OFBiz terms, Parties. Next best are products - they are
tangible. Accounting should not be the first thing people see. It only
makes sense to count the money after we've earned it.

Cheers

Paul

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Service error label wit automatic resolution

2017-07-23 Thread Paul Foxworthy
Hi Nicholas,

Are you proposing these labels would be used when there's a missing
parameter to a service? If that's right, the names of labels should
communicate they are about missing parameters.

How about ServiceErrorTitle_${serviceName}_Missing_${attribute} and
ServiceErrorTitle_Missing_${attribute}
. I don't understand when ServiceErrorTitle_${serviceName} would be used.

Cheers

Paul Foxworthy


On 23 July 2017 at 04:26, Nicolas Malin <nicolas.ma...@nereide.fr> wrote:

> Hello,
> After review some issue related to https://issues.apache.org/jira
> /browse/OFBIZ-7471, my head raise an old idea that have been in the past
> to improve error message on service validation.
> Currently to set an error message related to an attribute, we need to set
> it like this :
> 
> 
>  property="ContentRequiredFieldMissingFile"/>
> 
> 
> I find this burden, to write and to read.
>
> Maybe we can improve OFBiz to resolve le label automatically with few easy
> rule like :
> write title error label with the template 
> ServiceErrorTitle_${serviceName}_${attribute},
> if not found resolve the generic ServiceErrorTitle_${serviceName}, if not
> found resolve ServiceErrorTitle_${attribute}
> All service label files would be identify to load in cache at ofbiz start.
> I think it's :
> * easy to develop
> * easy to maintain
> * don't decrease the performance
>
> Opinions ?
>
> Nicolas
>
> --
> logoNrd <https://nereide.fr/>
> Nicolas Malin
> The apache way <http://theapacheway.com/> : *Openness* Technical
> decisions are made publicly
> informat...@nereide.fr
> 8 rue des Déportés 37000 TOURS, 02 47 50 30 54
>
> Apache OFBiz <http://ofbiz.apache.org/>|The Apache Way <
> http://theapacheway.com/>|ofbiz-fr <http://www.ofbiz-fr.org/>|réseau LE <
> http://www.libre-entreprise.org/>
>



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: GL Patch

2017-07-18 Thread Paul Foxworthy
Hi Craig,

The version will probably be in the footer of the web pages. Look for
example at the dark grey stuff at the bottom of
https://demo-trunk.ofbiz.apache.org/catalog/control/main .

Cheers

Paul Foxworthy


On 26 June 2017 at 04:59, Craig Parker <cr...@fossfolks.com> wrote:

> I'm looking at OFBIZ-9429.patch, and wondering how to apply it to a
> current install. I'm not sure which version I'm running though, can't see
> it in any of the unzipped files yet and I don't know where to find it in
> the software menu.
>
> I used the main download zip, I beleive it was the first one to use
> gradle, and I don't think I've reinstalled since any updates came out --
> I'm guessing 16.11.01. Is there a "how to apply a patch" doc somewhere? Was
> this email something for the dev list, or should I have asked over at user?
>
>
>
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [Proposal] moving all data in applications to the data-model component

2017-07-17 Thread Paul Foxworthy
Hi Taher,

Makes sense to me.

Would any plugin defining custom entities also have a similar /data tree?

Cheers

Paul


On 14 July 2017 at 19:59, Taher Alkhateeb 
wrote:

>  Hello Everyone,
>
> Data loading in OFBiz is quite fragile. A small change could crash the
> system and finding out the reason can be difficult. I really felt the
> pain of this when trying to disentangle the framework from data
> dependencies on plugins [1].
>
> I've been thinking about a solution to reduce fragility, and here are
> my thoughts:
> - The less data files the better.
> - The less data the better.
> - The less distance (e.g. same directory) between data files the better.
> - No circular dependencies (file dependencies should be like a tree).
> - Fail fast [2].
>
> Therefore, I suggest the following action points:
> - Create a directory structure similar to [3] in the datamodel component.
> - For any data that two or more files depend on, immediately move it
> to the common-.xml file.
> - For any data that does not belong to any domain (e.g. marketing,
> content, etc ..) move it to the common-.xml.
> - Maintain a strict dependency hierarchy of demo -> seed -> seed-initial.
> - Gradually and carefully move data from all applications to the
> datamodel component as per above guidelines.
> - Cleanup and refactor the data as we move it including any tests that
> depend on it.
>
> What do you think of this proposal? Does it sound reasonable? Also
> given the size of what I'm proposing I think we need multiple people
> to work on this. So is anyone interested in taking part in this
> initiative?
>
> Cheers,
>
> Taher Alkhateeb
>
> [1] https://issues.apache.org/jira/browse/OFBIZ-9322
> [2] https://lists.apache.org/thread.html/a18b5d4086a07ff34a0cb950999e8f
> 8e869a6aa7efa2fc866a75a7b6@%3Cdev.ofbiz.apache.org%3E
> [3] directory structure:
> data/
> ├── demo
> │   ├── accounting-demo.xml
> │   ├── common-demo.xml
> │   ├── content-demo.xml
> │   ├── humanres-demo.xml
> │   ├── manufacturing-demo.xml
> │   ├── marketing-demo.xml
> │   ├── order-demo.xml
> │   ├── party-demo.xml
> │   ├── product-demo.xml
> │   ├── shipment-demo.xml
> │   └── workeffort-demo.xml
> ├── seed
> │   ├── accounting-seed.xml
> │   ├── common-seed.xml
> │   ├── content-seed.xml
> │   ├── humanres-seed.xml
> │   ├── manufacturing-seed.xml
> │   ├── marketing-seed.xml
> │   ├── order-seed.xml
> │   ├── party-seed.xml
> │   ├── product-seed.xml
> │   ├── shipment-seed.xml
> │   └── workeffort-seed.xml
> └── seed-initial
> ├── accounting-seed-initial.xml
> ├── common-seed-initial.xml
> ├── content-seed-initial.xml
> ├── humanres-seed-initial.xml
> ├── manufacturing-seed-initial.xml
> ├── marketing-seed-initial.xml
> ├── order-seed-initial.xml
> ├── party-seed-initial.xml
> ├── product-seed-initial.xml
> ├── shipment-seed-initial.xml
> └── workeffort-seed-initial.xml
>



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [Discussion] Failing the build if data loading fails

2017-07-10 Thread Paul Foxworthy
On 10 July 2017 at 15:03, Taher Alkhateeb 
wrote:

> Historically the data loader boolean props are false if ommitted and the
> code expects that, but you have a point about the double negative. We can
> instead call it "continue-on-failure" for example.
>

Hi Taher,

I'm happy with that.

Cheers

Paul

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [Discussion] Failing the build if data loading fails

2017-07-09 Thread Paul Foxworthy
Hi all,

I agree with option 3. I recall in my own work I once needed to add a throw
where there was none to track down a problem.

However ignore-failure leads to a double negative. How about
"stop-on-failure", default value true?

Cheers

Paul Foxworthy


On 10 July 2017 at 05:27, Taher Alkhateeb <slidingfilame...@gmail.com>
wrote:

> Correction: on item (2) in my post: fail immediately, not after
> loading all files, otherwise there's no point.
>
> On Sun, Jul 9, 2017 at 10:18 PM, Taher Alkhateeb
> <slidingfilame...@gmail.com> wrote:
> > Hello Everyone,
> >
> > For a long time I was annoyed by something in OFBiz: the build system
> > does not fail if data loading fails for some files. I spend hours
> > hunting bugs only to discover that the data simply did not load.
> >
> > Given that I'm working on refactoring the data loading container, I
> > believe this issue should resolved. However, I'm not sure if the
> > community is interested in making such a change.
> >
> > So I list below 3 options to select from:
> >
> > 1- Leave it as is, do not fail the build if some files do not load
> > 2- Continue loading until all files are done and then fail the build
> > 3- Provide a flag e.g. ignore-failure that tells the system whether to
> > fail or not with a default value of "false".
> >
> > My personal preference is for (3)
> >
> > WDYT?
>



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Information on Design and Structure of Camel Website and Wiki

2017-06-08 Thread Paul Foxworthy
Thanks Taher.

AsciiDoc is designed to translate to Docbook, so all the Docbook ecosystem
can be used with AsciiDoc. You can think of AsciiDoc as an alternative
syntax to Docbook XML that is more accessible as you write. It feels like
you're writing an email.

So to my mind our choice is between two options: DITA or AsciiDoc/Docbook.
AsciiDoc is just as modular as Docbook. AsciiDoc does need a specialized
tool, AsciiDoctor, to create Docbook, but I don't think that's a big
problem.

Cheers

Paul Foxworthy


On 8 June 2017 at 18:54, Taher Alkhateeb <slidingfilame...@gmail.com> wrote:

> Reading through the threads provided by Paul reminded me of the reason why
> we suffered in making a decision. Documentation is very important, and very
> boring!
>
> I think we all agree now (more-or-less) that documentation inside the code
> base is probably better. The question to raise (again!) is which technology
> to use.
>
> So how to choose? I list some criteria we might consider:
>
> - Simplicity: The easier it is to learn this technology, the more people
> will be able to contribute.
> - Modularity: The more modular the documentation system the better so that
> we minimize copy-and-paste patterns.
> - Migration Ease: The easier it is to migrate existing work the better
> (e.g. keeping the same technology or having conversion scripts)
> - Verbosity: The less verbose the documentation syntax the better
> - Automation: The easier it is to automate the documentation generation the
> better. Ideally it should work directly from the build system (Gradle).
> - Ecosystem: The more resources, books, tools, support, editors and IDEs
> for the documentation system the better.
>
> I'll try to summarize earlier discussion points along with some of my own:
>
> - The candidates we discussed are AsciiDoc, DocBook and DITA.
> - DocBook is the existing implementation but it is broken as it only
> implements a subset of the full standard. So we have to fix or replace.
> - AsciiDoc is probably the simplest of the three and DITA is probably the
> most complex
> - DITA is the most modular and AsciiDoc is the least modular
> - DITA and AsciiDoc require specialized tools whereas DocBook can just work
> with good old XSLT
> - DITA and DocBook are too verbose, AsciiDoc has a lighter and nicer syntax
> - I could be wrong about the eco-system, but I think the biggest is DocBook
> followed by DITA and then AsciiDoc.
>
> I hope these points can help to better focus the discussion.
>
> Cheers,
>
> Taher Alkahteeb
>
> On Thu, Jun 8, 2017 at 10:54 AM, Paul Foxworthy <p...@cohsoft.com.au>
> wrote:
>
> > Hi all,
> >
> > A reminder AsciiDoc came up in discussions in 2015:
> >
> > http://ofbiz.135035.n4.nabble.com/Some-comments-on-DITA-for-
> > a-small-group-td4670183.html
> > http://ofbiz.135035.n4.nabble.com/Possible-Documentation-
> > and-help-solutions-DITA-td4669377.html
> >
> > Cheers
> >
> > Paul Foxworthy
> >
> >
> > On 8 June 2017 at 17:22, Sharan Foga <sharan.f...@gmail.com> wrote:
> >
> > > Hi Zoran
> > >
> > > Thanks very much for the response. I'll take your feedback back to the
> > > OFBiz community as you have highlighted some interesting ideas that
> could
> > > be very useful for us.
> > >
> > > Thanks
> > > Sharan
> > >
> > >
> > > On 2017-06-06 16:12 (+0200), Zoran Regvart <zo...@regvart.com> wrote:
> > > > Hi Sharan,
> > > > we use a CI job that runs a custom built tool to export Confluence
> > > > pages into HTML[1], but that being said we are in the process of
> > > > moving the wiki content into the source tree and generating/updating
> > > > the documentation as a part of the build process. For that we use a
> > > > custom Maven plugin[2] and asciidoctor for makup.
> > > >
> > > > In somewhat near future we'll replace the wiki export with a static
> > > > site generator like Jekyll or Hugo.
> > > >
> > > > We hope that having the documentation along with the source code will
> > > > keep it more up to date and encourage more contribution to the
> > > > documentation,
> > > >
> > > > zoran
> > > >
> > > > [1] https://svn.apache.org/viewvc/camel/website/
> > > > [2] https://github.com/apache/camel/tree/master/tooling/maven/
> > > camel-maven-plugin
> > > >
> > > > On Mon, Jun 5, 2017 at 1:30 PM, Sharan Foga <sha...@apache.org>
> wrote:
> > > > > Hello Apache Camel Community!
> > > > >
> >

Re: Information on Design and Structure of Camel Website and Wiki

2017-06-08 Thread Paul Foxworthy
Hi all,

A reminder AsciiDoc came up in discussions in 2015:

http://ofbiz.135035.n4.nabble.com/Some-comments-on-DITA-for-a-small-group-td4670183.html
http://ofbiz.135035.n4.nabble.com/Possible-Documentation-and-help-solutions-DITA-td4669377.html

Cheers

Paul Foxworthy


On 8 June 2017 at 17:22, Sharan Foga <sharan.f...@gmail.com> wrote:

> Hi Zoran
>
> Thanks very much for the response. I'll take your feedback back to the
> OFBiz community as you have highlighted some interesting ideas that could
> be very useful for us.
>
> Thanks
> Sharan
>
>
> On 2017-06-06 16:12 (+0200), Zoran Regvart <zo...@regvart.com> wrote:
> > Hi Sharan,
> > we use a CI job that runs a custom built tool to export Confluence
> > pages into HTML[1], but that being said we are in the process of
> > moving the wiki content into the source tree and generating/updating
> > the documentation as a part of the build process. For that we use a
> > custom Maven plugin[2] and asciidoctor for makup.
> >
> > In somewhat near future we'll replace the wiki export with a static
> > site generator like Jekyll or Hugo.
> >
> > We hope that having the documentation along with the source code will
> > keep it more up to date and encourage more contribution to the
> > documentation,
> >
> > zoran
> >
> > [1] https://svn.apache.org/viewvc/camel/website/
> > [2] https://github.com/apache/camel/tree/master/tooling/maven/
> camel-maven-plugin
> >
> > On Mon, Jun 5, 2017 at 1:30 PM, Sharan Foga <sha...@apache.org> wrote:
> > > Hello Apache Camel Community!
> > >
> > > I'm from the Apache OFBiz community and we are in the process of
> re-designing our website and doing some significant tidying up and
> restructure of our confluence workspaces and wiki.
> > >
> > > Someone highlighted that your project website and wiki look great,
> well organised and integrated so please could I find out some information
> from you about what you've used and how you've done it. :-)
> > >
> > > Thanks
> > > Sharan
> > >
> >
> >
> >
> > --
> > Zoran Regvart
> >
>



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [PROPOSAL] Re: Links to other OFBiz locations

2017-05-11 Thread Paul Foxworthy
Hi all,

I don't think it's a good idea. The demo should look like a working OFBiz
system, not an ad. OFBiz is busy enough anyway without overloading it with
stuff that's not relevant to a demo of its capabilities.

I guess most people will go from the OFBiz web site to the demo, not the
other way around. The mention of ASF and "powered by Apache OFBiz" in the
footer is enough.

Cheers

Paul Foxworthy

On 12 May 2017 at 00:31, Jacques Le Roux <jacques.le.r...@les7arts.com>
wrote:

> Thanks Pierre,
>
> Yes, the point is to have them prominent in the demos *AND* when people
> run OFBiz locally.
>
> It should help newbies to get to the locations we want to privilege (eg:
> wiki, Jira, etc. to be discussed)
>
> Jacques
>
>
>
> Le 11/05/2017 à 12:25, Pierre Smits a écrit :
>
>> That would surely work for the demo environments, but the
>> ofbiz.apache.org
>> link brings that audience to further references.
>>
>> Best regards,
>>
>>
>>
>> Pierre Smits
>>
>> ORRTIZ.COM <http://www.orrtiz.com>
>> OFBiz based solutions & services
>>
>> OFBiz Extensions Marketplace
>> http://oem.ofbizci.net/oci-2/
>>
>> On Thu, May 11, 2017 at 11:51 AM, Jacques Le Roux <
>> jacques.le.r...@les7arts.com> wrote:
>>
>> Hi,
>>>
>>> In the footer of the Solr admin https://demo-trunk.ofbiz.apache.org/solr
>>> there are links to
>>>  Documentation
>>>  Issue Tracker
>>>  IRC Channel
>>>  Community forum
>>>
>>> Could we not use the same idea and put more links related to OFBiz (to be
>>> determined) than http://www.apache.org/ and http://ofbiz.apache.org/
>>> This would be in a second line or another place depending on the theme.
>>>
>>> What do you think?
>>>
>>> Jacques
>>>
>>>
>>>
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: User Acceptance Test Cases For Ecommerce 14.12

2017-05-03 Thread Paul Foxworthy
Hi all,

I suggest Spock rather than Cucumber. It's a Groovy-based DSL. See
http://ytheohar.blogspot.com.au/2015/07/bdd-with-cucumber-vs-spock.html for
a discussion of differences between the two.

Cheers

Paul Foxworthy


On 18 April 2017 at 21:12, Jacques Le Roux <jacques.le.r...@les7arts.com>
wrote:

> I had a cursory look, and I like it too. I guess the effort will be
> continued on other branches based on this one. Then later hopefully used by
> Selenium tests and possibly Cucumber put in.
>
> BTW for stable (R16.11) and trunk we have currently few issues with the
> logout links: see OFBIZ-9240
>
> Thanks
>
> Jacques
>
>
>
> Le 17/04/2017 à 10:23, Swapnil Mane a écrit :
>
>> Super, good job Rishi and team! :)
>>
>>
>> - Best Regards,
>> Swapnil M Mane
>>
>> On Sat, Apr 15, 2017 at 9:00 PM, Rishi Solanki <rishisolan...@gmail.com>
>> wrote:
>>
>> Folks,
>>>
>>> We have completed the first draft of the document for the Ecommerce
>>> Component
>>> <https://cwiki.apache.org/confluence/display/OFBIZ/E-commerce+14.12> and
>>> added UATs for all the user stories. Also we have follow the pattern to
>>> use
>>> h4 h5 and h6 headings in the documents so that user can easily navigate
>>> to
>>> the user story/ user acceptance test she wants.
>>>
>>> As a first draft we tried to cover all known possible tests, but it might
>>> be possible we missed something. We would like to get feedback from
>>> community so that we can make it better in terms of usability,
>>> readability
>>> and number of items we have tested.
>>>
>>> Please review and share your feedback on each item, like language we use,
>>> document formation, use cases we covered etc. We would try to cover them
>>> in
>>> our next draft and improve the document. And once finalize we would start
>>> using that pattern going forward for all such documents.
>>>
>>> Thanks!
>>>
>>>
>>> Rishi Solanki
>>> Sr. Manager, Enterprise Software Development
>>> HotWax Systems Pvt. Ltd.
>>> Direct: +91-9893287847
>>> http://www.hotwaxsystems.com
>>>
>>> On Sat, Feb 18, 2017 at 9:49 PM, Rishi Solanki <rishisolan...@gmail.com>
>>> wrote:
>>>
>>> Folks,
>>>>
>>>> Added two more UAT as Category Navigation and Product Search
>>>> <https://cwiki.apache.org/confluence/display/OFBIZ/Ecommerce+14.12>. I
>>>> observe some scope of improvements like UAT writing aren't following
>>>>
>>> common
>>>
>>>> patterns, I'll review and fix them soon.
>>>>
>>>> Soon we would add remaining in the ecommerce area, looking for your
>>>> feedback and suggestions on it.
>>>>
>>>>
>>>> Rishi Solanki
>>>> Sr. Manager, Enterprise Software Development
>>>> HotWax Systems Pvt. Ltd.
>>>> Direct: +91-9893287847
>>>> http://www.hotwaxsystems.com
>>>>
>>>> On Tue, Jan 24, 2017 at 7:01 PM, Jacques Le Roux <
>>>> jacques.le.r...@les7arts.com> wrote:
>>>>
>>>> Thanks Rishi,
>>>>>
>>>>> Indeed I needed a clarification, sorry for that.
>>>>>
>>>>> It's a great initiative, OFBiz will then really be at professional
>>>>> standards, and that's great!
>>>>>
>>>>> I agree that we have first to create and document these UAT and then
>>>>> think about a tool to run them.
>>>>> Cucumber seems the best tool for that to me.  I also know that Gil
>>>>> (Portenseigne) from Néréide has begun to use Cucumber for a custom
>>>>>
>>>> project,
>>>
>>>> hence my haste :)
>>>>>
>>>>> Jacques
>>>>>
>>>>>
>>>>>
>>>>> Le 23/01/2017 à 08:05, Rishi Solanki a écrit :
>>>>>
>>>>> Thanks Jacques for your reply and raising concerns. It seems that, I
>>>>>>
>>>>> was
>>>
>>>> not clear enough. Let me try to rephrase what we are doing. If you
>>>>>> observe
>>>>>> then Pranay has created new hierachy for each release like 14.12,
>>>>>> 15.12
>>>>>> ...
>>>>>> so on.
>>>>>>
>>>>>> For each release we have the user stories, and

Re: port mapping 8080 to 8443 is broken

2017-03-13 Thread Paul Foxworthy
Hi all,

I agree with Taher, we should simply remove non-SSL access. The world is
rapidly moving to SSL only.

It is now close to essential that passwords should be encrypted in transit
for a serious system like OFBiz.

Cheers

Paul Foxworthy


On 14 March 2017 at 07:18, Michael Brohl <michael.br...@ecomify.de> wrote:

> Unfortunately I have not the time to dig deeper into this but I've got a
> bad feeling about this and similar threads we had lately.
>
> Ports 8080 and 8443 are used for a long time without problems and it's a
> common production setting if you run OFBiz behind a webserver connected
> through AJP. I don't see any reason why we should not use port 8080 in
> OFBiz, even it is getting more common to have everything on https.
>
> Even if this work is done in trunk, which is regarded as unstable, we
> should take more care to commit consistent and working code instead of
> using trunk as a playground and dumping place for unfinished work.
>
> I'm in favor to better not commit and wait until everything works as
> expected instead of beginning work, committing and then leave it as is
> because there is "no time to look at it right now". We can always use
> branches for this kind of work.
>
> My apologies if I got this wrong but I feel uneasy with this approach.
>
> Best regards,
>
> Michael
>
>
> Am 13.03.17 um 16:55 schrieb Taher Alkhateeb:
>
> I faced this issue again while trying some tests today, and I read your
>> comments which refer to this as "not a bug".
>>
>> So my question is: if we should not use 8080 as the port, why is it
>> enabled
>> in the first place in OFBiz? why not disable it completely instead of
>> confusing people.
>>
>> On Fri, Mar 3, 2017 at 10:49 PM, Taher Alkhateeb <
>> slidingfilame...@gmail.com
>>
>>> wrote:
>>> Okay so it seems this issue was introduced by your work based on what I
>>> read in jira. I don't think you should apply code changes that cause
>>> regressions like this one.
>>>
>>> On Mar 3, 2017 4:40 PM, "Jacques Le Roux" <jacques.le.r...@les7arts.com>
>>> wrote:
>>>
>>> Le 02/03/2017 à 17:12, Jacques Le Roux a écrit :
>>>>
>>>> Le 02/03/2017 à 15:52, Taher Alkhateeb a écrit :
>>>>>
>>>>> I'm not sure who committed what, but now the automatic redirection from
>>>>>> 8080 to 8443 ssl is broken. Jacques is this related to your work on
>>>>>> port
>>>>>> offset stuff?
>>>>>>
>>>>>> This is only with localhost, right?
>>>>>>
>>>>> If it's the case, I guess it's related to OFBIZ-9206 but I have no time
>>>>> to look at it right now
>>>>>
>>>>> Jacques
>>>>>
>>>>>
>>>>> See my comments at OFBIZ-9242
>>>>>
>>>> Jacques
>>>>
>>>>
>>>>
>
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [PROPOSAL] Allow Blog Posts from Community Members on Official OFBiz Blog

2017-02-27 Thread Paul Foxworthy
+1

On 27 February 2017 at 22:21, Sharan Foga  wrote:

> Hi All
>
> Generally Michael, Jacques and I put together our monthly project blog
> news updates. Our official blog also tends to include information about our
> releases.
>
> I've recently been sent a general blog post from Pranay, promoting OFBiz
> that I think would be nice to post on our blog so this is the reason behind
> the proposal.
>
> I think that it could be a good thing to let the community know that if
> they want to publish an article about the way they use OFBiz or anything
> that could promote using it then it could be posted on the blog.
>
> We could also perhaps include announcements from companies going live with
> an OFBiz implementation. One thing we might want to be careful about though
> is keeping things neutral and project focussed.
>
> What do people think?
>
> Thanks
> Sharan
>



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: [PROPOSAL] deprecate mini lang

2017-02-18 Thread Paul Foxworthy
+1

I have wondered how hard it would be to create an isomorphic conversion
between minilang and a Groovy DSL - bidirectional conversion between the
two. That would mean we could automatically convert the existing minilang
to the DSL, and if there is anyone who prefers minilang, they could convert
in the other direction.

There would even be benefits if we just worked on generating an Abstract
Syntax Tree from minilang, which is then compiled to bytecode. That would
increase the performance of minilang code, and perhaps allow for debugging
it. It might be possible to verify that replacement DSL was doing the same
thing as existing minilang by comparing the ASTs (before we start
refactoring!).

Cheers

Paul Foxworthy



On 18 February 2017 at 21:45, Jacques Le Roux <jacques.le.r...@les7arts.com>
wrote:

> I agree with both of you.
>
> The recent FinAccount deadlock issue reported on dev ML is one example of
> the type of issues which would be easier to deal with with a Turing
> complete language or at least a better DSL.
>
> My 2 cts
>
> Jacques
>
>
>
>
> Le 18/02/2017 à 10:25, Taher Alkhateeb a écrit :
>
>> +1
>>
>> let's maintain but not add more to the pile, and try to replace everything
>> written in minilang with other languages over time. I think your arguments
>> and proposal are well founded and would really improve the health of this
>> project.
>>
>> On Feb 18, 2017 12:17 PM, "Michael Brohl" <michael.br...@ecomify.de>
>> wrote:
>>
>> Hi everyone,
>>>
>>> we are currently working hard to make OFBiz a modern, quality, robust and
>>> easy to use framework.
>>> There are several ongoing initiatives like refactoring the core, UX,
>>> changing the build and plugin system and cleaning up the javadocs, only
>>> to
>>> mention a few.
>>>
>>> In mini lang I see another part of our project which needs a
>>> refactoring/change. Here are some reasons:
>>>
>>> - Programming in XML is hard to deal with when it comes to refactoring.
>>>
>>> - The "code" cannot be debugged and is hard to review and maintain.
>>>
>>> - It is slower because of the overhead of parsing and processing XML
>>> documents
>>>
>>> - It is highly verbose, even so more than Java!
>>>
>>> - It is difficult to reason about because everything appears as a string
>>> (variables, maps, objects, etc ...) which makes it very difficult to know
>>> where something was declared or modified
>>>
>>> - It is highly error prone and brittle (again due to string declarations)
>>>
>>> - It is not a full programming language (unlike groovy, or any other
>>> language that supports a DSL). Thus it has many limitations that forces
>>> the
>>> developer to write many more lines of code to achieve the same result.
>>>
>>> - The code is not reusable (limitation of the DSL)
>>>
>>> - The code is not composable (limitation of the DSL)
>>>
>>> - Minilang depends on a lot of Java constructs (implementations, not
>>> interfaces) that require refactoring, making any improvements to the core
>>> API more challenging
>>>
>>> - Minilang is used inconsistently (different DSL in widgets, services and
>>> entities). Hence, we need to keep only a minimal DSL to declare things
>>> only.
>>>
>>>
>>> We already have Java based implementations for services and events and
>>> there are ideas to implement a Groovy DSL which can be used as easy (or
>>> easier) as mini lang and does not have the above mentioned flaws.
>>>
>>> I therefore like to propose to deprecate the mini lang implementation
>>> which means:
>>>
>>> 1. there will be no new implementations based on mini lang accepted to go
>>> into the code base.
>>>
>>> 2. mini lang and mini lang code will be maintained with bug and security
>>> fixes for backwards compatibility and to support existing adopters
>>> relying
>>> on mini lang.
>>> There will be no new features though.
>>>
>>> 3. we will continously replace the mini lang implementations with Java
>>> and/or Groovy code. This will be another good opportunity for
>>> contributors
>>> to engage in the project.
>>>
>>>
>>> This will certainly be a longer process and we will not stop support for
>>> mini lang but I think we should avoid to add more mini lang
>>> implementations
>>> to the project.
>>>
>>> What do you think?
>>>
>>> Regards,
>>>
>>> Michael
>>>
>>>
>>>
>>>
>>>
>


-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: How to calculate inventory of stock move.

2017-02-15 Thread Paul Foxworthy
Hi,

InventoryItem is the item in stock within a facility, so it has
relationships to the product, expiry dates, and so on.

InventoryItemDetail is a history of the changes to the item as stock
arrives and leaves. OFBiz does not directly modify the quantity on hand for
an Inventory Item. Rather, there's a service to create a new Inventory Item
Detail which also modifies the QOH. This is much like a bank account - you
don't directly modify the balance, rather there are deposits and
withdrawals which keep a history of every change to the balance.

I often think InventoryItemDetail is badly named, and perhaps should be
InventoryItemHistory, or some other word to do with changes or transactions.

InventoryTransfer records when you move stock between facilities. If you
receive goods into a facility and despatch them to fill orders or as an
input to a manufacturing process, there will be no InventoryTransfer
records at all. OFBiz only needs an InventoryTransfer when you adjust stock
levels by moving them between facilities. Note that the InventoryTransfer
entity has attributes for two facilities. So if there is an
InventoryTransfer, there will also be InventoryItemDetail records for the
two facilities involved.

You shouldn't need to calculate the inventory levels for a stock move at
all. You'd call the right service and tell OFBiz the inventory item and the
quantity.  Have a look at /facility/control/TransferInventoryItem and the
createInventoryTransfer service.

Please ask questions like this on the ofbiz users mailing list
u...@ofbiz.apache.org, see https://ofbiz.apache.org/mailing-lists.html for
details.

Hope that helps.

Paul Foxworthy

On 14 February 2017 at 21:50, Sapphire R_Thailand <
sapphireapacheof...@gmail.com> wrote:

> Hi !!
>
> How to calculate inventory of stock move and explain relation between
> Inventory_item Table , Inventory_item_details Table , inventory_transfer
> Table and etc. ?
>
> Thank you.
> Sapphire
>



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Use ecomseo on demo rather than ecommerce

2017-02-14 Thread Paul Foxworthy
On 25 January 2017 at 17:57, Jacques Le Roux <jacques.le.r...@les7arts.com>
wrote:

I guess you know that most of the spiders bots which are crawling the web
are not doing for the good of websites and users. Better to prevent them to
hurt in any way. OOTB the ecomseo webapp is better than the ecommerce on
this aspect.

Le 25/01/2017 à 03:56, Paul Foxworthy a écrit :
>
>> Are you saying that there are more differences between ecommerce and
>> ecomseo than just the format of the URLs, and that those other differences
>> lead to a security flaw in ecommerce? If that is right, shouldn't the flaw
>> be fixed in its own right, as a separate issue from the exact format of
>> URLs?
>>
>> Hi Paul,
>
> No it's not a security flaw, just that spiders will do a better job using
> ecomseo and there are other features.
>

Hi Jacques,

Can you outline what features are in ecomseo and not ecommerce? Are the
features of ecomseo a superset of those of ecommerce, or are there some
things in ecommerce but not ecomseo?

If there isn't a security flaw, what does ecomseo prevent?

I sincerely do want to understand the issues here, and I don't intend to
criticise anyone.

Thanks

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Invoice Item type copied into GL Account type?

2017-02-13 Thread Paul Foxworthy
On 14 February 2017 at 01:00, Jacopo Cappellato  wrote:

>
> One way to go to preserve the existing functionalities would be that of
> creating one GlAccountType for each InvoiceItemType and VarianceReason
> records. Then we would need to define a mechanism to map
> InvoiceItemType/VarianceReason to GlAccountType.
> This would make the design a bit more "correct" but still it would be very
> complex, without adding much value.
>

Thanks again Jacopo.

Variance I think is fine as-is. You can use VarianceReasonGlAccount to get
directly to a GL account, no need to think about
GL account types. Note that in getGlAccountFromAccountType, variance is
handled early and simply. So I think the only problem
is that we are overloading the glAccountTypeId with the varianceReasonId,
and a separate parameter is all that's needed.

I'd like to suggest a fairly simple way to get the GL account type for GL
entries for an invoice .

In many cases, when getGlAccountFromAccountType is called, the caller
already knows the right GL account type, and
we have the type in the glAccountTypeId parameter.

For invoices, it's more complex. In InvoiceItemType, there is a default GL
account in the defaultGlAccountId attribute. In getGlAccountFromAccountType,
if we've received an invoice item but no GL account type, how about we
infer the GlAccountType from the default GL account? In other words,
go InvoiceItem->InvoiceItemType->default GL account->GL account type. Get
the GlAccountType associated with the default GL account and
use that as we look up PartyGlAccount, ProductGlAccount or
InvoiceItemTypeGlAccount. If there is nothing relevant in the ...GlAccount
entities,
you'd end up with that default GL account and therefore that GL account
type anyway.

A possible alternative would be to explicitly add an attribute to
InvoiceItem for a default GL account type, in addition to the current
specific
GL account. But surely the specific account would be of that type? In other
words, we can infer it anyway, without any need for a new attribute.

What do people think?

We could do this but, as I mentioned earlier, my preference would be to
> spend some time thinking/redefining the meaning of GlAccountTypes and (that
> could be that of identifying events that are relevant for the GL) and then
> clean up the system accordingly.
>

I have been writing up some notes on categorising GL accounts, which I will
post here soon. It seems very messy. At the moment I agree redefining or
clarifying
the meaning of GL account types is a good idea.

When you talk about "identifying events relevant for GL", I'm not quite
with you. Are you suggesting a more data driven approach rather than the
specific services
createAcctgTransFor... ? If so, yes that would be a good idea and more
extensible.

Cheers

Paul

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788 <+61%203%209585%206788>
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Invoice Item type copied into GL Account type?

2017-02-12 Thread Paul Foxworthy
On 10 February 2017 at 21:50, Jacopo Cappellato <
jacopo.cappell...@hotwaxsystems.com> wrote:


> It is not a bug, because the system use that value to decode the account
> id.
>

Thanks Jacopo.

I still think we have a serious problem.

I see in getGlAccountFromAccountType at line 533

http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/minilang/ledger/GeneralLedgerServices.xml?view=markup#l533



So yes, at that point the method is expecting an InvoiceItemType, and you
could say the parameter is misnamed. There is some method to the madness
:-).

However, before that, at line 438

http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/minilang/ledger/GeneralLedgerServices.xml?view=markup#l438

it has called getPartyGlAccountInline, which wants a GL account type.

And if the getGlAccountFromAccountType has not found specific GL accounts
for a party or product, towards the end at line 556 it
calls getGlAccountTypeDefaultInline. getGlAccountTypeDefaultInline again
expects a GL account type, not an invoice item type.

http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/minilang/ledger/GeneralLedgerServices.xml?view=markup#l566

I think we need separate parameters invoiceItemTypeId and varianceReasonId,
instead of attempting to overload the meaning of the glAccountTypeId
parameter.

What do you think?

Thanks

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Invoice Item type copied into GL Account type?

2017-02-10 Thread Paul Foxworthy
Hi all,

As you might guess if you've been looking at Jira and the dev list lately,
I've been working on purchases and sales generating GL transactions.

Please have a look at the createAcctgTransForPurchaseInvoice method in
applications/accounting/minilang/ledger/GeneralLedgerServices.xml

line 2024 in trunk does this:



Wat?

There are two different sets of values defined in two different places for
invoice item types and GL account types. Surely you can't just copy a value
from one to the other? Shouldn't there be a service right here to find a
decent GL account type based on the invoice item type?

Later on, the getGlAccountFromAccountType service looks at all sorts of
things to decide the final GL account to use. But the GL Account *type* is
an input to that.

Am I missing something, or is this a very nasty bug?

Thanks

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Use ecomseo on demo rather than ecommerce

2017-01-24 Thread Paul Foxworthy
On 25 January 2017 at 07:12, Jacques Le Roux 
wrote:


> I guess you know that most of the spiders bots which are crawling the web
> are not doing for the good of websites and users. Better to prevent them to
> hurt in any way. OOTB the ecomseo webapp is better than the ecommerce on
> this aspect.
>

Are you saying that there are more differences between ecommerce and
ecomseo than just the format of the URLs, and that those other differences
lead to a security flaw in ecommerce? If that is right, shouldn't the flaw
be fixed in its own right, as a separate issue from the exact format of
URLs?

Thanks

Paul

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Does the deleteWorkEffort really always works?

2017-01-23 Thread Paul Foxworthy
Hi Jacques and Scott,

On 23 January 2017 at 09:08, Scott Gray 
wrote:


> I can't think of any *good* reasons to remove a WorkEffort record.


Hear, hear. In general, OFBiz expires an entity by setting the thruDate.
What's so special about WorkEffort?

Cheers

Paul

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: AccountingQuantity, COGS method and inventory valuation

2017-01-06 Thread Paul Foxworthy
Hi Taher,

On 7 January 2017 at 18:06, Taher Alkhateeb 
wrote:


> So your bottom line conclusion aside from changing the service design is to
> have matching figures between accountingQuantity and QOH. And I think the
> way you want to achieve this is by changing the implementation in
> createAcctgTransForShipmentReceipt right?
>

Yes, when the COGS method is COGS_INV_COST or COGS_AVG_COST. That service
is already doing the right thing for COGS methods of FIFO and LIFO.

I think for a given product, the total quantity on hand and total
accounting quantity should always be the same. That should be an invariant.
The different COGS methods just vary the distribution of the accounting
quantities across different inventory items for that product.

Cheers

Paul Foxworhy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


AccountingQuantity, COGS method and inventory valuation

2017-01-06 Thread Paul Foxworthy
Hi all,

I believe the treatment of accounting quantity for inventory items is
flawed. I'd like anyone with knowledge of this to review the following and
see if I have misunderstood anything. If I do understand correctly, I'll
create some Jira tickets in due course.

1. Why accounting quantity?
--

When inventory is received or shipped, there's an accounting transaction
that debits the inventory on hand value and credits Cost of Goods Sold
(COGS).

There's more than one way of deciding what value is added to COGS.

First and most obvious is the actual cost of the inventory item. But
companies may prefer other strategies. OFBiz has the option of three
others: average cost, first-in-first-out or last-in-first-out. There's a
nice survey of *why* you might choose one of these at
http://www.dummies.com/business/operations-management/choosing-an-
accounting-method-for-the-cost-of-goods-sold-expense/,
http://www.dummies.com/business/accounting/the-fifo-
method-for-cost-of-goods-sold/, http://www.dummies.com/
business/accounting/the-lifo-method-for-cost-of-goods-sold/

Note that if you choose anything other than inventory item cost, the money
amount transferred to the COGS account may be *different* to the cost price
of the inventory items being shipped. When you choose FIFO or LIFO, the
amount may have originated from a different inventory item, received at a
different time.

2. Current situation in OFBiz
--

The cogsMethodId field in the PartyAcctgPreference entity is a enum with
four possible values:COGS_INV_COST, COGS_AVG_COST,  COGS_FIFO, COGS_LIFO..

The accountingQuantity field in the InventoryItem entity and
accountingQuantityDiff in the InventoryItemDetail entity track the quantity
of an item still "live" for the purpose of inventory valuation and COGS.

In the service createAcctgTransForShipmentReceipt implemented
in /applications/accounting/minilang/ledger/GeneralLedgerServices.xml
(http://svn.apache.org/viewvc/ofbiz/trunk/applications/
accounting/minilang/ledger/GeneralLedgerServices.xml?view=markup#l1306)

the accountingQuantity is always set to the same value as the quantity
received (i.e. the same as the quantityOnHand) for a newly received
inventory item regardless of the COGS method.

When items are shipped, the service
createAcctgTransForSalesShipmentIssuance will only reduce the accounting
quantity if the COGS method is FIFO or LIFO (http://svn.apache.org/viewvc/
ofbiz/trunk/applications/accounting/minilang/ledger/
GeneralLedgerServices.xml?view=markup#l1127). I can't find anywhere else
where the accounting quantity is reduced.

With FIFO, when an item is shipped, inventory items for the product with a
non-zero accounting quantity are found sorted from earliest to latest
received. The quantity of the item shipped must be decremented from the
accounting quantities, starting with the earliest. Similarly, with LIFO,
items are sorted from latest to earliest, and the latest item or items are
decremented.

In other words, if you have chosen a COGS method of COGS_INV_COST or
COGS_AVG_COST, the accounting quantity is meaningless and in OFBiz as of
now, should be ignored.

And yet, the Inventory Valuation report uses accounting quantity,
regardless of the the COGS method (http://svn.apache.org/viewvc/
ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.
xml?view=markup#l535). In other words, the Inventory Valuation report is
broken for COGS methods of COGS_INV_COST or COGS_AVG_COST.

3. What should happen
--

I would argue that the Inventory Valuation report, and anybody else who
cares, should always be able to trust the accounting quantity. For
COGS_INV_COST and COGS_AVG_COST, maintaining the accounting quantity is
simple - it should just match the quantity on hand. I would argue it should
still be there, so the Inventory Valuation report works for COGS_INV_COST.

No matter what the COGS method, the total accounting quantity should always
be equal to the total QOH, regardless of the COGS method.

In addition, the Inventory Valuation report needs to be redesigned for the
average cost method. If you've chosen the average cost method, there is no
point in listing different inventory items. All inventory items will have
the same average cost, so I don't see the point in listing them
individually. Rather, lines in the report should just have the product and
the average cost.

Jira tickets https://issues.apache.org/jira/browse/OFBIZ-5314 and
https://issues.apache.org/jira/browse/OFBIZ-5283 have some relevance to
this problem.

Cheers

Paul Foxworthy

-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788 <+61%203%209585%206788>
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Serialized Inventory issue with backorder item

2016-12-21 Thread Paul Foxworthy
Hi Renuka, James and Deepak,

You could argue that an InventoryItem can only have a type of Serialized
when there actually *is* inventory with a serial number. In other words, if
I see a type of Serialized, I should be able to discover what the serial
numbers are.

So when there's a deficit, maybe the InventoryItem should say
Non-serialized, provided the type is set to Serialized when stock arrives.
What do you think?

Cheers

Paul Foxworthy



On 19 December 2016 at 17:54, Deepak Dixit <deepak.di...@hotwaxsystems.com>
wrote:

> Hi James,
>
> System create new inventory item each time, it does not use single
> InventoryItem for all backorder. So it create incorrect inventory item(s)
> data for serialized inventory item.
> I think we can refine serialized inventory item support under
> https://issues.apache.org/jira/browse/OFBIZ-7762
>
> As per current implementation serialized inventory logic implemented on
> status, and non-serialized inventory logic implemented on
> InventoryItemDetail.
>
> Ideally both should use IID and if item is serialized than qoh can't be
> greater then one, if we go with this route than we can implement status
> base check on both type of inventory item.
> Like if inventory item is defective than we can set its ATP to zero for
> both cases etc
>
>
>
>
>
>
>
> Thanks & Regards
> --
> Deepak Dixit
> www.hotwaxsystems.com
>
> On Sat, Dec 17, 2016 at 8:42 PM, james yong <i_yon...@yahoo.com.sg> wrote:
>
> > Hi Renuka,
> >
> > In this case, the non-serialized inventory acts as a placeholder to
> ensure
> > the final ATP is correct.
> > This is correct behaviour, and not a bug.
> >
> > Regards,
> > James
> >
> >
> > Renuka Srishti-2 wrote
> > > Hello All,
> > >
> > > In OFBiz, when we create an order for product with serialized inventory
> > > with quantity more than ATP then a negative ATP Inventory Item record
> is
> > > created, which is of type Non-Serialized.
> > > It should be of type serialized .
> > >
> > > If we resolve this issue, we need to check all scenarios related to
> this
> > > process. Please let me know your thoughts. If it looks good I will
> open a
> > > ticket for the same.
> > >
> > > Thanks
> > >
> > > --
> > > Regards,
> > > Renuka Srishti
> >
> >
> >
> >
> >
> > --
> > View this message in context: http://ofbiz.135035.n4.nabble.
> > com/Serialized-Inventory-issue-with-backorder-item-
> tp4700367p4700409.html
> > Sent from the OFBiz - Dev mailing list archive at Nabble.com.
> >
>



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: Use of utility method for checking null GenericValue

2016-11-29 Thread Paul Foxworthy
See Jira issue OFBIZ-4427 https://issues.apache.org/jira/browse/OFBIZ-4427.

Ratnesh is absolutely right. UtilValidate.isEmpty and ...isNotEmpty should
only be used in places where "emptiness" is relevant. They should not be
used when all that is needed is == null or != null .

The issue has a patch that is now quite old, and a couple of unresolved
questions.

On 24 June 2016 at 00:24, Ratnesh Upadhyay 
wrote:

> Thanks everyone for your valuable inputs on it. I'll create logical sub
> tickets to establish this practice in OFBiz.
>
> Regards,
> Ratnesh Upadhyay
> HotWax Systems | www.hotwaxsystems.com
>
> On Mon, Jun 20, 2016 at 3:04 PM, Scott Gray 
> wrote:
>
> > +1, good idea thanks Ratnesh
> >
> > Regards
> > Scott
> >
> > On 18 June 2016 at 02:30, Ratnesh Upadhyay 
> > wrote:
> >
> > > Hello community,
> > >
> > > There are lots of places in code where we have used
> > > UtilValidate.isNotEmpty() or UtilValidate.isEmpty() for GenericValue
> > object
> > > . GenericValue is never empty. Its always null or not null. So should
> we
> > > use directly null or not null check instead of
> UtilValidate.isNotEmpty()
> > > and UtilValidate.isEmpty() for GenericValue objects ?
> > >
> > > Basically these validation methods should preferably be used on Strings
> > or
> > > Lists and normal Maps.
> > >
> > > Thanks!!
> > >
> > > Regards,
> > > Ratnesh Upadhyay
> > > HotWax Systems | www.hotwaxsystems.com
> > >
> >
>



-- 
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia

Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: i...@coherentsoftware.com.au


Re: OFBiz security issues

2016-11-29 Thread Paul Foxworthy
Hi all,

Using JIRA is a good idea, and we need to be able to find them. But a
security issue is not a subtask and not a component. I think a tag will
work fine.

Thanks

Paul


On 30 November 2016 at 00:42, Jacopo Cappellato <
jacopo.cappell...@hotwaxsystems.com> wrote:

> Tags or components are fine to me (you can specify more than one component
> to each ticket); I agree that a tag may be more appropriate for this use
> case. My preference is just to not use subtasks.
>
> Jacopo
>
> On Tue, Nov 29, 2016 at 2:13 PM, Pierre Smits 
> wrote:
>
> > Well...
> >
> > CVEs can occur on any component (even though past issues have been
> related
> > for most to framework components. So having a particular component just
> for
> > CVE reference purposes would complicate matters as much as converting
> JIRA
> > issues into sub-tasks.
> >
> > Applying a tag to the issue (e.g. CVE) and using a persisted filter in
> JIRA
> > would be sufficient to link to from the download page (and elsewhere e.g.
> > the 'keeping OFBiz secure' cwiki page.
> >
> > Best regards,
> >
> >
> >
> >
> > Pierre Smits
> >
> > ORRTIZ.COM 
> > OFBiz based solutions & services
> >
> > OFBiz Extensions Marketplace
> > http://oem.ofbizci.net/oci-2/
> >
> > On Tue, Nov 29, 2016 at 2:04 PM, Jacopo Cappellato <
> > jacopo.cappell...@hotwaxsystems.com> wrote:
> >
> > > Rather than using subtasks I think it would be better to use a
> component
> > > (named CVE or similar).
> > >
> > > Il 29 Nov 2016 1:50 PM, "Jacques Le Roux" <
> jacques.le.r...@les7arts.com>
> > > ha
> > > scritto:
> > >
> > > > Also it would be better if we can group all security issues in Jira.
> > For
> > > > that I created OFBIZ-1525, please if you create Jira security issues
> > > create
> > > > (or convert) them as subtasks of OFBIZ-1525
> > > >
> > > > Thanks
> > > >
> > > > Jacques
> > > >
> > > >
> > > > Le 29/11/2016 à 11:05, Pierre Smits a écrit :
> > > >
> > > >> Of course, I implied this policy to be in line with
> > > >> http://www.apache.org/security/
> > > >>
> > > >> Best regards,
> > > >>
> > > >> Pierre Smits
> > > >>
> > > >> ORRTIZ.COM 
> > > >> OFBiz based solutions & services
> > > >>
> > > >> OFBiz Extensions Marketplace
> > > >> http://oem.ofbizci.net/oci-2/
> > > >>
> > > >> On Tue, Nov 29, 2016 at 10:59 AM, Nicolas Malin <
> > > nicolas.ma...@nereide.fr
> > > >> >
> > > >> wrote:
> > > >>
> > > >> Yes I agree with Jacopo, when can create the issue only when they
> are
> > > >>> corrected
> > > >>>
> > > >>> Nicolas
> > > >>>
> > > >>>
> > > >>>
> > > >>> Le 29/11/2016 à 10:55, Jacopo Cappellato a écrit :
> > > >>>
> > > >>> We can definitely create one Jira ticket for each CVE number with
> all
> > > the
> > >  details we want and link them from the "security" section of the
> > OFBiz
> > >  download page.
> > >  This was probably implied in Pierre's proposal, but I prefer to
> > >  explicitly
> > >  state here: these tickets will be created only after the CVE are
> > >  publicly
> > >  disclosed (i.e. the tickets will be created and resolved at the
> same
> > >  time).
> > >  The good news is that we can create now all the tickets for the
> CVE
> > >  processed so far in the history of OFBiz, in order to implement
> what
> > >  Pierre
> > >  has proposed here.
> > > 
> > >  Jacopo
> > > 
> > >  On Tue, Nov 29, 2016 at 10:47 AM, Pierre Smits <
> > > pierre.sm...@gmail.com>
> > >  wrote:
> > > 
> > >  Hi all,
> > > 
> > > > Recently we have seen some security issues fixed in the code base
> > > > (CVE-2016-6800 and CVE-2016-4462). Thanks to all who participated
> > in
> > > > identifying, analysing and fixing these OFBiz security threats.
> > > >
> > > > When I look at how we communicate to our adopters that there are
> > > > threats
> > > > and how they can be mitigated [1] I believe we could and we
> should
> > > do a
> > > > little bit more. There we merely put a reference to the CVE [2]
> > issue
> > > > (see
> > > > [3] for example) there and and advice to upgrade. But on that
> page
> > we
> > > > leave
> > > > out any particulars on how the issue affected OFBiz and what was
> > done
> > > > to
> > > > it. Rightly so as it is just a list of notifications.
> > > >
> > > > The details about the effect of the issue and the mitigation is
> in
> > > > commits.
> > > > But there is no apparent relation between the notification on [1]
> > and
> > > > the
> > > > actual commit that mitigated. Also reporting the CVE in JIRA
> issues
> > > not
> > > > optimal. This leads to the fact that details don't appear in
> > release
> > > > notes
> > > > very well.
> > > >
> > > > I believe we could and should do better. We should *always* have
> a
> > > JIRA
> > > > issue explaining the CVE issue and its effect on the 

Re: [VOTE] [RELEASE] Apache OFBiz 16.11.01

2016-11-21 Thread Paul Foxworthy
+1

On 22 November 2016 at 05:51, Jacopo Cappellato <
jacopo.cappell...@hotwaxsystems.com> wrote:

> This is the vote thread to issue the first release from the branch
> "release16.11".
>
> The name of the new release will be "Apache OFBiz 16.11.01".
>
> The release files can be downloaded from here:
>
> https://dist.apache.org/repos/dist/dev/ofbiz/
>
> and are:
>
> * apache-ofbiz-16.11.01.zip: the actual release file
>
> * KEYS: file with keys
>
> * apache-ofbiz-16.11.01.zip.asc: the detached signature file
>
> * apache-ofbiz-16.11.01.zip.md5, apache-ofbiz-16.11.01.zip.sha: hashes
>
> Vote:
>
> [ +1] release as Apache OFBiz 16.11.01
>
> [ -1] do not release
>
> This vote will be open for 5 days.
>
> For more details about this process please read
> http://www.apache.org/foundation/voting.html
>
> You can download and test the zip file and its signature and hashes (for
> instructions on testing the signature see
> http://www.apache.org/info/verification.html).
>
> Kind Regards,
>
> Jacopo
>


Re: Ecommerce Portal Enhancement

2016-10-16 Thread Paul Foxworthy
On 16 October 2016 at 16:46, james_sg <snowme...@hotmail.com> wrote:


> More people are shopping with their mobile phones;
> Would be good to have responsive web design for ecommerce.
>

Yes, responsive web design would be a good idea. But it should be done
using theming, so it would be applicable to all of OFBiz and not just
ecommerce.

Cheers

Paul Foxworthy


Re: svn commit: r1759147 - in /ofbiz/trunk/applications/order/groovyScripts: entry/ entry/cart/ entry/catalog/ order/ quote/

2016-10-13 Thread Paul Foxworthy
Hi all,

Can I turn the proposition around? If I was looking for example code to
find products with a feature, I would be looking in the wiki and other
documentation. In other words, I would look in places where examples are to
be found. I would not look in the source code. So putting an example in the
code would make it obscure and hard to find.

Cheers

Paul Foxworthy


On 2 October 2016 at 21:55, Jacques Le Roux <jacques.le.r...@les7arts.com>
wrote:

> Despite the possible decay, I still think the best place is in the
> context. But it's up to the community.
>
> Jacques
>
>
>
> Le 02/10/2016 à 12:25, Taher Alkhateeb a écrit :
>
>> Put it somewhere in documentation if you want to. Live code is not a place
>> for commented out code snippets, it's bad coding practice and it adds to
>> the entropy and chaos. Commented out code with time decays and eventually
>> becomes broken and does not even work (changing dependencies, API
>> signatures, etc ...). Also, usually when committers see commented out code
>> they think someone put it there because they're working on it and it is
>> important somehow. No code should be important and everything should be
>> subject to refactoring and improvement.
>>
>> I think places where example code is suitable are: documentation and
>> tests.
>> Beyond that, it is just dead weight
>>
>> On Sun, Oct 2, 2016 at 1:17 PM, Jacques Le Roux <
>> jacques.le.r...@les7arts.com> wrote:
>>
>> Then how to keep this interesting code example?
>>>
>>> Jacques
>>>
>>>
>>>
>>> Le 02/10/2016 à 12:12, Taher Alkhateeb a écrit :
>>>
>>> Commented out code should always be removed as a general programming
>>>> guideline
>>>>
>>>> On Sun, Oct 2, 2016 at 1:10 PM, Jacques Le Roux <
>>>> jacques.le.r...@les7arts.com> wrote:
>>>>
>>>> Hi Ashish,
>>>>
>>>>> I think we should keep this example
>>>>>
>>>>> Thanks
>>>>>
>>>>> Jacques
>>>>>
>>>>>
>>>>> Le 04/09/2016 à 08:41, ash...@apache.org a écrit :
>>>>>
>>>>> Author: ashish
>>>>>
>>>>>> Date: Sun Sep  4 06:41:20 2016
>>>>>> New Revision: 1759147
>>>>>>
>>>>>> URL: http://svn.apache.org/viewvc?rev=1759147=rev
>>>>>> Log:
>>>>>> Applied patch from jira issue - OFBIZ-8074 - Clean up commented out
>>>>>> code
>>>>>> in Groovy for Order. Thanks Aman for the contribution.
>>>>>>
>>>>>> -/*
>>>>>> -  The following code is commented out because it is just an
>>>>>> example
>>>>>> of the business logic to retrieve products with a similar feature.
>>>>>> -
>>>>>> -// get other cross-sell information: product with a common
>>>>>> feature
>>>>>> -commonProductFeatureId = "SYMPTOM";
>>>>>> -// does this product have that feature?
>>>>>> -commonProductFeatureAndAppls = delegator.findByAnd("ProductFe
>>>>>> atureAndAppl",
>>>>>> [productId : productId, productFeatureTypeId :
>>>>>> commonProductFeatureId],
>>>>>> ["sequenceNum", "defaultSequenceNum"], false);
>>>>>> -if (commonProductFeatureAndAppls) {
>>>>>> -commonProductFeatureIds = EntityUtil.getFieldListFromEnt
>>>>>> ityList(commonProductFeatureAndAppls, "productFeatureId", true);
>>>>>> -
>>>>>> -// now search for other products that have this feature
>>>>>> -visitId = VisitHandler.getVisitId(session);
>>>>>> -
>>>>>> -productSearchConstraintList = [];
>>>>>> -productSearchConstraintList.add(new
>>>>>> ProductSearch.FeatureSetConstraint(commonProductFeatureIds));
>>>>>> -// make sure the view allow category is included
>>>>>> -productSearchConstraintList = ProductSearchSession.ensureVie
>>>>>> wAllowConstraint(productSearchConstraintList, currentCatalogId,
>>>>>> delegator);
>>>>>> -
>>>>>> -// don't care about the sort on this one
>>>>>> -resultSortOrder = null;
>>>&

  1   2   3   4   5   >