Action Executor sample code does not compile for Liferay Portal 7.4.3.132

thumbnail
Tim Telcik, modified 1 Month ago.

Action Executor sample code does not compile for Liferay Portal 7.4.3.132

New Member Posts: 10 Join Date: 4/1/10 Recent Posts

​​​​​​Hello Liferay Community Admin,

the online Liferay Developer guide contains an invalid Action Executor sample project for the Creating an Action Executor page.

The Creating an Action Executor page is available at

https://learn.liferay.com/w/dxp/low-code/workflow/developer-guide/creating-an-action-executor

The sample project referenced on the page is available at

https://resources.learn.liferay.com/examples/liferay-e5c9.zip


The sample project contains code and configuration intended for Liferay Portal 7.4 GA132

e.g.


% cat gradle.properties 
liferay.workspace.product=portal-7.4-ga132
liferay.workspace.target.platform.version=7.4.3.132
 


However, attempting to build the sample project will trigger a compilation error, due to a mismatch in the WorkflowDefinitionManager#deployWorkflowDefinition usage.

e.g.


% ./gradlew clean build

> Task :stopDockerContainer
Stopping container with ID 'liferay-e5c9-liferay'.
No container with ID 'liferay-e5c9-liferay' running.

> Task :removeDockerContainer
Removing container with ID 'liferay-e5c9-liferay'.
No container with ID 'liferay-e5c9-liferay' found.

> Task :cleanDockerImage
Removing image with ID 'liferay-e5c9-liferay:7.4.3.132-ga132'.
No image with ID 'liferay-e5c9-liferay:7.4.3.132-ga132' found.

> Task :e5c9-impl:compileJava FAILED
/Users/tim.telcik/dev/ws/liferay/liferay-examples/workflow-action-executor/liferay-e5c9/e5c9-impl/src/main/java/com/acme/e5c9/internal/workflow/kaleo/runtime/scripting/internal/action/E5C9ActionExecutor.java:75: error: no suitable method found for deployWorkflowDefinition(long,long,String,String,byte[])
                _workflowDefinitionManager.deployWorkflowDefinition(
                                          ^
    method WorkflowDefinitionManager.deployWorkflowDefinition(String,long,long,String,String,byte[]) is not applicable
      (actual and formal argument lists differ in length)
    method WorkflowDefinitionManager.deployWorkflowDefinition(String,long,long,String,String,String,byte[]) is not applicable
      (actual and formal argument lists differ in length)
Note: /Users/tim.telcik/dev/ws/liferay/liferay-examples/workflow-action-executor/liferay-e5c9/e5c9-impl/src/main/java/com/acme/e5c9/internal/workflow/kaleo/runtime/scripting/internal/action/E5C9ActionExecutor.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':e5c9-impl:compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
> Run with --info option to get more log output.
> Run with --scan to get full insights.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.5/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 833ms
 

 

Is there an alternative branch for this sample project which contains a valid set of code and configuration for Liferay Portal 7.4 GA132?

Please review and advise.


Thank you,

Tim

 

Community
Company
Feedback