# Develop and Sync Scripts

Developing and testing Groovy Scripts is a pain ... if you don't have [ScriptEase](https://app.gitbook.com/o/GdemkqEHstG0W2wIO2Tl/s/Pdcc5uQt1eQainblDyLx/).

Here is the description how to connect and synchronize your local Scripts with your Boomi Integration repository.&#x20;

<details>

<summary>Pre-Conditions</summary>

* Boomi Console is [connected ](https://boomi.markusschmidt.pro/boomi-console/installation/setup-a-workspace-and-connect/connect-your-project-1)to your Boomi Account.
* You can run `bc code pull`.
* You have set-up [ScriptEase](https://app.gitbook.com/o/GdemkqEHstG0W2wIO2Tl/s/Pdcc5uQt1eQainblDyLx/).&#x20;

</details>

<details>

<summary>Preparation - One-time setup</summary>

#### Create a new Script Component

You cannot create new scripts from the command-line but you can [pull](https://boomi.markusschmidt.pro/boomi-console/commands/code-sql-and-scripts/code-pull) existing scripts to your local workspace. For that reason, you **start creating a new plain script in Boomi Integration**.

<figure><img src="https://856602315-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJ5pAMZk3evA8VCVuQL%2Fuploads%2FxEPGA8dxoYjWuipY74Rm%2Fimage.png?alt=media&#x26;token=ad1900cf-32d3-462e-a0f5-a0f3253c58fc" alt=""><figcaption><p>Plain / blank Script</p></figcaption></figure>

Once done, run a `bc CODE PULL` to update your local Workspace - to **pull the created script**. You will find it then on your local hard-disk.

<figure><img src="https://856602315-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJ5pAMZk3evA8VCVuQL%2Fuploads%2FFP7XKCqhScWOIkiXBbFE%2Fimage.png?alt=media&#x26;token=1fd6eb2a-9f5b-4097-8bf1-3a980f2671e7" alt=""><figcaption></figcaption></figure>

#### Create a symbolic-link

The next step is to **create a symbolic link: `MKLINK Link Target`**

* *Link*: from the *CODE-File* that is synchronized with Boomi Integration\
  (source - *Boomi Console* Workspace)&#x20;
* *Target*:  to the file in your development space \
  (target - *ScriptEase* Workspace).

{% hint style="info" %}
Using symbolic links (with Windows) allows you to have one physical (target) file (the one in your *ScriptEase* development Workspace) and any number of (symbolic)  links to that file. The file-explorer will clearly state: it is a symbolic link. You can safely *remove* the link without deleting the physical file.
{% endhint %}

But before you can create the link,&#x20;

* copy the name of the downloaded CODE-File, and
* delete the CODE-File you just downloaded because it will be replaced by the link.

```bash
MKLINK 
  ...\BC\Code\...\NumberValidation\psg.GRQueryBuilder.a7448fef-...groovy
  ...\Scripts\src\processScript\dataHub\psgGRQuery.groovy
  
symbolic link created for 
  ...\BC\Code\...\NumberValidation\psg.GRQueryBuilder.a7448fef-...groovy
  <<===>> 
  ...\Scripts\src\processScript\dataHub\psgGRQuery.groovy
  
```

#### Push your local file back to Boomi Integration

Push your new code back to Boomi: `bc CODE PUSH /force`

{% hint style="info" %}
Use the `/force` option to force pushing the local file to Boomi, even if the component in Boomi was created later than the local file itself. Once, forced to push, everything goes normal and you can omit the force option.&#x20;
{% endhint %}

</details>
