Web Services : Automatically fill records on Parameters table

Description

None

Environment

None

Activity

Show:
Nicolas Micoud
June 24, 2020, 9:31 AM

Ok, thank you.

2 issues now :
#1 : I can't find the display logic to use for the field (which should be displayed only if there is no records on the parameters tab.
I tried sql and 'real' logic, but nothing worked ; any idea ?
eg: @1|WS_WebServiceType_ID:0@ = @0|WS_WebServiceType_ID@ ; @SQL=SELECT 'Y' FROM WS_WebService_Para WHERE WS_WebServiceType_ID = @WS_WebServiceType_ID@

#2 : the class of the process cannot be found
11:25:13.192-----------> DefaultProcessFactory.newProcessInstance: org.idempiere.process.webservices.WebServiceTypeCreateParameters [285]
java.lang.ClassNotFoundException: org.idempiere.process.webservices.WebServiceTypeCreateParameters cannot be found by org.adempiere.base_6.2.0.qualifier

=> Is it ok to add a WebServicesProcessFactory class in org.idempiere.webservices ?

Thanks,

Nicolas

Carlos Ruiz
June 24, 2020, 10:29 AM

#1 - I don't remember how is the logic for a @SQL - that has not been documented.
I think is something about
@SQL=[and here an SQL that returns one row for true, or no rows for false] <- but I'm not sure about this, better to check it and document it

#2 - => Is it ok to add a WebServicesProcessFactory class in org.idempiere.webservices ?

Yes

Nicolas Micoud
June 24, 2020, 3:23 PM

I was not far with my query ^^

Wiki page created : https://wiki.idempiere.org/en/NF7.1_@SQL_notation_for_display_logic

Pull request updated.

nb: you need to first integrate https://idempiere.atlassian.net/browse/IDEMPIERE-4344, otherwise the process can't be executed.

Regards,

Nicolas

Carlos Ruiz
July 21, 2020, 9:43 AM

Hi , I added a second commit for the peer review and my tests.

Regards,

Carlos Ruiz

Nicolas Micoud
July 21, 2020, 9:48 AM

Hi

The DisplayLogic is definetely better
But now I know @SQL can be used for display logic as well

Thanks,

Nicolas

Assignee

Nicolas Micoud

Reporter

Nicolas Micoud

Labels

Tested By

None

Components

Fix versions

Priority

Major
Configure