Custom Library Extension

1
0
-1

Hello , is it possible to have a useful example of create custom-library for GROOVY.

https://documentation.bonitasoft.com/bonita/latest/software-extensibilit...

1 answer

1
0
-1

I trie this

mkdir bonita-custom-libs 
cd bonita-custom-libs 
mkdir -p src/main/{groovy,resources}

mkdir -p src/test/{groovy,resources}

mkdir -p src/main/groovy/xyz/bindtech/extension/


```java
package xyz.bindtech.extension;

import java.util.logging.Logger;
import java.time.LocalDateTime;

public class Libs {
    public static dateOfDay() {
        return LocalDateTime.now();
    }

    public static dateOfDayShort() {
        return LocalDateTime.now().format('dd-MM-yyyy');
    }
}
```

mvn clean package

Nothing work when i try to call it in operation like this 

imports xyz.bindtech.extension;

new Ddate = Libs.dateOfDay()

Notifications