# Open Development Framework Pre-Packaged Components

This repository contains source code of ODF Components project.

## Documentation

Public ODF documentation is maintained on KB: https://kb.workfusion.com/display/ODF/Welcome+To+Open+Development+Framework

## Local development environment

1. Install [WorkFusion Studio](https://kb.workfusion.com/display/WF/Installation+and+Update)
2. Check out this project from GIT using Studio Git Repotitories view
3. Right click on checked-out repository > Import Projects > check all available Maven projects

## Release new version of ODF Components

Nexus repository for release: https://repository.workfusion.com/content/repositories/releases/

Artifacts to be released: 

1. https://repository.workfusion.com/service/local/repositories/releases/content/com/workfusion/odf/odf-bcb/X.X.X.X/odf-bcb-X.X.X.X.jar
2. https://repository.workfusion.com/service/local/repositories/releases/content/com/workfusion/odf/odf-chrome-pdf-printer/X.X.X.X/odf-chrome-pdf-printer-X.X.X.X.jar
3. https://repository.workfusion.com/service/local/repositories/wf-machine-config-bundle/content/com/workfusion/odf/odf-bcb/X.X.X.X/odf-bcb-X.X.X.X.jar

### Release process

1. If you plan to release new version of odf-chrome-pdf-printer you need to increment hardcoded version in com.workfusion.odf.impl.converter.html2pdf.RpaPdfReportGenerator.java

2. Make sure project builds without errors. In project root directory run Maven command:
```
mvn clean install
``` 

3. Add following credentials to your ~/.m2/settings.xml
```
<server>
    <id>wf-snapshots</id>
    <username>admin</username>
    <password>FXmR2p~$</password>
</server>
<server>
    <id>wf-releases</id>
    <username>admin</username>
    <password>FXmR2p~$</password>
</server>
<server>
    <id>bcb-repository</id>
    <username>deploy</username>
    <password>Workfusion!5</password>
</server>
```

4. In odf-bcb folder run Maven command:
```
mvn clean deploy -P release
```
This will deploy odf-bcb to Maven releases repository.

5. In odf-bcb folder run Maven command:
```
mvn clean deploy
```
This will deploy odf-bcb into Maven wf-machine-config-bundle repository, used by Control Tower to fetch BCBs from Nexus.  

6. Check via Nexus UI https://repository.workfusion.com that artifacts with new version appeared

7. Go to Control Tower configured with repository.workfusion.com as source of BCBs and press Import from repository button. This will fetch all Pre-Packaged bot tasks to Control Tower.