# The MSPro Boomi Collection

All my documentaries about and tools for Boomi Integration

Here you find my personal notes and patterns, as well as my tools and frameworks I use to build Boomi solutions and to support Boomi customers worldwide.

{% hint style="info" %}
The published content and all developments result from the author's free time. \
All tools used, hosting costs, web services etc. are privately financed. Nothing is sponsored, commented on, or approved by *Boomi, LP*.

All web-sites are maintained by the author, only, as a quick reminder of what the tools can do and how to use them.
{% endhint %}

## Product Details

<mark style="color:orange;">A convenient way to</mark> <mark style="color:orange;"></mark><mark style="color:orange;">**document Boomi Integration Components**</mark>

<mark style="color:$info;">**State**</mark><mark style="color:$info;">: Ongoing development, frequent releases, v2 used with two projects. Many, many ideas on the radar - if I have time...</mark>

{% content-ref url="/spaces/ZTIvYZCXmIwyQ0DXmM4w" %}
[Power-Tools](https://boomi.markusschmidt.pro/power-tools/)
{% endcontent-ref %}

***

<mark style="color:green;">A Groovy</mark> <mark style="color:green;"></mark><mark style="color:green;">**Script Development Environment**</mark> <mark style="color:green;"></mark><mark style="color:green;">for Boomi Integration</mark>

<mark style="color:$info;">**State**</mark><mark style="color:$info;">: Very stable for about two years. I use it regularly in my daily work.</mark>

{% content-ref url="/spaces/Pdcc5uQt1eQainblDyLx" %}
[ScriptEase For Boomi](https://boomi.markusschmidt.pro/boomi-scriptease/)
{% endcontent-ref %}

***

<mark style="color:blue;">**A Console Application**</mark> <mark style="color:blue;"></mark><mark style="color:blue;">to control</mark> <mark style="color:blue;"></mark><mark style="color:blue;">**Boomi Integration**</mark> <mark style="color:blue;"></mark><mark style="color:blue;">recurring tasks</mark>

<mark style="color:$info;">**State**</mark><mark style="color:$info;">: Stable, "function complete". I use it regularly in my daily work. Gets immediate fixes whenever something does not work.</mark>

{% content-ref url="/spaces/-MJ5pAMZk3evA8VCVuQL" %}
[Boomi Console](https://boomi.markusschmidt.pro/boomi-console/)
{% endcontent-ref %}

***

:shopping\_cart:  [FastSpring Checkout](https://mspro.onfastspring.com)


# The Author

The German Boomi PSO Consultant

#### Markus Schmidt (aka *MSPro*, aka [*@MarkusSchmidt.PRO*](mailto:Markus@MarkusSchmidt.pro))

In 2020, after more than 25 years as a professional freelance consultant, he was introduced to Boomi by a client and immediately joined the **Boomi Professional Consultant Organisation (EMEA)**. He is serving different customers to support them in all matters related to [Boomi](https://boomi.markusschmidt.pro/the-mspro-boomi-collection/www.boomi.com). He created all the documents and tools in his spare time and uses them extensively (for his own purposes) in his role as Boomi Professional Service Consultant.

## Legal Notice

Markus Schmidt\
Niedernhausener Straße 59a\
D-65207 Wiesbaden\
E-Mail: [Markus @ MarkusSchmidt.pro](mailto:Markus@MarkusSchmidt.pro)


# Copyright

Copyright Notice © 2024 by Markus Schmidt Pro. All rights reserved.

{% hint style="info" %}
**Copyright © 2024 by** [**Markus Schmidt**](http://MarkusSchmidt.pro)**.  All rights reserved.**
{% endhint %}

No part of this publication may be reproduced, distributed, or transmitted in any form or by any means, including photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the publisher, except in the case of brief quotations embodied in critical reviews and certain other non-commercial uses permitted by copyright law. For permission requests, write to the publisher at the address below:

Markus Schmidt\
Niedernhausener Straße 59a\
D-65207 Wiesbaden\
E-Mail: [Markus @ MarkusSchmidt.pro](mailto:Markus@MarkusSchmidt.pro)

***

### Intellectual Property Disclaimer

This publication contains material protected under International and Federal Copyright Laws and Treaties. Any unauthorized reprint or use of this material is prohibited. No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage and retrieval system without express written permission from the author/publisher.

All trademarks, service marks, product names, and trade names of Markus Schmidt used in this publication are trademarks or registered trademarks of Markus Schmidt. All other company and product names mentioned herein are the trademarks of their respective owners.

The author and publisher have made every effort to ensure the accuracy of the information herein. However, the information contained in this publication is provided without warranty, either express or implied. Neither the author nor the publisher shall be held liable for any damages caused or alleged to be caused directly or indirectly by this publication.


# Privacy Policy

Last updated: 2025-03-15

At `mspro.gitbook.io` and  `boomi.markusschmidt.pro` , we are committed to protecting your privacy. This Privacy Policy explains how we collect, use, and disclose your information when you visit and interact with our GitBook website.

### **Information We Collect**

We collect information in the following ways:

* **Personal Information**: We may collect personal information, such as your name and email address, if you choose to subscribe to our newsletter, sign up for an account, or contact us.
* **Usage Data**: We may automatically collect data on how you interact with our website. This may include your IP address, browser type, device type, operating system, and page views.

### **How We Use Your Information**

We use the information we collect for the following purposes:

* To provide and improve our services
* To respond to your inquiries or requests
* To send you updates or newsletters (if you’ve subscribed)
* To analyse how users interact with our website and improve its functionality

### **Data Retention**

We retain your personal data only for as long as necessary to fulfil the purposes outlined in this Privacy Policy or as required by law.

### **Data Sharing**

We do not sell, rent, or share your personal information with third parties except as necessary to provide the services on our website or as required by law. We may share your information with trusted third-party service providers who assist us in operating the website or delivering services.

### **Security**

We take reasonable precautions to protect your personal data from unauthorized access, alteration, disclosure, or destruction. However, no method of data transmission over the Internet is 100% secure, and we cannot guarantee absolute security.

### **Your Rights**

Depending on your location, you may have the right to:

* Access or correct the personal data we hold about you
* Request the deletion of your personal data
* Object to or restrict the processing of your personal data

If you wish to exercise any of these rights, please contact us at \[Your Contact Email].

### **Cookies**

Our website may use cookies and similar technologies to enhance your experience. You can control cookie settings through your browser preferences.

### **Links to Other Websites**

Our GitBook site may contain links to third-party websites. We are not responsible for the privacy practices of other websites and encourage you to review their privacy policies.

### **Changes to This Privacy Policy**

We reserve the right to update or modify this Privacy Policy at any time. Any changes will be posted on this page with an updated "Last updated" date.

### **Contact Us**

If you have any questions or concerns about this Privacy Policy, please [contact us](/the-mspro-boomi-collection/the-author).


# Terms and Conditions

Welcome to *Markus Schmidt (PRO)* software. By subscribing to our software services ("Service"), you agree to comply with and be bound by these Terms and Conditions. If you do not agree to these terms, you should not use our Service.

### **Subscription and Payment**

* Subscriptions are billed on a \[monthly/annual] basis.
* Payment is required in advance to access the Service.
* We reserve the right to change subscription fees with prior notice.
* Non-payment may result in suspension or termination of the Service.

### **License and Usage**

* Subscribers are granted a non-exclusive, non-transferable, \
  revocable license to use the Service.
* Users may not share, resell, or redistribute access to the Service.
* Unauthorized use may result in termination and legal action.

### **Termination**

* You may cancel your subscription at any time. Cancellation does not entitle you to a refund unless stated in our Refund Policy.
* We reserve the right to terminate your access if you violate these terms.

### **Limitation of Liability**

* We are not responsible for any data loss, business interruptions, or damages resulting from Service use.
* The Service is provided "as is" without any warranties.

### **Changes to Terms**

* We may update these Terms and Conditions at any time. Continued use of the Service constitutes acceptance of the revised terms.

***

## **Refund Policy**

### **Eligibility for Refunds**

* Refunds are only available for first-time subscribers who request a refund within 7 days of purchase.
* Refunds are not provided for renewal payments, partial usage, or account terminations due to violations of our Terms and Conditions.

### **Requesting a Refund**

* To request a refund, contact our support team at *markus @ markusschmidt.pro* with your order details.
* Refunds will be processed within 30 business days and credited back to the original payment method.

### **Non-Refundable Items**

* One-time setup fees and customization services are non-refundable.
* Refunds are not applicable to promotions, discounts, or special offers.

### **Chargebacks and Disputes**

* Unauthorized chargebacks may result in suspension of your account.
* If you have a dispute, contact us first to resolve the issue amicably.

## Contact Us

If you have any questions or concerns about this Privacy Policy, please [contact us](/the-mspro-boomi-collection/the-author).


# Stories & Videos


# Install BoomiConsole

This storybook shows you how to initially download and install [BoomiConsole](https://boomi.markusschmidt.pro/boomi-console/).

Video

### Storybook

1. Download BoomiConsole from here:\
   <https://boomi.markusschmidt.pro/boomi-console>\ <sup>(Read the text and chose the right package. For Windows x64 is preferred.)</sup>
2. *Exctract All* to `%LocalAppData%\programs\BoomiConsole`\ <sup>(%LocalAppData% resolves to</sup> <sup></sup><sup>*c:\users\\\<yourName>\AppData\Local*</sup><sup>)</sup>
3. Run *install.bat* to set the `BC_EXE` and `BC_DIR` environment variables

* Run *cmd* and check installation by calling `%BC_EXE%`

{% hint style="success" %}
Instllation is done and you are ready to connect y Boomi Account
{% endhint %}


# Power-Tools

A Browser Extension to build faster and better Boomi Integrations

Power-Tools for *Boomi Integration* is a **(Chrome) Browser Extensions** which contains several plug-ins for different purposes, to help you build faster and better. \
Once the [Installation](/power-tools/installation) and [Configuration](/power-tools/installation/configuration) have been done, the Power-Tools are just a mouse-click away <img src="/files/dDyH6cU2dEVlse1rDnNF" alt="" data-size="line"> , in your browser, at the end of the Url.&#x20;

<div align="center"><figure><img src="/files/SZa1V3RvUt1SzlHBaFsJ" alt="" width="541"><figcaption><p>Main Window</p></figcaption></figure></div>

{% hint style="success" %}
I still have lots of ideas about what I’d like to incorporate into the Power Tools, but, as always, I’m short on time. One key feature for me would be the ability to list and delete orphaned components. Alongside the Dependency View, this would be a useful function for keeping the repository tidy.

You can expect further features in the future, as well as support for *DataHub* functions.
{% endhint %}

### The Plug-Ins

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="image"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h4>Linked Pages </h4></td><td>Allows you to <strong>link documentation pages</strong> to your Integration components. I can assure you that this is the feature for documenting your components that you’ve always been looking for!</td><td data-object-fit="contain"><a href="/files/w7V3JJpYm1yf8uBlCzlK">/files/w7V3JJpYm1yf8uBlCzlK</a></td><td><a href="/pages/tDOEl2YFA3X15qRONA0Z">/pages/tDOEl2YFA3X15qRONA0Z</a></td></tr><tr><td><h4>Deploy Assist </h4></td><td><strong>Simplifies component deployment</strong> and provides an overview of all independent references and their versions on the target system.</td><td data-object-fit="fill"><a href="/files/wnPgez4igrO9ltptTbeg">/files/wnPgez4igrO9ltptTbeg</a></td><td><a href="/pages/sG8nHu3BLmCoGPoA9d3B">/pages/sG8nHu3BLmCoGPoA9d3B</a></td></tr><tr><td><h4>Dependency View  </h4></td><td><strong>Shows the dependencies of your components:</strong> parent components, as well as dependent and independent child components. It also shows you, which folders these components are located in. An indispensable tool for keeping track of the references.</td><td data-object-fit="contain"><a href="/files/XADtRkMgHMiGsajRRm1I">/files/XADtRkMgHMiGsajRRm1I</a></td><td><a href="/pages/pTq4wvOL6535wLPgZ6c3">/pages/pTq4wvOL6535wLPgZ6c3</a></td></tr><tr><td><h4>Smart Copy</h4></td><td>This is the smart component copying feature you need. It’s not about copying without any dependent components, nor is it about copying with all dependent components: It’s about <strong>copying those components you actually need!</strong></td><td><a href="/files/StCkKRWSJ6g5dsmbNLgp">/files/StCkKRWSJ6g5dsmbNLgp</a></td><td><a href="/pages/A5E3sk9AN6cUuzQvyunY">/pages/A5E3sk9AN6cUuzQvyunY</a></td></tr><tr><td><h4>Document</h4></td><td><strong>HTML documentation</strong> can be generated for selected component types.</td><td data-object-fit="fill"><a href="/files/BJNHP6R8urkShc4bSBrA">/files/BJNHP6R8urkShc4bSBrA</a></td><td><a href="/pages/lGUqIdnwou5c9l5tL49p">/pages/lGUqIdnwou5c9l5tL49p</a></td></tr></tbody></table>


# Linked Pages

Link any page to Boomi Integration components

The idea behind *Linked Pages* ..

Since I have begun with Boomi in 2019, I was looking for a **convenient way how to document Boomi Integration Components**. Neither *Note Shapes* nor *Process Descriptions* were helpful in any way. It took me five years, until I had got the idea how to solve this challenge.&#x20;

{% hint style="info" %}
I wanted to...

* **write documentation with my preferred tool**, \
  like Confluence, Notion, GitBook, ..
* **open my documentation directly from the Boomi Designer** \
  (navigate forth and back)
  * **document any component-type**: processes, profiles, scripts etc.
* **edit documentation side-by-side**
* **link any other web-page** - incl. (Jira) tickets - to my components.
* **share the links** with my team mates and customers
  {% endhint %}

### How it works

<figure><img src="/files/4BiJQfGSqvZz08aKWnCc" alt=""><figcaption></figcaption></figure>

1. Open a Boomi Integration component
2. Check the *Power-Tools* icon - three pages are linked to that component
3. Open the documentation page

With modern browsers you can open the Boomi Component and the documentation side-by-side. &#x20;

<figure><img src="/files/y17DBdWFhCORpahmIxSo" alt=""><figcaption></figcaption></figure>

[Linked-Pages in Action](/power-tools/readme/linked-pages/boomi-linked-pages-in-action)


# Linked-Pages in Action

A first use-case with Linked-Pages for Boomi Integration

## Let's start with a ticket

* Imagine you have a requirement (ticket):

<figure><img src="/files/xFJ7JrVftQ3ugL8tzAMP" alt="" width="563"><figcaption><p>A ticket as the source of all activities.</p></figcaption></figure>

* Go to the Boomi designer and you start your implementation.

<figure><img src="/files/N3BlXAQAsqfVMzkir30t" alt="" width="563"><figcaption><p>Invoice Read implementation started</p></figcaption></figure>

Once you have initially saved the process - after it has got its ComponentId - you go back to the ticket to tell it where to find the implementation.

On the ticket, you may have notice the *Linked-Pages for Boomi Integration* icon.

<figure><img src="/files/3pkNBk3NnTCnubI34j4Y" alt="" width="563"><figcaption><p>From the ticket we create a new link to the current component.</p></figcaption></figure>

*Link this page (the ticket) to the current component*, and the Boomi Process and the ticket are connected. You can now open the ticket directly from the Boomi process.

<figure><img src="/files/PcNjNyJISJYypenULTnL" alt=""><figcaption><p>Open linked-pages from the Boomi component.</p></figcaption></figure>

As well as you can open the Boomi process from the ticket.

<figure><img src="/files/61Xfn6q1sNbSd1gbiw7V" alt=""><figcaption><p>Open the Boomi process from the ticket.</p></figcaption></figure>


# Link to Confluence

How to connect a Boomi Component to a Confluence page

{% hint style="info" %}
I am using *Confluence* in this example because it is a very popular system for writing requirements and documentation. However, Linked-Pages for Boomi Integration was neither built for Confluence nor does it depends on Confluence in any way.

You can connect any web-page(s) with your Boomi components.
{% endhint %}

The pre-condition is, you do have a Boomi process and you want to write documentation for it. The name of the example process is ***Docs 01 - Update and Create***.

<figure><img src="/files/tiN2woIxsQBen9VOolqN" alt=""><figcaption><p>An example process</p></figcaption></figure>

Go to Confluence and start writing your documentation...

<figure><img src="/files/4yLFZ0X7tkf4mYwLrgQh" alt=""><figcaption><p>Documentation in Confluence</p></figcaption></figure>

Then connect Documentation with Component

<figure><img src="/files/iu9Y1L2Ssc7wTnKfSFHy" alt=""><figcaption><p>Form the documentation page, linke it to the current component.</p></figcaption></figure>

<figure><img src="/files/FSsjFhtcj65PANZqj8rd" alt=""><figcaption></figcaption></figure>


# Copy Hyperlink

There is a tiny but extremely useful button that copies a markdown hyperlink to the current component to the clipboard:

<figure><img src="/files/3eY4Zp5GXzpfBuHS5mqO" alt=""><figcaption><p>Copy Hyperlink</p></figcaption></figure>

See it in action:

<figure><img src="/files/qDXY8fukBf1vXMToQNbf" alt=""><figcaption></figcaption></figure>


# Use-Cases

Use-Cases how to speed-up your Boomi Integration development

<details>

<summary>Quickly navigate to parent components</summary>

This use case occurs, for example, when you **change a web service endpoint**. In this case, you must deploy the endpoint service together with the API component. If an **independent subprocess changes**, the route component and the calling processes may need to be redeployed.

#### How do Power-Tools for Boomi Integration help?

<figure><img src="/files/QUAIzdxpfC0KZkIi2VjX" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/6h9PwWZcmwfaWZYozzk8" alt=""><figcaption></figcaption></figure>

Quickly open one or all parents from *Parent References*

</details>


# Step-by-Step

*Boomi-Linked Pages* is a **Chrome Browser Extension** written in TypeScript. You can [*download and install it from the Chrom Web-Store*](/power-tools/installation).

{% hint style="warning" %}
**It is required that you are** [**logged into Boomi AtomSphere**](/power-tools)**.**

A Boomi Build Tab must be opened in the browser, so the Linked-Pages for Boomi Integration can retrieve the Id of the Boomi Account your are logged-in to.
{% endhint %}

* You can link any number of pages to any Boomi Component.
* You can link any component-type, like processes, profiles, scripts, connectors, not only processes.
* You can export and/or import all your links at any time.
* You can synchronize your links with other members in the team,\
  using the same [Team Token](/power-tools/installation/configuration#team-sync-settings).
* *Boomi Linked Pages* can [connect to the AtomSphere API](/power-tools/installation/configuration#boomi-api-settings), to read component details (AtomSphere Token needed).


# Link a help page

**Use-Case**: *As I developer, I am using a Boomi REST connector in my current process and I wanted to have the Boomi REST connector documentation at hand.*

1. Login to Boomi AtomSphere and open you current process

   <figure><img src="/files/JtczEuJGu4tepTBJnCK4" alt=""><figcaption><p>You current process</p></figcaption></figure>
2. Open the [REST Client connector](https://help.boomi.com/docs/atomsphere/integration/connectors/int-rest_client_connector_686f3452-ce89-4a04-bf73-2dfd603ae3f7) help page on a second Tab

   <figure><img src="/files/RqUzH1SWDlNoAvURRAlZ" alt=""><figcaption><p>Open the documentation</p></figcaption></figure>
3. On the REST Connector help page being the active Tab,\
   click on *Linked-Pages for Boomi Integration*

   <figure><img src="/files/syBIyONtUEJ6uLuNfC22" alt=""><figcaption></figcaption></figure>

*Linked-Pages for Boomi Integration* reads the current Boomi Account and the open Component from the Boomi Tab, and displays its information. Component types and names are only displayed if you have [configured a Boomi AtomSphere Token](/power-tools/installation/configuration#boomi-api-settings).

4. Click on <mark style="color:purple;">**\[Link this page to the current component]**</mark>,\
   **close the REST Client connector** help page,\
   and go back to you Boomi process.
5. If you need help, while working on the process, **click&#x20;*****Linked-Pages for Boomi Integration*** and select the Boomi Documentation help page.

   <figure><img src="/files/qlCOJXM7HX8RtldIsEpr" alt=""><figcaption><p>Open you linked page from the component.</p></figcaption></figure>


# Link a Confluence page

"Developers don't write documentation", do they?

**Use-Case**: *<mark style="color:blue;">As I developer</mark>, I want to document my process on Confluence and I want to open my Confluence page with one click from the process designer. <mark style="color:green;">As a Team Member</mark>, I want to access the documentation which my colleagues created.*

1. Develop your process

If you think it's time to take notes, or even if you want to write documentation for your customer ...

2. Open Confluence (or any other tool you like) and start writing documentation (keep your process open)

   <figure><img src="/files/SSST8zj069VJ03cnjIYo" alt=""><figcaption><p>Process documentation on Confluence</p></figcaption></figure>
3. Click *Linked-Pages for Boomi Integration* and connect the current page to your component

   <figure><img src="/files/ojEgSrb9mjZh4eN5PvxA" alt=""><figcaption><p>Link this (Confluence) page to the current component</p></figcaption></figure>
4. Go back to your development work and do what you like most :smile:

Btw: If you ran the [*first example*](/power-tools/readme/linked-pages/step-by-step/link-a-help-page) you will see two pages, linked to your process when you click on *Linked-Pages for Boomi Integration*:

<figure><img src="/files/hV0LO1VW9xGHiupQ4t7m" alt=""><figcaption><p>Two pages linke to your current component.</p></figcaption></figure>

{% hint style="success" %}
For the requirement: *<mark style="color:green;">As a Team Member</mark>, I want to access the documentation which my colleagues created* you simply need a [Team Token](/power-tools/installation/configuration#team-sync-settings), and all links are shared with your team, automatically.
{% endhint %}


# Overview

**Use-Case**: *<mark style="color:blue;">As I developer /</mark> <mark style="color:green;">as a team member</mark>, I want to all documentation we have on the current Account.*

<figure><img src="/files/kRbzYDTDpf68dMu2EVNt" alt=""><figcaption><p>Oview Page</p></figcaption></figure>

If you need an overview over all linked pages on your current Boomi Account:

<figure><img src="/files/TSLQCQmRkl1pD2pxt7su" alt=""><figcaption></figcaption></figure>


# Dependency View

View a component and its dependencies at a glance

The idea behind *Dependency View* ..

In the Boomi Integration UI you can see and edit only a single, focused component. I wanted to see the full component tree (referenced dependent and/or independent components), to&#x20;

* get better insights and overview
* to see the folder structure where all these components reside - to, for example, avoid referencing components in *Sandbox* folders
* to quickly navigate to child componentes without opening every single component in the component hierarchy

<figure><img src="/files/RXPZPIFYxAZU8CkQl6UW" alt=""><figcaption></figcaption></figure>


# Parent View

The parent view is basically what you get when you select "*Show Where Used*".&#x20;

<figure><img src="/files/arCGfL8A4bW2tz1PwQpU" alt=""><figcaption></figcaption></figure>


# Folders

*Folders* shows you in which folders the referenced child components reside.

Reviewing folders is extremely helpful - not to say "necessary" - before you deploy a component to verify that all components are "in place". In many cases, I have seen references to "*do not use*" or "*Sandbox*" folders and you don't want to deploy components with such references.

<figure><img src="/files/lJKOweydYhAinldDvudV" alt=""><figcaption><p><em>Doc 01 - Update and Create</em> process and the folders where the referenced components are</p></figcaption></figure>


# Children - Referenced Components

See all referenced components on a page

<figure><img src="/files/NtKu9OomXG2NVLl0FKS0" alt=""><figcaption></figcaption></figure>

You can select between&#x20;

* Process references or all components, inkl. profiles, maps, etc.&#x20;
* Dependent references only, or include also independent references, like Process Routes etc.

{% hint style="info" %}
&#x20;Clicking on the open icon <i class="fa-upload">:upload:</i> allows you to quickly open any component.&#x20;
{% endhint %}

#### Broken references

You may also encounter somthing like this: **a broken reference!**

<figure><img src="/files/3jTzrYmyQz1CygNeNiNe" alt=""><figcaption></figcaption></figure>

This happened because I "imported" the component from a different account. Unfortunately, I did not copy all dependent components which would have been necessary.


# Deploy Assist

Simplifies the deployment of components and their dependencies

The idea behind *Deploy Assist* ..

When you develop a process and you start deploying it, normally you are re-deploying the same process several times. This is always the same steps: create package, provide version, click, click, click .. Deploy Assist reduces all this to a single click, with automatic versioning.

In addition, tackles the "*Referenced component not found!*" issue during run-time, when you deployed a process without its (independent) referenced components.&#x20;

### Headline

The header lists all deployed versions, to give you an overview what is where. It is basically: *View Deployments* filtered by the current component.

<figure><img src="/files/RsXhG8PWIQ1vlThAujHH" alt=""><figcaption></figcaption></figure>

### Re-Deploy Components

Select a *Target Environment* to where you want to (re-)deploy the current component.

The deployed packages list below will then display all components deployment state (including independent referenced components, up to nesting level *Scan References up to level).*

<figure><img src="/files/Y3zP4QMw0VzOnyNG22cV" alt=""><figcaption></figcaption></figure>

If a component's version on the target environment is older than the current version, the component is automatically selected for deplyoment. If you click on *Deploy 2 Selected* all selected, components will be packaged and deployed to the target environment with a single click and the same version.

#### Deployed Packages and its independent referrences

<figure><img src="/files/TUYTNVXJtinjWSeUIlFP" alt=""><figcaption></figcaption></figure>


# Smart Copy

The idea behind *Smart Copy* ..

Copying components with the Boom UI can be painful. It allows you to *Copy with or without  Component Dependents*, but in the end in most cases you don't want either of them.

<figure><img src="/files/rKh7t7RT1QNiHm75gh96" alt=""><figcaption><p>A process with a local mapping and profiles, and a shared referenced sub-process and connector.</p></figcaption></figure>

*Smart Copy* allows you to select the referenced components you want to copy. The pre-selection is smart because it recognises all referenced components in the same or in a sub-folder as *local* components which you normally want to copy, and it recognizes out-of-folder components as shared components which should not be copied.

<figure><img src="/files/5vPjGtlYDMow8GcaIlSZ" alt=""><figcaption></figcaption></figure>


# Document Components

The documentation is created by an Azure Service which renders the component's XML based on [Freemarker Templates](https://freemarker.apache.org/). For now, consider this as a *proof of concept,* and only some component types are supported:

* Profile
* Process
* Map

{% hint style="info" %}
When requesting the documentation it may take some time for the service to wake up. \
If you get an error, press F5 and refresh the page to try it a second time, please.
{% endhint %}

## Example documentation for a mapping

<figure><img src="/files/5L4ifoHe4cuRMHVry72G" alt=""><figcaption></figcaption></figure>

### HTML Documentation

<figure><img src="/files/RIaawm6pXRu6qHoJHJJp" alt=""><figcaption></figcaption></figure>

#### Dependent (referenced) Components

> [Dependent components](https://app.gitbook.com/o/GdemkqEHstG0W2wIO2Tl/s/-MJ5pAMZk3evA8VCVuQL/referenced-components) are components that are referenced and required by this Map and on which the Map is dependent. Carefully check the folders of these components. It is good practice to keep all referenced components in the Map's folder or in a sub-folder, unless it is a commonly used (shared) component.

<table><thead><tr><th width="176.199951171875">Child Name</th><th width="159.4000244140625">Type</th><th>Folder</th></tr></thead><tbody><tr><td><strong>j.FirstLast</strong></td><td>profile.json</td><td>/#Examples/90 - ScriptEase/Documentation/02 - MapScriptSimple</td></tr><tr><td><strong>j.FirstLastFull</strong></td><td>profile.json</td><td>/#Examples/90 - ScriptEase/Documentation/02 - MapScriptSimple</td></tr><tr><td><strong>msgSimple</strong></td><td>script.mapping</td><td>/#Examples/90 - ScriptEase/Documentation/02 - MapScriptSimple</td></tr></tbody></table>

#### Mapping

> Only that functionality is documented that is used to generate the target map. Source fields, scripts, functions etc. which are not connected are not documented!

| From | j.FirstLast    | To | j.FirstLastFull |
| ---- | -------------- | -- | --------------- |
| 3    | Root/firstname | 3  | Root/firstname  |
| 4    | Root/lastname  | 4  | Root/lastname   |

### From Function

| From (count=1) | Name      | To | j.FirstLastFull |
| -------------- | --------- | -- | --------------- |
| Scripting      | msgSimple | 5  | Root/fullname   |

### Mapping Dependency Tree

<figure><img src="/files/gHtezG9l6caIIv053HhE" alt=""><figcaption></figcaption></figure>


# Installation

*Power-Tools for Boomi Integration* is available in the [**Chrome Web-Store**](https://chromewebstore.google.com/detail/mspros-boomi-linked-pages/bbgkdndcecjbdmbfddecocfkkpbgopan) as a **Chrome Browser Extension**. It was tested with Chrome and Edge.

{% hint style="info" %}
*Linked-Pages for Boomi Integration* is **free for single users** and **unlimited number of Boomi accounts**. If you want to share your information in a team, for example, you want to share your documentation links with the customer, you need a [Team Token](/power-tools/installation/configuration#team-sync-settings) (subscription, to be [purchased](/power-tools/licensing)).
{% endhint %}

<figure><img src="/files/pQW3clbN76OBDDpbz1Gb" alt=""><figcaption></figcaption></figure>

Don't forget to pin the extension

<div align="left"><figure><img src="/files/ENcKHVMggRWzFxhtsqZj" alt=""><figcaption></figcaption></figure></div>

{% content-ref url="/pages/ZxslcQOgCWNZ1Q6NVJGk" %}
[Configuration](/power-tools/installation/configuration)
{% endcontent-ref %}


# Configuration

All settings are related to a specific Boomi Account, as well as all links are saved *per Boomi Account* in your personal profile, local browser storage.

## Boomi API Settings

It is required to setup a [Boomi API Token](https://help.boomi.com/docs/Atomsphere/Platform/int-Adding_API_tokens_d788aee3-026f-41c5-bebb-bf7f94500db3), so that the Power-Tools can communicate with your Boomi Platform API.

<figure><img src="/files/mOzTWBsSDrbDx7T7jtiR" alt=""><figcaption><p>Boomi API User and Token</p></figcaption></figure>

## Team Sync - share your documentation

By default, all linked-pages are stored in your local profile browser storage, and all documentation links are available when you work with your browser instance on a specific account.

If you switch to a different Account, all links are not vailable on that Account. Means, all links are stored related to the Account, and you can switch forth and back at any time.

If you want to synchronize your links - share your documentation - with other team members, you will need to [obtain a *Team Token.*](/power-tools/licensing) :moneybag: The *Team Token* is used to synchronize the local links with an Azure Web-Service - per Boomi Account - so that all team members with the same Team Token on the same Boomi Account can use these links (shared documentation)

<figure><img src="/files/jy1PgjEevHC3ZbKW69Kp" alt=""><figcaption><p>Team Sync Settings</p></figcaption></figure>

## Other Settings

### Confluence Settings

Confluence requires special handling because Confluence-Links to documents are not *permanent*. Means: Confluence links to a document page can become orphaned and be replaced by new ones. *Linked-Pages for Boomi Integration* is able to handle this behaviour, if you provide a **semi-colon separated list of Confluence roots.**

<figure><img src="/files/QAOobaooXR9f7Liu3Hb7" alt=""><figcaption><p>Confluence special handling</p></figcaption></figure>

### Titel Cleansing

Link titles are read from the browser url, and such titles can become very long, containing unwanted information. Use the *Title Cleansing* RegEx to advise Linked-Pages for Boomi Integration to remove part of (recurring) titles.

I recommend using `(\s-\sConfluence)` to strip off unnecessary Confluence information.

<figure><img src="/files/VCSKDZC3EyrVTXuq5WUm" alt=""><figcaption></figcaption></figure>


# Licensing

*Linked-Pages for Boomi Integration* can be [downloaded](/power-tools/installation) and used for free, unless you want to share your links with your team. You need a [Team Token](/power-tools/installation/configuration#team-sync-share-your-documentation) which requires a monthly subscription.

## :shopping\_cart: [FastSpring Check-Out](https://mspro.onfastspring.com/boomi-linked-pages)

* Synchronize your links with other team-members
  * on the same Boomi Account
* Unlimited number of links
* Unlimited number of team members
* Monthly subscription
  * Monthly cancellable


# Privacy Policy

Privacy Policy for using Linked-Pages for Boomi Integration browser extension

This Privacy Policy describes how *Linked-Pages for Boomi Integration* collects, uses and shares personal data. Personal data is information that can directly or indirectly identify you, such as name, email address, phone number, IP address and location data.

{% hint style="warning" %}
The published content and all developments are the result of [the author's](https://mspro.gitbook.io/the-mspro-boomi-collection#about-the-autor) free time. All tools used, hosting costs, web services etc. are privately financed and nothing is sponsored, nor commented, nor approved by *Boomi, LP*.
{% endhint %}

### Collected data

We do not collect any data!

* Data is stored in your browser's local profile, only.
* If you use *Team Sync* links are exchanged with a private web-service on Microsoft Azure.&#x20;
  * You can export the data that is sent to the service at any time.

### Purposes of use

We use the data we 'collect' for the following purposes:

* Provision of services\
  We use your data to provide you with the services you have requested.

### Disclosure of data

We don't share your data!

### Data security

We take appropriate security precautions to protect your data from unauthorized access, loss, misuse or alteration.

### How to contact us

If you have any questions or concerns about this Privacy Policy, please contact us at markus @ MarkusSchmidt.pro.

### Changes to the privacy policy

We may change this privacy policy from time to time. The latest version is always available on our website.

Date of last update: 2025-01-19


# Error Messages

<details>

<summary>Invalid ComponentId</summary>

I have seen the follwong message in two cases.

> Error: <https://api.boomi.com/api/rest/v1/abcfinancegmbh-5BZDOF/Component/7fb8b150-4784-4694-b365-db1e4db09f35> - http-400 (): ComponentId 7fb8b150-4784-4694-b365-db1e4db09f35 is invalid. Provide a valid componentId to complete this action.

<figure><img src="/files/SeZnEBbiPRYhKD9lrGBT" alt=""><figcaption></figcaption></figure>

#### Invalid child reference

When the mentioned ComponentId was a child component, the component XML was invalid. It happened after I imported a process from a different Account without importing a referenced profile. The profile was referenced in an Exception message. On the target system the references to that profile were still intact, whoever, the profile itself did not exist, because it was not imported.

To find this out, analyse the current component's XML and search for the ID that wasn't found.&#x20;

#### Invalid parent reference

I encountered the same message on a parent reference, too. This occurred on a process that was referenced as a *Data Quality Step* in DataHub.

<figure><img src="/files/3NIFcxMs1KFaYdp2W98n" alt=""><figcaption></figcaption></figure>

When checking the parent references it turned out, that the parent id is actually the DataHub's *UniverseId* (Model instance) on which the process is supposed to run.

Trying to open the component in the Boomi UI [https://platform.boomi.com/AtomSphere.html#build;accountId=abcfinancegmbh-5BZDOF;components={](https://platform.boomi.com/AtomSphere.html#build;accountId=abcfinancegmbh-5BZDOF;components=fd9ba676-f59f-4d92-b97a-8d70e24e9352,c458f559-e5e9-4a4b-88ad-d4dbb9002127;componentIdOnFocus=c458f559-e5e9-4a4b-88ad-d4dbb9002127)parentComponentID} lead to the following error:

<figure><img src="/files/fffc1hHp13M3jHypF7ld" alt=""><figcaption><p>IDTest is not a component. It is a DataHub Model!</p></figcaption></figure>

</details>


# History

### Link your documentation to an Integration component

* Write your documentation
  * click *Linked-Pages for Boomi Integration* and
  * and select "*Link this page to current component"* - done!

<figure><img src="/files/CS9r9tktC4m7gKAa4J8Y" alt=""><figcaption><p>1 Open the documentation page - 2 open the Component - 3 Link-Page</p></figcaption></figure>

### Jump to your documentation from an Integration component

* Open your component in Boomi Integration,&#x20;
* click *Linked-Pages for Boomi Integration* and&#x20;
  * select the (documentation) page you want to open - simple as that.

<figure><img src="/files/FSsjFhtcj65PANZqj8rd" alt=""><figcaption><p>Open a linked-page from Boomi's Process Designer</p></figcaption></figure>


# ScriptEase

A Groovy Script Development Environment for Boomi Integration

Everyone who has ever developed a Script for Boomi Integration knows how painful and error-prone this process is. Not only during development, also later when it comes to changes you must ensure a script's behaviour hasn't changed, so that all processes that rely on that script continue working as they did before.

{% hint style="success" %}
**ScriptEase** is a **scripting toolkit** designed to **enhance** [***Boomi Integration***](https://www.boomi.com)\
by simplifying the creation and management of **custom scripts** (Groovy)\
within Boomi processes.
{% endhint %}

* **Develop, debug and unit-test**
* **process- and map scripts** on your local machine, before you
* **copy and paste t**he well-tested scripts **into the Boomi platform** .

<figure><img src="/files/XLTGkHc4EiBxLRLW5Ii5" alt=""><figcaption></figcaption></figure>

### Personal note

I am using ScriptEase since mid of 2020, when I started at Boomi and when I recognized that scripting in Boomi is powerful, necessary but: it is a pain! Especially when you don't know the Groovy language! Since then, I am developing all my scripts with *ScriptEase*, and whenever something did not meet my current project's requirements, I spent some time in the evening or on the weekend to improve *ScriptEase*, to make it better for the next challenge.

{% hint style="warning" %}
The published content and all developments are the result of the author's free time. All tools used, hosting costs, web services etc. are privately financed and nothing is sponsored, nor commented, nor approved by *Boomi, LP*.
{% endhint %}

[**Copyright**](/the-mspro-boomi-collection/copyright) **© 2023 by Markus Schmidt. All rights reserved.**


# ScriptEase Development Environment

*ScriptEase* is a development environment that allows you to develop and manage Groovy scripts for Boomi Integration.

*ScriptEase* allows you to **develop / edit your Boomi Integration Scripts with JetBrains IntelliJ** (Groovy IDE). Boomi **Process- or Map Scripts are wrapped into repeatable unit tests** to support **local debugging and to ensure functionality and compatibility**. The *ScriptEaseLib* provides the **local run-time environment** (ATOM script emulation) to make all this possible. Finally, when you are happy with your code, simply **copy and paste your script into Boomi Integration**!

***ScriptEase*****&#x20;for Boomi** brings the following advantages without any disadvantage:

* Develop Scripts in a **full-featured IDE** (IntelliJ)
  * with syntax highlighting
  * code completion (intelli-sense)
  * immediate (syntax) error checking etc.
* **Debug** your scripts
  * breakpoints, single-step, debug variables, log messages

<figure><img src="/files/nminFwGtdoA2w1QESLe4" alt=""><figcaption><p>IntelliJ - Editing with syntax highlighting &#x26; code-completion, debugging and unit testing</p></figcaption></figure>

* **Full support** for
  * All types of documents (JSON, XML, Flat-File)
  * Dynamic Document Properties
  * Process and Dynamic Process Properties
  * Logging
* Write **Unit Test**

  * to ensure your scripts still provide the same expected results
  * in all scenarios

  <div align="left"><figure><img src="/files/XqD6jLel9GDw5hbybAVg" alt="" width="272"><figcaption><p>Several unit tests ensure the function of the script at all times</p></figcaption></figure></div>

The only "cost" is to get used to it, which can take a little time. And it requires your personal commitment that you want to work with Groovy Script. If you don't like scripting, yet, you may want to give it a try. Maybe you will love scripting afterwards.

I recommend [Groovy-Learn](https://groovy-lang.org/learn.html), or if you are looking for a Christmas or birthday present: [Groovy in Action, Second Edition](https://www.manning.com/books/groovy-in-action-second-edition).


# What AI says!

{% hint style="info" %}
The other day I decided to ask *ChatGPT* what it has to say about *ScriptEase*.

Surprisingly, the summary I got is much better than expected. Even if *ChatGPT* pointed out the benefits of the reusable sample code and snippets, and it missed the development environment idea with IntelliJ. Enjoy!
{% endhint %}

Here's a quick overview of **ScriptEase for Boomi**, explained and visualized simply:

#### 🔍 **What is ScriptEase for Boomi?**

**ScriptEase** is a **scripting toolkit** designed to **enhance Boomi** integrations by simplifying the creation and management of **custom scripts** (Groovy) within Boomi processes.

#### 🎯 **Main Goals:**

* Make scripting in Boomi easier and more maintainable.
* Avoid repetitive boilerplate code.
* Help developers **reuse** logic across processes.
* Provide **utility libraries** and helpers for common tasks\
  (like logging, date parsing, looping over documents, etc.).

#### 🛠️ **Key Features:**

* ✅ **Prebuilt utility functions**: e.g., `getProperty()`, `log()`, `parseJson()`
* 🔁 **Looping and batching helpers**
* 🔄 **Flow control helpers**
* 🧱 **Modular structure**: code is cleaner, reusable, and easier to test
* 📝 **Improved readability** and **reduced boilerplate**

#### 🧠 Why Use It?

Without ScriptEase:

* Scripts in Boomi can get messy, verbose, and hard to reuse.

With ScriptEase:

* Cleaner, shorter, maintainable scripts.
* Easier to onboard new developers.
* Centralized, reusable logic.

***

<sub>Source: ChatGPT "</sub><sub>*scriptease for boomi, can you draw a quick overview what it is*</sub><sub>", 2025-04-09</sub>


# The limits of AI ...

... and why you must be careful using AI for code generation!

Enjoy the following AI generated image and imagine how your AI generated code might look like.

<figure><img src="/files/8HZ8MBWMgmkIckimw3zp" alt=""><figcaption><p>ChatGPT generated</p></figcaption></figure>


# Software Installation

One time preparation of your development computer

Before you can start Groovy Scripting on your local machine, you must install some software. Find a checklist and detailed information below.

## **Checklist**

A checklist what needs to be done.\
Find below more detailed information about how to accomplish each step.

* [ ] [**Boomi Atom Installer**](#local-atom) downloaded : `atom_install64.exe`
  * [ ] Get Atom Install Token : `atom-c4cf1ef2-...`
  * [ ] Atom installed into: `c:\Program Files\Boomi AtomSphere\LocalAtom`
* [ ] [**Apache Groovy**](#groovy-2.4.13-sdk) downloaded: `apache-groovy-sdk-2.4.13.zip`
  * [ ] Unzipped into: `%UserProfile%\.groovy\sdk\groovy-2.4.13`
* [ ] [**JetBrains IntelliJ IDEA**](#jetbrains-intellij-idea-groovy-ide) installed

<details>

<summary>Local Atom</summary>

The local Atom is required on your machine because we must reference the Atom binaries (Boomi’s Java libraries) and the bundled Java Run-Time (JRE).

Atom installation typically takes \~5 minutes. A good Internet connection is and <mark style="color:orange;">**Admin Rights**</mark> are required.

[Install a local Atom](/boomi-scriptease/pre-requisites-7deb11c4cf894c33b76456ab85cad596/install-a-local-atom)

There is no need to start the ATOM, and you may disable the Windows Service.

</details>

<details>

<summary>Groovy 2.4.13 SDK</summary>

Boomi Integration uses **Groovy v2.4.13** to run Groovy scripts. I recommend using this version 13 because you will want to test and debug your scripts with the same run-time that the Atom uses. (Groovy v1.5 is not supportet!)

* Download [Groovy **SDK v2.4.13**](https://archive.apache.org/dist/groovy/2.4.13/distribution/apache-groovy-sdk-2.4.13.zip)
* Unzip into any directory you want.
  * I prefer using: **`%UserProfile%\.groovy\sdk\groovy-2.4.13`**

{% code title="Using a Terminal Window" lineNumbers="true" %}

```batch
md %UserProfile%\.groovy\sdk
```

{% endcode %}

**Note**

There are [newer version of Groovy Script](https://groovy.apache.org/download.html), there are other 2.x versions and there are older versions, like v1.5. Do not download or install any of them! Boomi Integration uses **Groovy Script `v2.4.13`** and that is the only version we want!

</details>

<details>

<summary>JetBrains IntelliJ IDEA - Groovy IDE</summary>

*ScriptEase* uses [**JetBrains IntelliJ IDEA**](https://www.jetbrains.com/idea/download/)**.** While I recommend using the Ultimate Edition for professional use, the Community Edition is good enough to get started.

<img src="/files/LE6MpA5jk61MjsQ4Eodg" alt="" data-size="original">

<mark style="color:red;">**You must scroll down a bit on the download page to find the Community Edition**</mark> -> 650MB:

![](/files/G5PZpsraBfWfWzGlFwyH) ![](/files/Tfwb1w8zhhMBtUxC69Xj)

</details>

***

{% content-ref url="/pages/ZrQJXXGdnK6AhrNtTcL2" %}
[Project Setup](/boomi-scriptease/setup-a-customer-project-a5e8a967b06b4f9d9123b55f72e07145)
{% endcontent-ref %}


# Install a local Atom

Download installer: *Manage -> Atom Management -> New*

<div align="left"><figure><img src="/files/hLsaopr4UHZF5edZTJga" alt="" width="563"><figcaption><p>Download Atom Installer</p></figcaption></figure></div>

* Do not forget to **copy your installation token!**\
  Click on *<mark style="color:blue;">Security Options</mark>* and copy the *<mark style="color:orange;">Atom Installer Token</mark>*

<div align="left"><figure><img src="/files/LMosLgf1UCS2ddXctYA2" alt="" width="538"><figcaption><p>You will need the installation token later</p></figcaption></figure></div>

Start the installation using the *Atom Installer Token* from above.

{% hint style="warning" %} <mark style="color:orange;">**The Atom installation need Admin Rights!**</mark>

Right click `atom_install64.exe` and *Run as Administrator*!
{% endhint %}

<figure><img src="/files/NjP9r5D8IRgTtAgUwqAk" alt="" width="554"><figcaption><p>Setup -Atom</p></figcaption></figure>

{% hint style="info" %}
The **Atom Name** defines how the Atom appears under *Atom Management* later, it is not the installation path! There is no need to attach the Atom to any environment. There is no need to start the Atom. All we need are the Atom's JRE and libs to resolve script references.\
see [IntelliJ Configuration](/boomi-scriptease/setup-a-customer-project-a5e8a967b06b4f9d9123b55f72e07145/intellij-configuration)
{% endhint %}

Chose a good installation path.

{% hint style="info" %}
It is very recommended you install the ATOM in this path:\
`c:\Program Files\Boomi AtomSphere\`<mark style="color:orange;">**`LocalAtom`**</mark>`\`
{% endhint %}

<figure><img src="/files/q7sTdfhEv40GwmGd9oNc" alt=""><figcaption><p>Chose destination</p></figcaption></figure>

### Optional - Disable automatic start

If you want you can disable the automatic start of the Windows Service. Run `services.msc` and set start-type to *manual*.

<figure><img src="/files/7uC6WtujisdMbON9d5IJ" alt=""><figcaption><p>Services: LocalAtom settings</p></figcaption></figure>

<figure><img src="/files/cVptHuU81M6ZaxMV9jzv" alt=""><figcaption><p>Service Start Type = Manual (manuell=German)</p></figcaption></figure>


# Project Setup

Now, that the environment has been installed, we need a project directory where we will manage all our local project content. Chose any empty folder on your hard-drive for your *Script* project, for example:

> `.\Documents\BoomiScripts`

## ![](/files/nAGqkwGuWl8lmFcbEw3v) The project template

We are going to initialize that folder with the project template from GitHub.

* Download the [project template <img src="/files/nAGqkwGuWl8lmFcbEw3v" alt="" data-size="line">](https://github.com/MarkusSchmidtPro/MSPro.Boomi.MGF4Boomi.Demo/zipball/main) from GitHub and
* Unzip its content into the `BoomiScripts` folder (from above).

<figure><img src="/files/jyz3qmW7YzT1mWGojAcR" alt=""><figcaption><p><em>BoomiScripts</em> folder populated with the unzipped project template.</p></figcaption></figure>

* Start *IntelliJ* and *File -> Open* the **`MyScripts`** project folder, that shows the black folder overlay.

<figure><img src="/files/xDM1jCeGR57TzjzR5ptY" alt="" width="563"><figcaption><p>Open <em>MyScripts</em> with IntelliJ</p></figcaption></figure>

Unfortunately, we are not yet done and IntelliJ need some first-time-use configuration., before we can start developing.

{% content-ref url="/pages/safGV31FjIxxpCH75wWP" %}
[IntelliJ Configuration](/boomi-scriptease/setup-a-customer-project-a5e8a967b06b4f9d9123b55f72e07145/intellij-configuration)
{% endcontent-ref %}

***

### Additional Notes

{% hint style="danger" %} <mark style="color:red;">**DO NOT**</mark> create a new project within IntelliJ, because such project won't contain the required libraries and references, and testing and Boomi contexts won't be supported.
{% endhint %}

{% hint style="danger" %} <mark style="color:red;">**DO NOT create your project on a synched Google Drive folder.**</mark>

G-Drive folders are not appropriate for development purposes because G-Drive keeps locks on files and folders which will lead to unpredictable results.
{% endhint %}

{% content-ref url="/pages/D1NyOnWSf0r8nC64UnbP" %}
[Invalid VCS root mapping](/boomi-scriptease/troubleshoot/invalid-vcs-root-mapping)
{% endcontent-ref %}


# IntelliJ Configuration

IntelliJ must be configured once to support Global SDKs and Libraries. Right click the project and select *Open Module Settings* (or press F4 \[Windows!]).

<figure><img src="/files/FclX46MYp3foZr3ImuSH" alt="" width="563"><figcaption><p>Open Module Settings</p></figcaption></figure>

### Configure SDK

The first step is to tell the project about the **ATOM JDK**. Click

* Platform Settings -> SDKs -> '+'

and reference the JDK that is part of your Atom installation:

> `c:\Program Files\Boomi AtomSphere\`<mark style="color:orange;">`LocalAtom`</mark>`\jre\`

See also [Chose newer JVM for local development](/boomi-scriptease/knowlede-base/java-jdk/chose-newer-jvm-for-local-development).

<figure><img src="/files/gnmhGA25YajfBeeqqq10" alt=""><figcaption><p>Platform Settings in IntelliJ</p></figcaption></figure>

### Configure Libraries

Then we add two IntelliJ Global Libraries -> *"Add Java..."*

<table><thead><tr><th width="206">Name</th><th>Library Path</th></tr></thead><tbody><tr><td><strong>ATOMSphere Libs</strong></td><td><code>C:\Program Files\Boomi AtomSphere\</code><mark style="color:orange;"><code>LocalAtom</code></mark><code>\lib</code></td></tr><tr><td><strong>Groovy SDK</strong></td><td><code>%UserProfile%\.groovy\sdk\groovy-2.4.13\lib</code></td></tr></tbody></table>

<figure><img src="/files/FmBrzait9lbtZbAGv5ol" alt=""><figcaption><p>Global Libraries configured</p></figcaption></figure>

### Summary

You Project Setting should now look like this:

<figure><img src="/files/XvOr6y4u9zcyqrLswk6Z" alt=""><figcaption><p>ATOM JDK selected</p></figcaption></figure>

The last thing to do is to validate your settings:

<figure><img src="/files/CR7WuFu9TEhKTpYGLYn9" alt=""><figcaption><p>Validate Project Settings</p></figcaption></figure>

## Tip

<figure><img src="/files/WtVLLj1EuKHnmDTIaOOS" alt=""><figcaption></figcaption></figure>

{% content-ref url="/pages/ZrH1culATEnGiKaAQHaE" %}
[Verify Project Setup](/boomi-scriptease/setup-a-customer-project-a5e8a967b06b4f9d9123b55f72e07145/verify-project-setup)
{% endcontent-ref %}


# Verify Project Setup

Open `msgHelloWorld.groovy` and set a breakpoint on line 27 (left click on the line number).

<figure><img src="/files/553iqBqEqcYPlJmfTViD" alt=""><figcaption><p>Hello World with active Breakpoint</p></figcaption></figure>

Open **`Test_`**`HelloWorld.groovy`, click on the green arrows beside line no 16 and *Debug 'Test\_HelloWorld'.*

<figure><img src="/files/WuFmk2xLL1ctCVLX6Z21" alt=""><figcaption><p>Run Test</p></figcaption></figure>

The script compiles, runs and stops at the Breakpoint, with an open Debugger Windows (*Threads & Variables*).

<figure><img src="/files/RRnUvl04ag3xuwB6lO3O" alt=""><figcaption><p>Debugger Window: Code execution stopped at breakpoint</p></figcaption></figure>

Find out, how to "*Setop Over*" line-by-line and halt after the addition. Check the Variables.

<figure><img src="/files/EvJymjGWnIWX9QRv03sf" alt=""><figcaption><p>IntelliJ on halt - breakpoint hit</p></figcaption></figure>

> :bulb: **TIP!**
>
> In the IDE watch the yellow and red markers in the editor to the right. Also the yellow warning exclamations on the top. Click on ti the open the *Problems* window.
>
> Find the *Database* window.
>
> Use `ctrl + shift /` or `ctrl + /` for comments.

### Script functionality

Have a look at the Map Script itself that simply adds two values:

```
// This is the script's logic - not too much ...
total = a + b
```

See the test has passed and check the output (log messages):

<div align="left"><figure><img src="/files/BxWYKeKxosvnypaS1R17" alt="" width="563"><figcaption><p>Script output</p></figcaption></figure></div>

Resume or Stop the execution.

<figure><img src="/files/Z51Um7GbLv2RiSjlvppM" alt=""><figcaption><p>Debugger Execution Controls</p></figcaption></figure>

See also [An illegal reflective access operation has occurred](/boomi-scriptease/troubleshoot/illegal-reflective-access)

### Use the Map Script in Boomi

Copy and paste the script code to Boomi and do not forget to define the **Inputs** and **Outputs** which you are using in your script:

<figure><img src="/files/Itzc7d4A2qiWkPcXXJKP" alt=""><figcaption><p>Map Script in Boomi</p></figcaption></figure>

Write a test process with a Map that uses the Map Script and Test it in Boomi. Check the Logs!!!


# Concepts

Test and Scripts

There are **Tests** and there are Process- and Map-**Scripts**.

A script cannot run alone. It needs a *ScriptContext* which is normally provided during process execution by the Atom. The *ScriptContext* contains *document-, process- and execution properties*, as well as the *documents.*

{% hint style="info" %}
There is a **ProcessScriptContext** and a **MapScriptContext**, with slightly different content: a Map-Script does not have *Documents*. Instead, a MapScriptContext takes the input variables and provides the output variables after execution.
{% endhint %}

<figure><img src="/files/NMlyEcPDXfK0hRBRdDa5" alt=""><figcaption><p>Process Script Test and Script Context</p></figcaption></figure>

On the local test environment the Test acts as the host. The Test creates the [context](/boomi-scriptease/knowlede-base/script-contexts) that is passed into the script.

## The Test

A test class with on e or more test methods (`@Test test01()`) represents the host - a starting point where you create the *ScriptContext* (test execution environment) and where you can check if the script did what it was supposed to do: test assertions.

```groovy
class Test_HelloWorld {

    @SourceURI
    URI _sourceUri

    // Specify the Boomi Script that your want to test in this class.
    final MapScript _testScript = new MapScript("msgHelloWorld.groovy", _sourceUri)

    /** Your first Map Script Test. */
    @Test
    void test01() {
        //
        // A Map Script Test provides the mapping input parameters 
        // in the scriptContext, as they are defined in Boomi.
        // Script Output variables are also added to that context
        // and can be validated after the execution.
        //
        MapScriptContext scriptContext = new MapScriptContext(  [
                a: 5,
                b: 7
        ])
        _testScript.run(scriptContext)

        println("\r\n--- Test Output ----------")
        assert scriptContext.variables.total != null, "Script did not set 'total' as output parameter!"
        assert scriptContext.variables.total == (scriptContext.variables.a as int) + (scriptContext.variables.b as int), "Calculation result does not meet expectations!"

        // Print to console windows and validate results
        println("Test Total = " + scriptContext.variables.total)
    }
}

```

A single Test class can contain one or mare `@Test` methods. This makes sense if you want to Unit Test your scripts. I do normally start with one or two tests functions (incl. edge tests), to debug and test what I am developing. Over the time, when my script evolves and gets new functionality, I add new Tests. At the end of the day, you always want to run *all* tests successfully. The old ones, because you want to ensure the script's behaviours has not changed, and the new ones, to ensure the new functionality works properly.

## The Script

The script is what you copy & paste into Boomi, later. Let's check the *HelloWorld* Map Script.

```groovy
import com.boomi.execution.ExecutionUtil

final String SCRIPT_NAME = "msgHelloWorld"

final _logger = ExecutionUtil.getBaseLogger()
_logger.info('>>> Start Script ' + SCRIPT_NAME)

// This is the script's logic - not much - but anyways...
total = a + b

// Log the result and the end of the execution to process reporting
_logger.info("Total: " + total)
_logger.info('<<< End Script')
```


# Use Test Data

Good practices for the use of test data

The first question that might come up is: "**Where can I get test data?"** that is needed to debug and test my script? The answer is simple as that: run your process, and grab the documents that hit the - not yet developed - Data-Process Shape which is going to host the script.

## Get test data

Imaging, you have a process that executes a Business-Rule and you want to serializes the Business-Rule XML results into a plain string. You want to develop a script for that *XML conversion purpose*, and you need test data.

<figure><img src="/files/X9SorjfS6EaNpbdXT6hR" alt=""><figcaption><p>Copy &#x26; Paste documents from a test execution.</p></figcaption></figure>

* Temporarily add a Stop-Shape where you want to insert the script.
* Run your process.
* Copy and paste as many documents as you need from the Stop-Shape,

  * and save each document as a file\
    in your script's `testData`folder, in you project directory.

  <figure><img src="/files/jWcU1GM4oBwongm2oUJV" alt="" width="201"><figcaption><p>Four files containing test data<br>pasted from a Boomi execution.</p></figcaption></figure>

## Use test data when testing

In your Test class read the documents from file:

<figure><img src="/files/cxqZ0DHy5kPCa5kAHfeK" alt=""><figcaption><p>Reading test data from file.</p></figcaption></figure>

Note: The `_testfiles` object has been created on the class level, and it point to *testFiles* directory, relative to the Test file location.

```groovy
final TestFilesHelper _testFiles = 
    new TestFilesHelper( "testData", _sourceUri)
```

<figure><img src="/files/WWlF8UinMO7DJZ9ha9Xa" alt=""><figcaption><p>Test data full-path.</p></figcaption></figure>

## Share local test data with Boomi Integration

If you test on a local machine, using your local ATOM, you can use the *testData* directly from your ATOM. Copy the *testData's* full-path, which is probably: `%UserProfile%\Documents\GroovyTraining.`

1. Setup a generic (empty) **Disk v2** connector:\\

   <figure><img src="/files/0KykhA64Gfe4FpGcHT7b" alt=""><figcaption></figcaption></figure>
2. Create a generic query Disk v2 operation:\\

   <figure><img src="/files/S4QL6J46zlDSBOkMg2p9" alt=""><figcaption><p>Generic Disk v2 operation</p></figcaption></figure>
3. Amend your Test-Process to read test data from disk:

<figure><img src="/files/C18dEdOH619SUaKqd3ER" alt=""><figcaption></figcaption></figure>

The SetProperties Shape sets the **testData directory** and it defines\
`DDP_FileFilter = *.json`

<figure><img src="/files/RdMynwAyfqImAkL1BerO" alt=""><figcaption><p>Directory: Fix project path + relative testData directory for this process.</p></figcaption></figure>

The dynamic document property is then used in the Disk v2 operation:\
**matchWildcard parameter**.

<figure><img src="/files/bKjWKkKJx1pVvvHMVRHC" alt=""><figcaption><p>Use DDP_FileFilter in the operation's parameters.</p></figcaption></figure>

{% hint style="info" %}
**IMPORTANT**:exclamation:: It is important that you execute the process on your **local ATOM**, please. A cloud or a customer ATOM normally does not have access to your local disk drive and folder!
{% endhint %}

That is it! Your Boomi test process and your local test script share the same test data.

<figure><img src="/files/fCuHBftrYtRwY28tnB7f" alt=""><figcaption><p>Process execution with the same four files from local disk.</p></figcaption></figure>


# Examples

{% hint style="info" %}
If you are new to Groovy or to programming (coding) at all, here are some tips how to get used to it, before you start messing with Boomi.

1. <https://groovy-lang.org/>
2. Buy a book: [Groovy in Action, Second Edition](https://www.manning.com/books/groovy-in-action-second-edition) ( v2.4 -> published 2015 ) and **read it !**
   {% endhint %}

Befor you start, please [verify your project setup](/boomi-scriptease/setup-a-customer-project-a5e8a967b06b4f9d9123b55f72e07145/verify-project-setup).

{% content-ref url="/pages/JvispmMCZRHChl0TiNmf" %}
[1 - Debug an existing process script](/boomi-scriptease/examples/1-debug-an-existing-process-script)
{% endcontent-ref %}

{% content-ref url="/pages/gBJ2C0xXtsWlli8BkeM0" %}
[9 - Aggregate Prices Example](/boomi-scriptease/examples/aggregate-prices-example)
{% endcontent-ref %}


# 1 - Debug an existing process script

We are creating a new, empty script file in our project. Then we copy and paste the code of an existing process script into the file. We create a Test to host the script, and we debug the existing script with IntelliJ.

Right click on *training* and select ***New -> Package***, aka: new folder.

<figure><img src="/files/TA0l97iBmwocaWyZa26L" alt=""><figcaption><p>create a new package</p></figcaption></figure>

Call the package: `training.example01` . Right click on `example01`\` and add a new, blank Groovy Script. Call it `psgNull` - null: it does nothing, no functionality!

<figure><img src="/files/cJP42oWTt9qjT4SrIbrZ" alt=""><figcaption></figcaption></figure>

Goto to **Boomi Integration** and create a new Process Script, call it `psgNull`

<figure><img src="/files/XGbPMU6jYlTh8AVHBGNK" alt=""><figcaption><p>Boomi Integration - Process Script with <em>Null</em> functionality</p></figcaption></figure>

```groovy
import java.util.Properties;
import java.io.InputStream;

for( int i = 0; i < dataContext.getDataCount(); i++ ) {
    InputStream is = dataContext.getStream(i);
    Properties props = dataContext.getProperties(i);

    dataContext.storeStream(is, props);
}
```

Copy the code and paste it into the `psgNull.groovy` file.

<figure><img src="/files/OhoRDuXg7MdsTSgcVwtz" alt=""><figcaption><p>psgNull pasted into IntelliJ, with warnings</p></figcaption></figure>

{% hint style="info" %}
IntelliJ gives us some warnings (yellow bars to the right): *Unused Imports* and *Unnecessary Semicolon* - fix it, or leave it. Just to mention here that you eventually want to read and recognize what IntelliJ tells you.
{% endhint %}

Set a breakpoint on line 8, we want to stop there:

<figure><img src="/files/LST7YyeVrMfs7NrBSNAN" alt=""><figcaption><p>Null script with breakpoint</p></figcaption></figure>

Now, we want to debug that script, and we **need a Test as a host** to run the process script locally.

### Create Test class from template

Right click on the `example01` folder select ***New -> Boomi Process Script Test*** and provide the Map-Script name (from above: *psgNull*) without *psg*:

<figure><img src="/files/b1OftKsX8dEd1MYCNXIh" alt=""><figcaption><p>Create a test from a template: the test needs the name of the script.</p></figcaption></figure>

{% hint style="info" %}
**Tip!**

The *MyScripts* IntelliJ project comes with [four pre-configured templates](/boomi-scriptease/knowlede-base/process-script-templates), to create new Tests and Scripts. If you have

> ***Project Files** Bar -> Options (three dots)*\
> *-> Appearance -> View Excluded Files*

enabled, you will see the files in the project directory under `.idea\fileTemplates`.\
More information on that topic in the [IntelliJ Help](https://www.jetbrains.com/help/idea/settings-file-and-code-templates.html).
{% endhint %}

Open the created `Test_Null`, click the green arrow and *Debug* method ***test01()**.*

<figure><img src="/files/hrI0yx3ENBTaDT203gja" alt=""><figcaption></figcaption></figure>

The code execution is going to halt in the debugger in our Boomi Script `psgNull.groovy`on line 8.

<figure><img src="/files/zo7nzOtz4DcDyIn0fzwv" alt=""><figcaption><p>Haltet script</p></figcaption></figure>

Select `dataContext.getDataCount()`, right click and *Evaluate Expression...* to see the data: `value = 1`.

Big question: A value of 1 means, the script has got *one* document! The question is, where did it come from?


# 9 - Aggregate Prices Example

Developing a real world script - using ScriptEase

{% hint style="success" %}
The Script and the Test code is available in your project in the ***training*** folder!
{% endhint %}

<details>

<summary>The Use-Case</summary>

We have any number of incoming JSON documents of the following profile (type):

```json
{
  "articleNo" : "string",
  "price" : 1.23
}
```

There can be more than one document referring to the same article number but a different price.

All documents should be consolidated into one outbound document containing an array of unique articles as follows:

```json
[
    {
        "articleNo" : "...",
        "maxPrice"  : 1.23,
        "minPrice"  : 0.98,
        "priceCount" : 2,
        "prices" : [ 0.98, 1.23 ]
    }
]
```

</details>

<details>

<summary>Example Documents</summary>

Four documents referring to two different articles

**Document 1**

```json
{
  "articleNo" : "a001",
  "price" : 1.23
}
```

**Document 2**

```json
{
  "articleNo" : "a002",
  "price" : 2.00
}
```

**Document 3**

```json
{
  "articleNo" : "a001",
  "price" : 1.05
}
```

**Document 4**

```json
{
  "articleNo" : "a001",
  "price" : 0.98
}
```

</details>

<details>

<summary>Expected Result</summary>

```json
[
    {
        "articleNo" : "a001",
        "maxPrice"  : 1.23,
        "minPrice"  : 0.98,
        "priceCount" : 3,
        "prices" : [ 1.23, 1.05, 0.98 ]
    },
    {
        "articleNo" : "a002",
        "maxPrice"  : 2.00,
        "minPrice"  : 2.00,
        "priceCount" : 1,
        "prices" : [ 2 ]
    }
]

```

</details>

<details>

<summary>Script setup</summary>

Create a folder (aka Package) called ***AggregatePrices***

<img src="/files/dYGvLqLLXoaEHr6BmE7D" alt="" data-size="original">

and add a Script and a Test Script from a [Script Templates](/boomi-scriptease/knowlede-base/process-script-templates)

<img src="/files/9VjmzUtChMeaZ0Pn2Ym7" alt="" data-size="original">

</details>

## Step-By-Step

### Setup a Test Context

The first things we need to do is to setup a test context that provides the test data, as it is normally provided by the Boomi run-time. In our case, we must create the documents that we want to pass into the script for testing( see [#example-documents](#example-documents "mention")).

<figure><img src="/files/3FpMOjAdWi3NHGPmkx8Y" alt=""><figcaption><p>The documents passed to the script are defined in the Test class</p></figcaption></figure>

This is simple as that:

```groovy
def context = new ProcessScriptContext(
  inputDocuments: [
    Document.fromText('{ "articleNo" : "a001", "price" : 1.23 }'),
    Document.fromText('{ "articleNo" : "a002", "price" : 2.00 }'),
    Document.fromText('{ "articleNo" : "a001", "price" : 1.02 }'),
    Document.fromText('{ "articleNo" : "a001", "price" : 0.98 }')
  ])
_testScript.run(context)
```

{% hint style="info" %}
We do not need any *Execution Property* or *Dynamic Property* or *Process Property* in our script, but the *Context* would the right place to add those.

*Dynamic Document Properties* would be added to each document, not to the *Context* itself.
{% endhint %}

### Set Test expectations

Unlike in the template, we expect only one document as output, and we have to **amend our test assertion** in the Test class. Feel free to add more assertions to ensure the script works as expected.

```groovy
println("\r\n--- Test Output ----------")
int docCount = context.outputDocuments.size()
println(docCount + " Document(s) after script execution")

assert 1 == docCount // <<<<<< expect one document
```

## Implement the Script

{% hint style="danger" %}
**Maintaining the script header information is mandatory,** especially the date and author tags. This is even more important when you work in a team!
{% endhint %}

<details>

<summary>The Script Header</summary>

```groovy
/* **************************************************************************
    Aggregate prices on JSON documents.
        
    IN : JSON documents of profile j.Price
         { "articleNo" : "a001", "price" : 1.23 }
         
    OUT: JSON documents of profile j.Prices (plural=array)
        [
		{
		        "articleNo" : "a001",
		        "maxPrice"  : 1.23, "minPrice"  : 0.98, "priceCount" : 3,
		        "prices" : [ 1.23, 1.05, 0.98 ]
		},{
		        "articleNo" : "a002",
		        "maxPrice"  : 2.00, "minPrice"  : 2.00, "priceCount" : 1,
		        "prices" : [ 2 ]
		}
        ]
    
    ------------------------------------------------
    13.06.2024  mspro -   Created
************************************************************************** */
```

</details>

We need the **JsonSlurper** object to work with JSON data. We create the `js` object instance before the documents loop because there is no need to have a new instance for each document. One `js` is enough for all documents.

<figure><img src="/files/ynGRycZU69V7sU3eZrEu" alt=""><figcaption><p>JsonSlurper instance</p></figcaption></figure>

You recognize that IntelliJ is smart enough to automatically insert the requires *Imports:*

<figure><img src="/files/3BkzcwCjkzUQ3WtTDJRU" alt=""><figcaption><p>IntelliJ adding Imports</p></figcaption></figure>

Navigate to the script logic and replace *Your document related code here ...* with:

```groovy
// *********** Document related functionality ************
Map jsonDoc = js.parseText( textDoc)
_logger.info( "DOC[$docNo]: ${jsonDoc.articleNo} = ${jsonDoc.price}")
// ******** end of Document related functionality ********

```

We parse the text document into a JSON (map), so that we can access the JSON elements as properties (see [Working with JSON](https://docs.groovy-lang.org/latest/html/documentation/json-userguide.html)). The scipt's logic so far is to log the incoming data. Good enough for a first Debug Run. Set a breakpoint on line 52, navigate to the Test and **Debug test01()**.

<figure><img src="/files/ulGxNFqTxrQEcBR9cuqi" alt=""><figcaption><p>Prepare to debug the script</p></figcaption></figure>

The execution stops at the breakpoint. See the variables and output.

<figure><img src="/files/QAeSMX5q0H8lw1vDEeYI" alt=""><figcaption><p>Debugging the script</p></figcaption></figure>

<details>

<summary>Test your Script in Boomi AtomSphere</summary>

![](/files/IFEl6niGfAFhYdEooJ8U)\
You can copy and paste the script code into the `psgAggregatePrices`script component

<img src="/files/ollvdM4RjfagepKJQRre" alt="" data-size="original">

and use it in your test process.

![](/files/Tfwb1w8zhhMBtUxC69Xj)\
Check the process logs to see the log entires your script has written![](/files/7tRUCgIiufX21OBwtxbP)

</details>

Let's improve the scripts functionality and build the business logic. Amend your code, define the `articles` result list and business logic, and set a breakpoint on the line *// << set breakpoint here*

```groovy
// https://www.tutorialspoint.com/groovy/groovy_lists.htm
List articles = []

// Documents loop
for (int docNo = 0; docNo < docCount; docNo++) 
{
		...
		
		
		// *********** Document related functionality ************
		
		Map jsonDoc = js.parseText(textDoc)
		_logger.info("DOC[$docNo]: ${jsonDoc.articleNo} = ${jsonDoc.price}")
		
		// Business Logic
		
		// Check if there is already an item with the same articleNo.
		// If yes, we must update that item. 
		// If no, we create a new item and add it to the prices list.
		// it - iterator = List element (of type)
		
		def article = prices.find { it.articleNo == jsonDoc.articleNo }
		// article TYPE 
		// {    
		//      articleNo
		//      minPrice, maxPrice, priceCount, 
		//      prices[]
		// }
		
		if (article == null) {  // << set breakpoint here
			articles.add([
					articleNo: jsonDoc.articleNo,
					priceCount : 1,
					minPrice : jsonDoc.price,
					maxPrice : jsonDoc.price,
					prices : [ jsonDoc.price]
			])
		} else { }
		
		// ******** end of Document related functionality ********
```

Debug your script and see the execution stopping with `article == null`. This is expected because - look at the *Variables* window - the `prices`list is yet emtpy.

<figure><img src="/files/0KeDeL46yue8WwbrlDLN" alt=""><figcaption></figcaption></figure>

I think, you will find out yourself how to step over the next two lines (Single Step - F10) to stop at `_setTextDocument()`. While your colors might be different (depending in the IntelliJ theme you have chosen), the red line is the breakpoint and the yellow line marks the next line for execution.

<figure><img src="/files/rsR5Ttw24M7jd1q9SO8f" alt=""><figcaption></figcaption></figure>

More interesting to see is the *Variables* window where you can observe that the expect *article* object was added to the `articles` list.

<figure><img src="/files/QXYzGtUOBqCoMgUyJ1Xs" alt="" width="516"><figcaption><p>Variables</p></figcaption></figure>

Amend you code again and implement the `else` branch.

```groovy
if (article == null) { // << set breakpoint here
	articles.add([
			articleNo: jsonDoc.articleNo,
			priceCount : 1,
			minPrice : jsonDoc.price,
			maxPrice : jsonDoc.price,
			prices :  [ jsonDoc.price]
	])
} else {
	// article found -> update
	article.priceCount++        // increment
	if( jsonDoc.price < article.minPrice) article.minPrice = jsonDoc.price 
	if( jsonDoc.price > article.maxPrice) article.maxPrice = jsonDoc.price
	article.prices.add( jsonDoc.price ) // We do _not_ check if the same articles already exists!
}
```

Set a breakpoint on the `_setTextDocument()` line and debug a bit: document by document. After the third document you should check the console output and the variables. You will recognize the variables are close to what we expect to see in the output JSON.

<figure><img src="/files/NTG0yRjZRrexuEeWFfFX" alt=""><figcaption></figcaption></figure>

Last but not least, we must write back the `articles` map into one output document. So, you must move the `_setTextDocument()` to outside of the document loop. Before, we must convert the `articles` map to a Json String.

```groovy
	// ******** end of Document related functionality ********
}   // documents loop

// Your process related code (process properties etc.) here
String outputDoc = JsonOutput.toJson(articles)
_setTextDocument(dataContext, outputDoc, new Properties()) // <<<<<
```

As the very last step, you can update your Test class and `prettyPrint()` the returned Json document:

<figure><img src="/files/12Lqm0jNFcRFaPJSR0YA" alt=""><figcaption><p>The Test Class output</p></figcaption></figure>

## Use the script

Do you rememeber why we did all that effort? We wanted to use that script in Boomi! Copy and paste all the script code 1:1 into the script component. Of course, the Test class is not needed in Boomi.

<figure><img src="/files/GhT6YDRmoRnCkfKkgWK6" alt=""><figcaption><p>Script Code in Boomi</p></figcaption></figure>

<figure><img src="/files/snJsrUFMI7zw2d5Zn6wH" alt=""><figcaption><p>q.e.d.</p></figcaption></figure>


# Test Contexts

How to initialize documents, process and document properties

In a *Test Method* you create and provide all the necessary information that is needed in the script. The *Test Method* creates the [`ScriptContext`](/boomi-scriptease/knowlede-base/script-contexts) (see [Concepts](/boomi-scriptease/general)) and passes it to the script.

```groovy
def context = new ProcessScriptContext(
        inputDocuments: [
                Document.fromText('''
                { 
                        "firstname" : "Walter", 
                        "lastname" : "Schmidt" 
                }''')
        ],
        dynProcPros: [ 
                DPP_Prop01: "2024",        
        ])
_testScript.run(context)
```

### The Script Context Properties

The `ScriptContext` has the following properties:

```groovy
public List<ProcessExecutionProperties> processCallChain;
public Map dynProcPros;
public Map procPros;
public final Map executionProperties;
  
// additional, ProcessScriptContext, only, properties
public List<Document> inputDocuments;
public final List<Document> outputDocuments;
```

See in the following chapter how to set and pass a content to a Process Script.

### Documents and Dynamic Document Properties

{% hint style="info" %}
**IMPORTANT**

In this section you will learn how to **initialize properties in a Test class** to use them in a script. If you want to know how to access (read/write) properties in a Boomi Script, read here: [How to use Properties in a Boomi Script](https://community.boomi.com/s/article/properties-using-groovy)
{% endhint %}

<details>

<summary>Add input Documents from code (inline)</summary>

Use the `Document.`**`fromText`**`()` factory method to add any number of documents to the `ProcessScriptContext.inputDocuments` list.

```groovy
ProcessScriptContext context = new ProcessScriptContext( inputDocuments: 
[
  Document.fromText('{ "firstname" : "Walter", "lastname" : "Schmidt" }'),
  Document.fromText( JsonOutput.toJson( [ firstname : "John", lastname : "Doe" ])),
  Document.fromText('''
  { 
    "firstname" : "Walter Jr.", 
    "lastname" : "Miller" 
  }'''), // Groovy multi-line text support
  
])
_testScript.run(context)
```

</details>

<details>

<summary>Add input Documents from file</summary>

Use a `TestFilesHelper _testFiles` instance to support access to files in a specified sub-directory.

<img src="/files/ollvdM4RjfagepKJQRre" alt="" data-size="original">

Use the `Document.`**`fromFile`**`()` factory method to add any number of documents to the `ProcessScriptContext.inputDocuments` list.

<pre class="language-groovy"><code class="lang-groovy">final TestFilesHelper _testFiles = new TestFilesHelper( "testData", _sourceUri)

<strong>ProcessScriptContext context = new ProcessScriptContext(
</strong>  inputDocuments: [
    Document.fromFile( _testFiles.get( "doc01.json")),
    Document.fromFile( _testFiles.get( "doc01.json"))
  ])
_testScript.run(context)
</code></pre>

</details>

<details>

<summary>Mixed input documents</summary>

You can mix `fromText` and `fromFile` as you want. The input documents do not care where they are coming from.

```groovy
ProcessScriptContext context = new ProcessScriptContext(
  inputDocuments: [
    Document.fromFile( _testFiles.get( "doc01.json")),
    Document.fromText( '{ "firstname" : "Walter", "lastname" : "Schmidt" }')
  ])
```

</details>

<details>

<summary>Add input Documents with Dynamic Document Properties</summary>

Use the `Document.fromText()` factory method to add any number of documents to the `ProcessScriptContext.inputDocuments` list. Dynamic Dcoument Properties are represented as [Groovy Map](https://www.tutorialspoint.com/groovy/groovy_maps.htm), which is a `key : value` list.

```groovy
// Add three documents with DDP_Prop1 and DDP_Prop02 each
ProcessScriptContext context = new ProcessScriptContext(
	inputDocuments: 
	[
		Document.fromText('Doc Content01', 
		[
			DDP_Prop01: "Doc1_Value1", 
			DDP_Prop02: "Doc1_P2"
		]),
		Document.fromText('Doc Content02', 
		[
			DDP_Prop01: "Doc2_Value1", 
			DDP_Prop02: "Doc2_P2"
		]),
		Document.fromText('Doc Content03', 
		[
			DPP_Prop01: "Doc3_Value1", 
			DPP_Prop02: "Doc3_P2"
		])
	])
_testScript.run(context)
```

</details>

### Dynamic Process Properties

<details>

<summary>Standard</summary>

```groovy
ProcessScriptContext context = new ProcessScriptContext(
  inputDocuments: [ ... ],
  dynProcPros: [
	DPP_DynProcProp01 : 1,
	DPP_DynProcProp02 : "Value01"
  ]
)
_testScript.run(context)
```

</details>

<details>

<summary>Explicit assignment to the script context</summary>

```groovy
ProcessScriptContext context = new ProcessScriptContext()

context.dynProcPros.DPP_ProcPropString = "My Process Property"
context.dynProcPros.DPP_IntValue = 0

context.inputDocuments = [ Document.fromText('abc') ]

_testScript.run(context)
```

</details>

### Process Properties

Process Properties need a little bit more effort. You need to provide

* the Process Property <mark style="color:blue;">Component Id</mark> (`b91d87a4-7e8b-4a98-8ea8-a85e32bb5677`) and
* the Process Property <mark style="color:orange;">Value Key</mark> (`fcc4749d-5135-4eaa-a9cf-1b2ddc1ad12`)

<figure><img src="/files/JixNzu9p2dbIAzRhpO7w" alt=""><figcaption><p>Process Property Ids</p></figcaption></figure>

**Process Property Ids are system independent.** This means, these IDs won't change even if you copy or export process properties to a different account. The Ids remain the same!

<details>

<summary>Standard Initialization</summary>

```groovy
final String ppMessageContext = "b91d87a4-7e8b-4a98-8ea8-a85e32bb5677"
final String ppKeyServiceIncident = "fcc4749d-5135-4eaa-a9cf-1b2ddc1ad12"
final String ppKeySenderAddress = "anotherGuid"

// Wrap keys in parenthesis 
// so that the variables (Ids) are taken and not the text as a string

ProcessScriptContext context = new ProcessScriptContext(
	inputDocuments: [Document.fromText("abc")],
	procPros: 
	[
		(ppMessageContext): [
				(ppKeyServiceIncident): "Incident_01",
				(ppKeySenderAddress)  : "mailto@google.com"
		]
	])

_testScript.run(context)
```

</details>


# Assertions

After your script was executed you may want to check the produced results.

```groovy
_testScript.run(context)

println("\r\n--- Test Output ----------")

int docCount = context.outputDocuments.size()
println(docCount + " Document(s) after script execution")
assert context.inputDocuments.size() == docCount

for (Document doc in context.outputDocuments) {
    String textDoc = doc.toString()
    assert textDoc != "", "Document is null"
    println("Doc[${docNo++}] ----" )
    println(textDoc)
}
```

As you can see you can access the output documents using `context.outputDocuments`.

### Validate an XML output document

```groovy
  /** The testfile for document 1 contains one _uniquekeys_ which is converted to:
     *  <RecordQueryRequest limit="" offsetToken="">
     *      <filter op="OR">
     *          <fieldValue>
     *              <fieldId>
     *                  VATNO
     *              </fieldId>
     *              <operator>
     *                  EQUALS
     *              </operator>
     *              <value>
     *                  V_5001
     *              </value>
     *          </fieldValue>
     *     ....
     * */
    static void _checkDoc1(Document document) {
        def ddpUniqueKeyCount = document.getProperty("DDP_UniqueKeyCount")
        assert (ddpUniqueKeyCount as Integer == 1)

        final xs = new XmlSlurper()
        String xml = document.toString()
        println( xml)
        
        def xDoc = xs.parseText(xml)
        // Get first [filter] element
        def field0 = xDoc.filter.fieldValue[0]      
        
        // Print a validate its children
        println( "OPERATION[0]:")
        println( "Field     : '${field0.fieldId}' ")
        println( "Operation : '${field0.operator}' ")
        println( "Value     : '${field0.value}' ")
        
        // @TypeChecked must be off!!! 
        assert ((xDoc.filter.fieldValue[0].fieldId) as String).equals("VATNO")
        assert !((xDoc.filter.fieldValue[0].fieldId) as String).equals("vatno")
    }
```

### Check for Dynamic Document Properties

To get a document's dynamic properties use `document.getProperties()`, and, be aware, these properties start with `document.dynamic.userdefined`.

There are two options to read Dynamic Document Proeprties from an output document:

```groovy
_testScript.run(context)
_checkDoc0( context.outputDocuments[0])
...

static void _checkDoc0(Document document) {
    // OPTION A
    def props = document.getProperties()
    def ddpUniqueKeyCount0 = props.get("document.dynamic.userdefined.DDP_UniqueKeyCount")
    
    // OPTION B
    def ddpUniqueKeyCount1 = document.getProperty("DDP_UniqueKeyCount")
    
    // Asert they are the same
    assert( ddpUniqueKeyCount0 == ddpUniqueKeyCount1)
}
```


# The Process Call Chain

Support for main process, sub processes and process routes

{% hint style="warning" %}
If you do **not** use **`ExecutionTask`** you can live with the defaults - as I have done for four years. Skip this page!
{% endhint %}

Recently I came accross a script that used the following code with `ExecutionTask` :

```groovy
ExecutionTask currentProcessExecution = ExecutionManager.getCurrent()
_logger.info( "*** Script hosting process name  : " +  currentProcessExecution.getProcessName())

ExecutionTask t = currentProcessExecution
while( t.getParent() != null) t = t.getParent()

_logger.info( "*** Top-Process Name : " +  t.getProcessName())

// *** Script hosting process name  : subPr.subProcess_01_01
// *** Top-Process Name             : Custom Main Process
```

## The Basics

A script is hosted in a process. This process can be a sub-process of another process(es).

For example:

* **Main** Process calls (Level -2)
  * **subProcess01** routes to (Level -1)
    * **subPr.subProcess\_01\_01**, where the script runs on! (Level 0)

{% hint style="info" %}
The [ExecutionProperties](/boomi-scriptease/knowlede-base/script-contexts#scriptcontext) `EXECUTION_ID, PROCESS_ID, PROCESS_NAME`\
refer to the script's (hosting) process.
{% endhint %}

What you need to undestand is, that each process *execution* has its own `ExecutionTask` object with different properties, and you can traverse up the hierarchy using the `getParent()` method.

```groovy
bool isTopLevelProcess = executionTask.getParent() == null
```

#### Process Name = subPr.subProcess\_01\_01

```groovy
ExecutionTask currentProcessExecution = ExecutionManager.getCurrent()
```

```
+ ExecutionTask Properties - Level=0
- Is Top-Level           = false
- Id                     = execution-59f72f67-95ed-4917-8c54-8d3a3c5f2b02-2024.06.26
- Execution Id           = execution-59f72f67-95ed-4917-8c54-8d3a3c5f2b02-2024.06.26
- Process   Name         = subPr.subProcess_01_01
- Process   Id           = 6a3bfa82-997a-4842-8b6b-1362e07016dc
- Component Id           = 6a3bfa82-997a-4842-8b6b-1362e07016dc
- Start Time             = 1719397726865
```

#### Process Name = subProcess01

```groovy
ExecutionTask level1 = currentProcessExecution.getParent()
```

```
+ ExecutionTask Properties - Level=1 - bottom (=0) up to top-level
- Is Top-Level           = false
- Id                     = execution-d41b8cd6-0c92-4edd-9452-77ac20499071-2024.06.26
- Execution Id           = execution-d41b8cd6-0c92-4edd-9452-77ac20499071-2024.06.26
- Process   Name         = subProcess01
- Process   Id           = 2b626af5-4bec-422b-a9ec-a6d0a15090e8
- Component Id           = 2b626af5-4bec-422b-a9ec-a6d0a15090e8
- Start Time             = 1719397726637
```

#### Process Name = Main

```groovy
ExecutionTask level0 = currentProcessExecution.getParent()
```

```
+ ExecutionTask Properties - Level=0 - bottom (=0) up to top-level
- Is Top-Level           = false
- Id                     = execution-59f72f67-95ed-4917-8c54-8d3a3c5f2b02-2024.06.26
- Execution Id           = execution-59f72f67-95ed-4917-8c54-8d3a3c5f2b02-2024.06.26
- Process   Name         = Custom Main Process
- Process   Id           = 6a3bfa82-997a-4842-8b6b-1362e07016dc
- Component Id           = 6a3bfa82-997a-4842-8b6b-1362e07016dc
- Start Time             = 1719397726865
```

### How to define a process call hierarchy in a Test

<mark style="color:blue;">**`import msPro.scriptease.*`**</mark> <mark style="color:red;">`// Important`</mark>

```groovy
ProcessScriptContext context = new ProcessScriptContext(
inputDocuments: [ ...],

// Override to test process chains 
processCallChain : [
		new ProcessExecutionProperties( "Custom Main Process"),
		new ProcessExecutionProperties( "subProcess01"),
		new ProcessExecutionProperties( "subPr.subProcess_01_01")
])
```

`Process Id` (=`Component Id`) are set to a randowm Guid by default. This can be overridden in the `ProcessExecutionProperties` constructor.

`StartTime` and `executionId` are set a atuomatically.


# Download

Download and Release History

## **ScriptEase Project**

The **ScriptEase Project** contains sample scripts and templates to <mark style="color:red;">get started with ScriptEase</mark>.

:pencil: [DOWNLOAD - ScriptEase Project](https://github.com/MarkusSchmidtPro/MSPro.Boomi.MGF4Boomi.Demo/zipball/main) is all you need when you start with *ScriptEase*.\ <sup>It includes the latest version of the</sup> <sup>**ScriptEase library.**</sup>

{% hint style="info" %}
**Git Repository**

The Demo project is currently [hosted on GitHub](https://github.com/MarkusSchmidtPro/MSPro.Boomi.ScriptEase).\
I recommend, if you know how to use Git, to pull it from there (use it as a Git repository) instead of downloading the zip-file.
{% endhint %}

<details>

<summary>The ScriptEase library</summary>

The **ScriptEase library** `scriptEaseLib-x.y.z.jar` provides the magic to edit, debug and test Boomi Process- and Map-Scripts on your local machine using JetBrains IntelliJ.

If you have an <mark style="color:red;">**existing ScriptEase project on your local machine, to update**</mark> the library.

{% hint style="success" %}

### Latest Version <mark style="color:orange;">1.3.4</mark> - 2025-04-08

:dvd: [DOWNLOAD - Latest ScriptEaseLib](https://github.com/MarkusSchmidtPro/MSPro.Boomi.ScriptEase/tree/main/MyScripts/lib).jar

* Licensing optimized
* `ExecutionUtil` completely re-written to better emulate the Atom implementation.
* Logging optimized
  {% endhint %}

</details>

<details>

<summary>Version History</summary>

1.3.0 - 2025-03-22

* Licensing implemented (see [Licensing](/boomi-scriptease/licensing) )

1.1.4 - 2025-02-06

* Fixed: `outputDocuments` are empty when more than one script is executed on the same test.

#### 1.1.3 - 2024-12-10

* Logging `DefaultFormatter` no longer uses Thread, to support JDK 23 and JDK11.
* `testFileHelper` supports `getText()`

#### 1.1.1 - 2024-12-04

* Fixed compatibility issues when using logging with Java 11.
* Fixed typos on property names
  * Changed some property names on `ExcutionContext`.

#### 1.1.0 - 2024-12-03

<mark style="color:red;">**Please update to v1.1.1**</mark>

* All `scriptEaseLib` classes use: `@CompileStatic` and `@TypeChecked`
* `ProcessExecutionProperties` fixed
* Better *typed*, library internal classes restricted to `@PackageScope`

#### 1.0.2 - 2024-11-18

* Finally renamed to ***ScriptEase***.
  * MGF (Markus\`s Groovy Framework) became *ScriptEaseLib*\
    to avoid any confusion with the PSO Boomi *Framework*.
* **NEW** Licensing implemented
* **FIX** No more *HashMap*, uses *Map* everywhere to improve compatibility with Java

</details>

<details>

<summary>Personal Versions (pre-release)</summary>

#### 0.6.1 - 2024-08-22 <a href="#id-061---2024-08-22" id="id-061---2024-08-22"></a>

* **FIX** *getStream( docNo=0) called more than once.* error when passing empty documents to the script.

#### 0.6.0 - 2024-08-08 <a href="#id-060---2024-08-08" id="id-060---2024-08-08"></a>

* **NEW** `Document.fromByteArray()` and `Document.fromStream()` added
* **NEW** Text encoding added to `Document.from` functions so that it is no longer UTF-8!
* **FIX** After calling `Document.toString()` the document was empty

#### 0.5.0 - 2024-07-04

Major changes for MapScripts were required to correctly simulate a Map context and the lifetime of map script objects. As long as the MapScript ran on a single property, everything was fine. However, to support a MapScript running on an Array (for each single array element) the new updates were required.

~~`MapScriptContext`~~ was replaced by `ProcessContext` which can optionally be provided in the `MapScript` constructor.

```groovy
OLD 0.4.x and earlier
----------
def scriptContext = new MapScriptContext([ a: 5, b: 7])
_testScript.run(scriptContext)


NEW 0.5.x 
----------
final MapScript _testScript = 
  new MapScript("msg" + SCRIPT_NAME + ".groovy", _sourceUri, new ProcessContext())

void Test() {
  def variables = _testScript.run([a: 5, b: 7])

  assert variables.total != null, "Script did not set 'total' as output parameter!"
  assert variables.total == (variables.a as int) + (variables.b as int), "Calculation result does not meet expectations!"
}
```

... continuous evolution ...

</details>

### 0.0.0 - 2020 August

* That was the date when it all started!


# Appendix

A collection of topics.


# Script Templates

Script Templates are used to easily create a new scripts together with test contexts. Right click on any script folder where you want to create a ***New -> Boomi Process Script**.*

<figure><img src="/files/AyjTUqoVvAOvRF5zASaN" alt=""><figcaption><p>Use IntelliJ Templates</p></figcaption></figure>

* Give the script a meaningful name.
  * <mark style="color:green;">**DO use**</mark> characters, numbers and underline only.
  * <mark style="color:red;">**DO NOT**</mark> use <mark style="color:red;">**spaces**</mark> or special characters: <mark style="color:red;">`-/&(){},[]`</mark> etc.
  * <mark style="color:green;">**DO use**</mark> either`CamelCase, camelCase` or `lower_case` notation.
* Write one line about the purpose of the script.
* and you your shortcut as the author

<figure><img src="/files/nZzyouHUcy2pVOpr6RBz" alt=""><figcaption><p>Create a new Boomi Process Script based on a template</p></figcaption></figure>

{% hint style="info" %}
The script filename starts with `psg<BoomiScriptName>` as the naming convention for **P**rocess **S**cript **G**roovy: **`psg`**`MyFirstScript.groovy`.
{% endhint %}

The Script file **`psgMyFirstScript.groovy`** is created with the following content:

```groovy
final String SCRIPT_NAME = "MyFirstScript"

/* **************************************************************************
    This is my first script.
        
    IN : [Describe inbound arguments]
    OUT: [Describe outbound arguments]
    ------------------------------------------------
    12.05.2024  mspro -   Created
    Template v0.2.1
************************************************************************** */

final _logger = ExecutionUtil.getBaseLogger()
_logger.info('>>> Script start ' + SCRIPT_NAME)
...
for (int docNo = 0; docNo < docCount; docNo++) {
	final String textDoc = _getTextDocument( docNo)
	final Properties props = dataContext.getProperties(docNo)
	// *********** Document related functionality ************
	
	// Your document related code here ...
	
	// ******** end of Document related functionality ********
	_setTextDocument( textDoc, props)
}
...
```

## Create a new Test Context

To run a Boomi Script we need a Test Context.

When you create a ***New -> Boomi Process Script Test***, provide the script's name that you used when creating the script: `final String SCRIPT_NAME = "`*`MyFirstScript`*`"`

<figure><img src="/files/wKkBbiH74FfSMicMBbXA" alt=""><figcaption><p>Create a new Test Class for <em>MyFirstScript</em></p></figcaption></figure>

```groovy
@TypeChecked
class Test_psgCalcTotal {
	final String SCRIPT_NAME = "psgCalcTotal"

	@SourceURI
	URI _sourceUri
	final ProcessScript _testScript 
	  = new ProcessScript("psg" + SCRIPT_NAME + ".groovy", _sourceUri)

	/** A short description what this test is supposed to do. */
	@Test
	void test01() { ... }
}

```

### Run the Test

You can **run or debug the Test** right from there:

<div align="left"><figure><img src="/files/bvemXeXLbhG13Azqk9ON" alt=""><figcaption><p>Run or debug script</p></figcaption></figure></div>


# Java thoughts and recommendations

JDK, SDK, JRE, 11, 17, 23, ... Java confuses me because my impression is: patchwork.

Groovy Scripts are pre-compiled into byte-code to run on the Java Virtual Machine (JVM).

* Groovy is not interpreted during run-time. It is pre-compiled before it runs, and the resulting byte-code is executed on a JVM.
  * The Groovy compiler `groovc` is part of the Groovy package.
  * Groovy needs a JVM as its execution platform.
* When the script runs on the Atom, the Atom's JVM runs the script.
* When the script runs a the local machine, the [*Project SDK*](/boomi-scriptease/setup-a-customer-project-a5e8a967b06b4f9d9123b55f72e07145/intellij-configuration#configure-sdk) determines the JVM.

{% hint style="info" %}
Until today (2024-11-19) I recommended to use the Atom JVM as the Project SDK so that a script is executed with the same Java Virtual Machine Version as when it runs on the Atom.

However, when you get unrecognisable warnings during development it is probably because of the (legacy) Java 11.
{% endhint %}

<figure><img src="/files/4EeAWIrQyFBpziWF5lsd" alt=""><figcaption><p>(Local) Atom Startup Properties</p></figcaption></figure>


# Chose newer JVM for local development

{% hint style="info" %}
I cannot say, yet, if choosing a different JVM for local script execution has any impact on *ScriptEase* - scripts are executed on a different Java Virtual Machine, as when they run on the Atom!

For the time being, I decided to continue with corretto-23 to avoid Warnings.
{% endhint %}

You may **download and switch to&#x20;*****corretto-23*** as the *Project SDK*, instead of choosing the ATOM JDK.

<figure><img src="/files/JIgeufiQBVkHIYk56TWG" alt=""><figcaption><p>Using a different Java SDK</p></figcaption></figure>

{% content-ref url="/pages/DmCeT5mP7D6pI2akJeU0" %}
[An illegal reflective access operation has occurred](/boomi-scriptease/troubleshoot/illegal-reflective-access)
{% endcontent-ref %}


# Boomi documentation and links

Recently I found an official Boomi document about\
[***Setting up IntelliJ to Test Groovy Code in Boomi***](https://community.boomi.com/s/article/Setting-up-IntelliJ-to-Test-Groovy-Code-in-Boomi)

**I recommend** using different JAVA and Groovy versions than mentioned in this (old) article. In 2024, an ATOM uses <mark style="color:orange;">**JAVA 11**</mark> and AtomSphere uses Groovy v2.4.<mark style="color:orange;">**13**</mark>**.**


# Initialize IntelliJ Templates

{% hint style="danger" %}
Since 19th of Nov 2024 the follwoing is no longer required.

Template configuration should be contained in the shipped `workspace.xml.`
{% endhint %}

## One time setup - Boomi Script Templates in IntelliJ

* Select menu *File -> Settings* ⇒ *Editor -> File and Code Templates.*

<figure><img src="/files/2kFvPqC7lohOVQ1WyK8s" alt=""><figcaption></figcaption></figure>

* Select ***Scheme : Project***
* Check the Boomi Scripts exists
* Click *Ok* to close the dialog, done!


# Script Contexts

There are two different script context types:

* [Process Script Context](#processscriptcontext)
* [Map Script Context](#mapscriptcontext)

Both are based on [ScriptContext](#scriptcontext) and this is what they both have in common.

## ProcessScriptContext

The `ProcessScriptContext` contains the **input and output documents**, in addition to the information in `ScriptContext`. A Document consists of the document content and its (dynamic document) properties.

```groovy
public List<Document> inputDocuments = []
public List<Document> outputDocuments = []
```

<details>

<summary>Process ScriptContext example</summary>

The following examples demonstrates how to setup all kind of properties and documents to run a process script.

```groovy
ProcessScriptContext context = new ProcessScriptContext()
// Initialize 
// * Execution context          : executionContexts
// * Dynamic Process Properties : dynProcPros
// * Process Properties         : procPros
// * Documents                  : inputDocuments
//      incl. Dynamic Document Properties
// --------------------------------------------------------------

// context.executionProperties.ACCOUNT_ID = "My Account ID"

context.dynProcPros.DPP_ProcPropString = "My Process Property"
context.dynProcPros.DPP_IntValue = 0

// region Process Property 

final String PROCESS_PROPERTY_COMPONENT_ID = "8fb41f63-a988-4778-8cc8-0144f30ace81"
final String VAL1_ID = "eea9e988-cb14-4a84-ba37-ee455451a741"
final String VAL2_ID = "2c68fb60-8431-46cc-9da9-cbe10d446a0e"

// Wrap key in parenthesis so that the variables (Ids) are taken
// and not the text as a string

def procPropValue1 = 4711
def procPropValue2 = "Markus Schmidt"

context.procPros = [ (PROCESS_PROPERTY_COMPONENT_ID): 
	[
		(VAL1_ID): procPropValue1,
		(VAL2_ID): procPropValue2
	]]
// endregion

// region Documents

final String DDP_Name = "DDP_IntValue"
int[] ddpValues = [ 10, 11, 12]

context.inputDocuments = 
[
	Document.fromText('''
	{
		"firstname" : "Walter",
		"lastname" : "Schmidt"
	}''', [(DDP_Name): ddpValues[0]]),
	Document.fromFile( _testFiles.get( "demoDoc01.json") , [(DDP_Name): ddpValues[1]]),
	Document.fromFile( _testFiles.get( "demoDoc02.json") , [(DDP_Name): ddpValues[2]])
]

// endregion

_testScript.run(context)
```

</details>

## MapScriptContext

A `MapScriptContext` represents the input and output variables as they are defined on the platform, in addition to the information in `ScriptContext`.

<figure><img src="/files/eUPk9tua4QGKSj7uOXCw" alt=""><figcaption></figcaption></figure>

```groovy
MapScriptContext scriptContext = new MapScriptContext(  [
    a: 5,
    b: 7
])

_testScript.run(scriptContext)

assert scriptContext.variables.total 
  == (scriptContext.variables.a as int) 
   + (scriptContext.variables.b as int), 
   "Calculation result does not meet expectations!"
```

## ScriptContext

The `ScriptContext` is the base class,`MapScriptContext` and `ProcessScriptContext` inherit from it. The ScriptContext hosts:

* Process Properties - procProps
* Dynamic Process Properties - dynProcProps
* Execution Properties - executionProperties

```groovy
public Map dynProcPros = [:]
public Map procPros = [:]

public final Map executionProperties =
[
 ACCOUNT_ID  : 'IntelliJ_IDEA-M42S66',
 ATOM_ID     : '0b6e3ab7-9d81-4954-b781-d212195e577c',
 ATOM_NAME     : 'Markus Groovy 4 Boomi',

 // null on local Atom, some text on Cloud ATOM (e.g. NODE_ID = atom01)
 NODE_ID       : null,

 // set before script starts - ProcessScriptContext run
 DOCUMENT_COUNT: 0,
 
 // see Process Call Chain
 // If you do not plan to use ExecutionTask objects in your 
 // scripts you can live with the defaults and you won't care!
 EXECUTION_ID : generateExecutionId(), // random
 PROCESS_ID   : UUID.randomUUID().toString(),
 PROCESS_NAME : "My Main Process"
]
```

{% hint style="info" %}
If you want to use `ExecutionTask` objects in your scripts,\
read also about [The Process Call Chain](/boomi-scriptease/test-contexts/the-process-call-chain)
{% endhint %}


# Troubleshoot

This section cotains a collection of issues and solutions.


# Java the weed

A longer story ...

Java is like a weed: a plant whose growth cannot be controlled. As in real life, you have to check from time to time where it has installed itself and you have to remove it manually, because - at least in my Windows machine - not one JAVA SDK is listed under Apps.

The problem with that is that you never know which Java SDK (or run-time) is used when you use Java. The first one installed, the last one installed, the one with the highest version number ... what if there are two distributions with the same version, which one is updated automatically and so on.

{% hint style="danger" %}
To avoid unpredictable and unexpected results when using IntelliJ with Groovy\
you must control your Java installations!
{% endhint %}

## Observations

One day, I recognized a growing list of SDKs in my IntelliJ project:

<figure><img src="/files/lXVigErphfAxzxRjmaOT" alt=""><figcaption><p>Java SDKs in the project - found and added by IntelliJ</p></figcaption></figure>

The first action I took was to search for "java.exe" which gave me some insight where to look for weed.

<figure><img src="/files/ty6euwYrKq4sFn0LSu3e" alt=""><figcaption><p>Searching for "java.exe" - using <a href="https://www.voidtools.com/downloads/">Everything</a></p></figcaption></figure>

Alternatively, on Windows you can run `where /R groovy.bat` and `where /R java.exe` to find all SDK locations on your machine.

Actually, I wanted

* **one** Java SDK and distribution (I use Amazon Corretto v23)
* the ATOM SDK: `C:\Program Files\Boomi AtomSphere\LocalAtom\jre\bin`
* Some applications, especially JetBrains Apps like IntelliJ, install their own, local run-time,, which you will want to keep!

### Confusion

{% hint style="info" %}
There is no other way to check for Java installations on your machine then searching for "java.exe" - omg!
{% endhint %}

You may use `where java` on the command-line or you want to check the `JAVA_HOME` environment variable:

```
C:\> where java
C:\Program Files\Amazon Corretto\jdk21.0.6_7\bin\java.exe

C:\> set JAVA_HOME
JAVA_HOME=C:\Users\marku\.jdks\corretto-23.0.1
```

and you will be confused even more!

<figure><img src="/files/sUzeE6t65NacAqjPfiAM" alt=""><figcaption><p>Nothing is listed under "Apps" (Windows)</p></figcaption></figure>

### Get rid of it

{% hint style="info" %}
Close IntelliJ and all other applications that might lock Java.
{% endhint %}

* Pick all the paths containing a *java.exe* which you don't want.
* Delete these directories using a **console window with ADMIN rights**.

<pre><code><strong>rmdir /s /q "C:\Program Files\Amazon Corretto\jdk21.0.6_7\bin\"
</strong>rmdir /s /q "C:\Users\marku\.jdks\corretto-23.0.1\bin"
rmdir /s /q "C:\Users\marku\.jdks\corretto-23.0.2\bin"
rmdir /s /q "C:\Users\marku\.jdks\jbr-17.0.12\bin"
rmdir /s /q "C:\Users\marku\.jdks\openjdk-23.0.1\bin"
</code></pre>

<details>

<summary>Gradle</summary>

Gradle is a Java build tool. You may have it or not but you may notice it is **even worse than Java:**

<figure><img src="/files/cyIGBlSDBrxWPwNuuYDh" alt=""><figcaption><p>.gradle Cache files</p></figcaption></figure>

I delete my `.gradle` cache folder from time to time (incl. the included Java distributions) to get a fresh Gradle setup: `rmdir /s /q "V:\packages\.gradle"`. The next time I use Gradle it downloads and installs back automatically but I got rid of all the old and unused versions that were littering my computer.

For example, the *ScriptEaseLib* is built with Gradle. Every time I build it, the Gradle toolchain is downloaded if it does not exist. It takes a minute or two ...

<figure><img src="/files/GDhGG5z1ZRuxV9PysDHA" alt=""><figcaption><p>Gradle is downloading</p></figcaption></figure>

</details>

## Clean! Start over! Clean install!

* Close all JAVA apps
* Close IntelliJ
  * Close all JetBrains apps, incl. ToolBox
* Check Task Manager that Java isn't running anymore
* Alternatively: log-off and log-on again

Find your preferred distribution, for example: [Amazon Corretto 23](https://docs.aws.amazon.com/corretto/latest/corretto-23-ug/downloads-list.html).

Ensure you are running a complete installation incl. environment variables etc.\
![](/files/cwRMxtwnGLDBnAmdLmMp)

Unfortunately there are two (Windows) environment variables: for the current user and for *system.* The user setting has preference and the Corretto installation sets the system variable. Delete the user's JAVA\_HOME and go with the just installed system setting:

<figure><img src="/files/h43qB66oRO5JUg5V7nPy" alt=""><figcaption><p>Windows environment settings</p></figcaption></figure>

### Fix IntelliJ

IntelliJ will now list orphaned references:

<figure><img src="/files/gIWuL3FQBcTW9nV4EX2S" alt=""><figcaption><p>Orphaned Java SDKs in IntelliJ</p></figcaption></figure>

* Leave the ATOM JDK and remove all other entiries.
* Add the one and only that you have just installed

<figure><img src="/files/C1e5RdUWcjMM47M5re1r" alt=""><figcaption></figcaption></figure>

* Fix your *Project Settings*

<figure><img src="/files/j7cDcBztozVAdWWknso9" alt=""><figcaption></figcaption></figure>

\* Make sure all your modules (normally there is only one) use the *Project SDK*

<figure><img src="/files/wJVHyo77XcmrdCh6AQml" alt=""><figcaption></figcaption></figure>

## Final Checks

**Open a new console window!**\
If you had an open console, this has not recognized all the changes you made!

```
c:\> where java
C:\Program Files\Amazon Corretto\jdk23.0.2_7\bin\java.exe

c:\> set JAVA_HOME
JAVA_HOME=C:\Program Files\Amazon Corretto\jdk23.0.2_7
```


# ClassNotFoundException - GroovyStarter

```
Error: Could not find or load main class org.codehaus.groovy.tools.GroovyStarter
Caused by: java.lang.ClassNotFoundException: org.codehaus.groovy.tools.GroovyStarter
```

<figure><img src="/files/hOFBuf4gCZVF7fSV2n30" alt=""><figcaption><p>ClassNotFoundException - GroovyStarter</p></figcaption></figure>

This error message appears when you try to run a process- or map-script directly.

<figure><img src="/files/6GA6mlJgbzVW9EDaBPnP" alt=""><figcaption></figcaption></figure>

You must start the `Test_` (as the script host), not the script itself -> [Concepts](/boomi-scriptease/general)


# Invalid VCS root mapping

In case you see

<figure><img src="/files/Xlv1e47sKDZ7uyQxmbTJ" alt=""><figcaption></figcaption></figure>

either ignore this message or click on *Configure..* and remove the directory mappings.

<figure><img src="/files/zainqZ5QYUImKhaXuQyR" alt=""><figcaption><p>Remove Version Control Settings</p></figcaption></figure>


# An illegal reflective access operation has occurred

Groovy 2.4 was released 21 Jan 2015, and it has reached [end of life](https://endoflife.date/apache-groovy). JDK 11 was released on September 25, 2018 (with long-term-support \[LTS]). And bringing both together in a modern IDE results in an <mark style="color:red;">WARNING: An illegal reflective access operation has occurred</mark>, when running a script.

<figure><img src="/files/QgfW1kPaeuEIMtcM7f1w" alt=""><figcaption></figcaption></figure>

Finally, I was able to get rid of that message:

{% content-ref url="/pages/YTktDk2gfE3VLbEvHAMJ" %}
[Chose newer JVM for local development](/boomi-scriptease/knowlede-base/java-jdk/chose-newer-jvm-for-local-development)
{% endcontent-ref %}


# UnauthorizedAccess Error

```
PS C:\vStudio\BoomiProjects\ABC> **Get-ExecutionPolicy -List**

        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy       Undefined
   UserPolicy       Undefined
      Process       Undefined
  CurrentUser       Undefined
 LocalMachine       AllSigned

**> Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser**
```


# Licensing

* *ScriptEase* is licensed per user\
  The username is automatically derived from the Windows user name\
  (the same applies to Apple or Linux users).
* *ScriptEase* can be used and tested for **30 days - free Trial-Period**\
  When you use *ScriptEase* for the first time a trial license is automatically issued to the logged-in user. Once expired this user can no longer use *ScriptEase*.

After that Trial period - or even earlier - when you like ScriptEase, you need a subscription.

## :shopping\_cart: [<mark style="color:blue;">FastSpring Check-Out</mark>](https://mspro.onfastspring.com/scriptease)

A subscription contains three licenses for three users.

Subscriptions are for an indefinite time, and you’ll be charged at the beginning of each billing cycle according to your subscription terms (for example, weekly, annually, or another period), unless you unsubscribe.

You can unsubscribe at any time to the end of the current period.

In case of any question: Markus @ MarkusSchmidt.pro


# License Activation

When you purchase a *ScriptEase* license you can use this license with one user. The user is assigned to the license-key you received when you activate the license.

### License activation

<figure><img src="/files/Y6H9Zz3GYBsWe0dIprko" alt=""><figcaption></figcaption></figure>

* Open the *LicenseActivator* class
* Paste your license-key
* and run *activateLicense()*

Check the console window for success:

```
Your UserName: '<yourName>'
Activating your License. Be patient ...
OK!
Your license-key was successfully activated and saved!
```


# Privacy Policy

This Privacy Policy describes how *ScriptEase* collects, uses and shares personal data. Personal data is information that can directly or indirectly identify you, such as name, email address, phone number, IP address and location data.

{% hint style="warning" %}
The published content and all developments are the result of [the author's](https://mspro.gitbook.io/the-mspro-boomi-collection#about-the-autor) free time. All tools used, hosting costs, web services etc. are privately financed and nothing is sponsored, nor commented, nor approved by *Boomi, LP*.
{% endhint %}

### Collected data

We do not collect any data!

* ScriptEase sends the license-key, your user- and machine name\
  to our license service for license-key validation..

### Purposes of use

We use the data we 'collect' for the following purposes:

* Provision of services\
  We use your data to provide you with the services you have requested.

### Disclosure of data

We don't share your data!

### Data security

We take appropriate security precautions to protect your data from unauthorized access, loss, misuse or alteration.

### How to contact us

If you have any questions or concerns about this Privacy Policy, please contact us at markus @ MarkusSchmidt.pro.

### Changes to the privacy policy

We may change this privacy policy from time to time. The latest version is always available on our website.

Date of last update: 2025-03-17


# Boomi Console

Push your Boomi Integration development experience to the next level

Take a couple of seconds, to get a first impression and see *BoomiConsole* in action:

* We start on the **Boomi Integration** Build Tab, take a process Id
* and let *BoomiConsole* do some work.

<div data-full-width="true"><figure><img src="/files/5XKZbB9E4VaRo80zKxPR" alt=""><figcaption><p>BoomiConsole in Action</p></figcaption></figure></div>

{% content-ref url="/pages/-MZr2kGnQIXlikIAQCBf" %}
[Installation & Setup](/boomi-console/installation)
{% endcontent-ref %}

## Some highlights

* Get and use the possibilities of Component Metadata
* Create [extensive documentation](/boomi-console/library/referenced-pages/documentation-snapshots) in [Markdown](https://www.markdownguide.org/getting-started/) format
  * Support for Maps, Profiles, Processes
* Get [profiles, SQL statements and Scripts in native format](/boomi-console/library/referenced-pages/native-profiles)\
  (Json Profile as JSON file, plain SQL statements)
* Document your deployments (and packages)
  * Get Packaged and Deployed Component Information
* Process Analysis
  * [Process Flow UML Diagrams](/boomi-console/library/referenced-pages/documentation-snapshots#process-documentation)
  * Create [list of of property](/boomi-console/library/referenced-pages/lists) usages in processes
* Build Sprint Sets that contain all components edited in a sprint
  * Build Set-based deployment documentation
  * One-click (Set) deployments
* Get Deployed Packages information
  * and get an *Excel*lent overview which version is on which Environment
* many, many more

{% hint style="info" %}
[Disclaimer](https://boomi.markusschmidt.pro/):\
\_Boomi Console\_ has not yet been released or published.\
If you are interested, send me an [e-mail](https://github.com/MarkusSchmidtPro/MSPro.Boomi.Console/blob/main/doc/broken-reference/README.md), please.
{% endhint %}

***

[Copyright](/the-mspro-boomi-collection/copyright) © 2023 by Markus Schmidt. All rights reserved.


# What is ...

*Boomi Console* is

* a command line application
* that runs on Windows, Linux and MacOS.
* written in C# (.NET 10)

<div align="left"><figure><img src="/files/85JYD4ld2Rbc85l1zkl5" alt="" width="563"><figcaption><p>Windows Console (Terminal) runs BoomiConsole Command</p></figcaption></figure></div>

*Boomi Console*

* connects to [Boomi Platform API](https://developer.boomi.com/docs/APIs/PlatformAPI/APIReference/Platform_APIs_Overview#section/Introduction/Platform-API)

to

* retrieve Components, Deployments and Package data
* to save all metadata XML to your local drive
* to transform metadata, for example, into an XML, JSON, SQL profile
* to render list and reports;

{% content-ref url="/pages/-M\_-UacHMHxEJ\_VEcOXp" %}
[Commands](/boomi-console/commands)
{% endcontent-ref %}

and to

* create extensive documentation
* including process UML flow diagrams.

{% content-ref url="/pages/0V1YeGR99DRQYPAlTiA5" %}
[Use-Cases](/boomi-console/command-collection)
{% endcontent-ref %}

and, last but not least,

* BoomiConsole is extensible and you can expect more to come..


# Installation & Setup

System pre-requisites and installation

If you are new to *Boomi Console* it is recommend to **create a new&#x20;*****BoomiConsole*****&#x20;directory** and use this for all further steps.

<figure><img src="/files/kcOychZ8n3UhZ189aI8c" alt="" width="540"><figcaption></figcaption></figure>

{% content-ref url="/pages/4qWUNSOTnFAbtXgCsPlw" %}
[Download & Install](/boomi-console/installation/download-and-install)
{% endcontent-ref %}

{% hint style="info" %}

Since v5.7 Workspace Setup and Connect has been simplified. There is only one command the run from your just created and empty workspace directory:

* **%bc\_dir%\connect**

```batch
C:\BoomiConsole\MarkusS> %bc_dir%\connect
-----------------------------------------
The current directory is not a Workspace!
Do you want to 
initialize the current directory as a Boomi Console Workspace? [Y,N]?
Y
15 File(s) copied
---------------------------------------
--- Boomi Console WORKSPACE CONNECT ---
.
Enter your Boomi username (e-mail address): Markus.....
Enter your Boomi AccountID               : boomi_.....
Enter your Boomi Console API-Token        : f162.....
*** BoomiCommands v5.7.0.0 Isx64=True Build=RELEASE Start ***
*** App Stop (total time 00:00.109) ***

Execution complete.
```

{% endhint %}

{% content-ref url="/pages/072hhm327EuwRakqjQsR" %}
[Setup a Workspace](/boomi-console/installation/setup-a-workspace-and-connect)
{% endcontent-ref %}

{% content-ref url="/pages/q1Z3Fa0UwoOAnlBxyMNK" %}
[Connect Workspace](/boomi-console/installation/setup-a-workspace-and-connect/connect-your-project-1)
{% endcontent-ref %}

{% content-ref url="/pages/72Kjd56Ivfg8xFTw8kAo" %}
[Test Workspace](/boomi-console/installation/setup-a-workspace-and-connect/test-your-project)
{% endcontent-ref %}


# Download & Install

* [Download *Boomi Console*](/boomi-console/download-releases)
* **Unpack all files** to any directory on your local drive.\
  Recommended: `%UserProfile%\Documents\BoomiConsole\bin`

<figure><img src="/files/o87Ypw6f1nJzX6GSTZXz" alt=""><figcaption><p>Recommended directory to store the binaries: %UserProfile%\Documents\BoomiConsole\bin</p></figcaption></figure>

* **Run** (double-click) **`install.bat`**

<figure><img src="/files/r8FLHWU5cjyNhzAk2G6w" alt=""><figcaption><p>Run-Once: Initial setup</p></figcaption></figure>

<details>

<summary>Environment Variables</summary>

Running *install.bat* sets two environment variables which are used in later context: `BC_EXE` and `BC_DIR`. To check whether they are set properly, run **`set BC_DIR`** from any command prompt.

```
c:\> set BC_DIR
BC_DIR=C:\Users\...\AppData\Local\Programs\BoomiConsole
```

Be aware, if you run *BoomiConsole.exe* once from a command prompt, you must **close and re-open the terminal** window, to activate the changes to the environment variables.

</details>

{% content-ref url="/pages/QyxLMPG7VaDfO6O3sEYv" %}
[Boomi Account Connection](/boomi-console/installation/setup-a-workspace-and-connect/boomi-account-connection)
{% endcontent-ref %}

***


# Setup a Workspace

Setup your project Workspace and connect with a Boomi Account

To use *Boomi Console* you need a project [Workspace](/boomi-console/library/the-workspace) directory (per Boomi Account) where all the data is stored. I recommend using the *BoomiConsole* directory where you have installed the binaries and create a new directory called *`Workspace`.*

{% hint style="info" %}
If you want to connect **multiple accounts**, for example for consultants who work with several customers, it is recommended naming each workspace after the account and organising all workspaces in the same *BoomiConsole* root folder.
{% endhint %}

### Three Steps

1. **Collect information:** [Boomi Account Connection](/boomi-console/installation/setup-a-workspace-and-connect/boomi-account-connection)
2. **Open a console window** and navigate to your Workspace.
3. Initialize and connect your Workspace

{% tabs %}
{% tab title="Windows" %}
Use the `connect` batch-file to start the guided process. Use the **Console - not PowerShell!**

<div align="left" data-with-frame="true"><figure><img src="/files/Abh8YgipbRd2IxV83iiH" alt="" width="386"><figcaption></figcaption></figure></div>

{% hint style="info" %}
*Connect* is a batch file located in the Boomi Console binary directory. It will initialize the Workspace (if not yet done) and it'll guide you through the Boomi Account connection process.
{% endhint %}

* ...\Workspace> <mark style="color:$success;background-color:blue;">%bc\_dir%\connect</mark>

<figure><img src="/files/fsYTOlQyAW3YidWlEwJX" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Linux / Mac" %}
Linux or Max users must run the two steps manually:

* [Initialize Workspace](/boomi-console/installation/setup-a-workspace-and-connect/initialize-workspace)
* [Connect Workspace](/boomi-console/installation/setup-a-workspace-and-connect/connect-your-project-1)
  {% endtab %}
  {% endtabs %}

{% content-ref url="/pages/72Kjd56Ivfg8xFTw8kAo" %}
[Test Workspace](/boomi-console/installation/setup-a-workspace-and-connect/test-your-project)
{% endcontent-ref %}

<details>

<summary><mark style="color:red;">Google Drive spoiler!</mark></summary>

*<mark style="color:red;">**DO NOT USE Google Drive**</mark>*<mark style="color:red;">**&#x20;**</mark><mark style="color:red;">**to store your Workspace!**</mark>

Google Drive is not really compatible with Windows File System, and I encountered serious and strange issues. For example: I tried to create a directory and I got the message "*already exists*" and when I tried to navigate to there the message was "c*annot find directory*":

`md "g:\...\bc\Out"` -> A subdirectory or file *g:\\...\bc\Out* already exists.\
`cd "g:\...\bc\Out"` -> The system cannot find the path specified.

</details>


# Boomi Account Connection

To connect your [Workspace](/boomi-console/library/the-workspace) to a Boomi Account you must collect some information first.

1. [**Login to your Boomi Account**](https://platform.boomi.com/AtomSphere.html#build)
2. Navigate to *Settings -> User Information*

   <div align="left"><figure><img src="/files/1PAbHQqCFIKWvITmUEFw" alt="" width="525"><figcaption></figcaption></figure></div>
3. Get and **note down three parameters**:  *Username*, *Account ID* and *API-Token.*

{% tabs %}
{% tab title="Username" %}
The *Username* is the E-Mail Address you use to login into your Boomi Account.

<div align="left" data-with-frame="true"><figure><img src="/files/STzkPcEVdTNHLOYPRXyv" alt="" width="484"><figcaption></figcaption></figure></div>
{% endtab %}

{% tab title="Account ID" %}
The ID of the Boomi Account that you want to connect with the Workspace.

<div align="left" data-with-frame="true"><figure><img src="/files/mQPuJ9oL2d4FNyNahQia" alt="" width="505"><figcaption></figcaption></figure></div>

{% hint style="info" %}
Unless your are a Boomi Consultant you have only one Account.
{% endhint %}
{% endtab %}

{% tab title="API Token" %}
The *Platform API-Token* used to authenticate requests to the platform API.

<div align="left" data-with-frame="true"><figure><img src="/files/324uaYO9VnVU4jcmMQlZ" alt=""><figcaption></figcaption></figure></div>

You can consider the Token to be a password that is used for "technical" logins. I recommend naming a token after the application that uses it: *Boomi Console*. If you don't have a Token yet, create a new one - or ask your admin to do it for you!

{% hint style="info" %}
**Be aware**: Tokens cannot be revealed. Store your tokens in a safe place.
{% endhint %}
{% endtab %}
{% endtabs %}

{% content-ref url="/pages/072hhm327EuwRakqjQsR" %}
[Setup a Workspace](/boomi-console/installation/setup-a-workspace-and-connect)
{% endcontent-ref %}


# Initialize Workspace

Workspace mu

Initialize the Workspace once and copy a couple of templates into it.

```batch
xcopy "%BC_DIR%\Templates\Workspace\*.*"  .  /e /y /q /i
```

<div align="left" data-with-frame="true"><figure><img src="/files/8x41XLUvmyt0EwYXbbvJ" alt="" width="302"><figcaption></figcaption></figure></div>

Verify everything is working by running `BC` from a command-line, and you should see a list of available commands.

<figure><img src="/files/9PaP1nToczmx6xL8aClp" alt=""><figcaption></figcaption></figure>


# Connect Workspace

Manually set or change your Boomi Account connection

Run the [WORKSPACE CONNECT](/boomi-console/commands/project-configure) command in your Workspace. \ <sup>Replace the</sup> <sup></sup><sup>`<AccountID>`</sup><sup>,</sup> <sup></sup><sup>`<Username>`</sup> <sup></sup><sup>and</sup> <sup></sup><sup>`<Token>`</sup> <sup></sup><sup>placeholders.</sup>

[Boomi Account Connection](/boomi-console/installation/setup-a-workspace-and-connect/boomi-account-connection)

```batch
.\bc WORKSPACE CONNECT /u <Username> /accountId <AccountID> /t <Token>
```

<figure><img src="/files/JyEc9t6lG9YEd3spdOe3" alt=""><figcaption></figcaption></figure>

As the result, the[Workspace configuration file](/boomi-console/library/configuration-files/atomsphere.config-json) has been created and the [Secure Configuration](/boomi-console/library/configuration-files/boomiconsole.user-json) has been updated.

You are now ready to [Test Workspace](/boomi-console/installation/setup-a-workspace-and-connect/test-your-project).


# Test Workspace

Quick test everything's fine

Now, that the Workspace is connected, we do a quick test to ensure everything's working.

{% hint style="warning" %}
**Visual Studio Code**

From now on, we are going to use Visual Studio Code and its built-in console.

* [Download and install Visual Studio Code](https://code.visualstudio.com/Download)
  {% endhint %}

In your Workspace there is a `vs-code.code.workspace` file, and double-clicking this file will start Visual Studio Code.

<figure><img src="/files/rh7JNuobgBck4M2z2NZP" alt=""><figcaption><p>The BoomiConsole Workspace, opened in Visual Studio Code</p></figcaption></figure>

Let's **GET a CMOPONENT's metadata**

Go to your Boomi Repository and get the ComponentId of any Process which you want to test first:

<figure><img src="/files/LnVQEcaxdWekPm3Kyt1z" alt=""><figcaption><p>Get a Process ComponentId</p></figcaption></figure>

```batch
bc COMP GET /c ca27faab-{yourComponentId}
```

<figure><img src="/files/YOOUA7PzusfznnwtW1le" alt=""><figcaption></figcaption></figure>


# Commands

*Boomi Console* provides several Commands to execute certain actions. Each Command consists of two "verbs": **a)** the <mark style="color:blue;">**entity**</mark> and **b)** the <mark style="color:green;">**action**</mark>. For example, [<mark style="color:blue;">COMP</mark> <mark style="color:green;">GET</mark>](/boomi-console/commands/comp-components/fetch-get) is related to <mark style="color:blue;">**comp**</mark>onents (Metadata) and the action is <mark style="color:green;">**get**</mark>ting this metadata from Runtime.

Each command has a defined set of arguments, which can be divided into three categories:

* Arguments to define the source data -> [Component Resolution](/boomi-console/commands/arguments/common-arguments/command-sources)
* Arguments to control the command's action
* Optional arguments to control reporting -> [The Report Engine](/boomi-console/library/the-report-engine)

### Getting help

To **list all available commands** use `bc` without any parameter to

```
> bc
11 Commands available:
=======================================
Verb                Description
---------------------------------------
ACCOUNT INFO        Runtime API - Account Info
....
```

If you need **help for a specific command** use `bc {command} /help`

```
>bc comp get /help

Comp Get            Runtime API - GET Component Metadata (incl. all its
                    child/referenced components)
...
```


# COMP - Components

Component Metadata

`COMP` commands refer to the [Component Metadata object](https://help.boomi.com/docs/atomsphere/integration/atomsphere%20api/int-component_metadata_object_c2067cb5-bb9d-4033-adc2-d4707e26e75c/). Components are what you store in your **Boomi Repository:&#x20;*****Runtime -> Integration -> Build***.

<figure><img src="/files/TtLZYGgJ94MR5902Ghhy" alt=""><figcaption><p>Process Components in the Repository</p></figcaption></figure>

Each component has a unique `ComponentId` (which is immutable -> [How to get a Component's Id](/boomi-console/library/how-to/get-a-component-id)) and a name (which is editable and user-specific).

The COMP commands use the so called [Component Resolution](/boomi-console/commands/arguments/common-arguments/command-sources) to resolve all component ids which will be considered be the current command.


# GET

Get Component Metadata from Runtime

Get [Component Metadata](https://help.boomi.com/bundle/developer_apis/page/int-Component_object.html) from Runtime and write it to the [Out-Folder](/boomi-console/commands/arguments/common-arguments#outdir-o). OPtionally you can specify a template to render information about all components.

```batch
bc COMP GET /c 54222e4e-e9c1-490b-... -t compList.csv
```

{% content-ref url="/pages/IDKspyJTd0wqVKM1Nyyo" %}
[COMP GET Arguments](/boomi-console/commands/arguments/comp-arguments/comp-get-arguments)
{% endcontent-ref %}

The command uses a [resolved list of components](/boomi-console/commands/arguments/common-arguments/command-sources#component-resolution) and [recurses over parent(s) and children](/boomi-console/commands/arguments/common-arguments#component-trees) to:

1. store all metadata in the `<OutDir>\MetaData` folder
2. store human-readable and re-usbale Component information like SQL statements, Scripts, profiles in `<OutDir>\Components`folder
3. Optionally, [specify a template](/boomi-console/commands/arguments/common-arguments#templates) to render the list of all components.

<figure><img src="/files/WjnycHXKoFtr28qAu0By" alt=""><figcaption><p>Visual Studio Code shows Components rendered using /t compList.CSV</p></figcaption></figure>

#### Find orphaned components

*comList.CSV* reports the number of parents and children of each component. Components with 0 parents could be orphaned. For *Processes* it can be ok to have zero parents, a mapping with zero parents is simply not referenced: orphaned and subject for deletion.

#### Component Folder Structure

It is vital that you maintain a good folder structure. The COMP GET command tells you where all child and parent components are located.

If you look carefully at the image above, you will see that my process references a script in `99 - ParkingLot` folder. This was definitely not my intention.

#### Components unleashed

If you want to see your raw script, Json profiles or SQL statements, the `Components` folder is right for you.

<figure><img src="/files/KxIhkRTxXKJdzzKo9JbW" alt=""><figcaption><p>The RAW Groovy script as a file in the file-system.</p></figcaption></figure>

#### Metadata as XML files

If you want to know where you have used a document property, you may want to search all your `Metadata` XML files.


# DOC

Create Markdown documentation and process UML diagrams

Create documentation for the specified components.

```batch
bc create doc {Source}
```

{% content-ref url="/pages/UwgQlsv5NdeY5UDGw3jr" %}
[COMP DOC Arguments](/boomi-console/commands/arguments/comp-arguments/comp-doc-arguments)
{% endcontent-ref %}

## Documenting a single Component

```batch
bc COMP DOC /c {yourComponentId}
```

The simplest form of creating documentation is to document a single component. The documentation is created in the Markdown format and stored in the *Out/Doc* folder.

You can *preview Markdown* documents directly in Visual Studio Code:

<figure><img src="/files/cwbtRtjHjQI9wsGJ6iWS" alt=""><figcaption></figcaption></figure>

{% file src="/files/ZzYvwQZkWGTALR0SN0Rp" %}
An PDF example containing a process documentation (printed Markdown)
{% endfile %}

### Documenting a Packaged Component

By using the [Common Arguments](/boomi-console/commands/arguments/common-arguments#packageversion-pv) or [Common Arguments](/boomi-console/commands/arguments/common-arguments#packageid-p) arguments you can quickly document a packaged component. This will also create a nice *readMe* file for the package content.

<figure><img src="/files/j9MTQfCGa4KFsCa2fzxz" alt=""><figcaption><p>.\doc\_packageVersions\2024-07-23-msc.01m.md</p></figcaption></figure>


# SMARTCOPY

*SmartCopy* allows you to copy one or more components with great control over how to handle references and referenced (dependent) components.

Boomi copy allows you to copy a component by

1. including **all** referenced components or
2. not including any dependent component.

However, in 99% of all use-cases you want to copy a component with *some* other dependent components. This is, where SmartCopy comes into play.

#### Three main use-cases for SmartCopy

1. **Copy a single component** (like a process) and create copies of only those dependent components which are in the same folder (`/folder`). Referenced components which are 'outside' of the current folder, like Connectors or global profiles, mapping are not duplicated. Optionally you can include subfolders (`/recursive`) more..\
   `bc COMP SMARTCOPY /c bf83e604-.. /folder /recursive`
2. Specify a **list of source components** to create a copy of each, while updating all references to the new (copied) components and retaining (global) references to the components that were not copied. With other word, a set of specified components is copied and all links inside of this set is kept intact by point to the new copies.\
   `bc COMP SMARTCOPY /c bf83e604-.., afb456a-...`
3. You can use component templates with placeholders to easily create new component (sets) based on a component template. This is extremely helpful, if you have a fixed pattern to create, for example, API Listener Components. See[Component Templates](/boomi-console/command-collection/component-templates)

### Smart Copy Explained

A quick example why Smart Copy is smart and how it differs from Boomi's copy functionality. The following example is probably not a real world use-case but it explains the *Smart Copy* functionality quite good, using a very simple example.

Imagine you have a Map component like this, with the *FlatFile Empty* profile you all know, which is a shared and global profile. No second copy of this profile must exist.

<figure><img src="/files/xKVJy7jQOekZEp6xyMO8" alt=""><figcaption></figcaption></figure>

A look behind the scenes shows us that *MyMap* references (depends on) *j.Profile\_B* and *flatFile Empty*.

<figure><img src="/files/PyLUTFMXtm2Tpy0zu7HA" alt=""><figcaption></figcaption></figure>

## Built-In "Copy Component"

<div align="left"><figure><img src="/files/Nit5jw7bsdWJoTtudweD" alt="" width="344"><figcaption></figcaption></figure></div>

If you chose the built-in copy component function, you have two options: copy with or without *all* dependent components. Neither of the two options is what we want. We would either get a new *MyMap* component that references the two existing profiles (no dependencies), or we would get a copy of all components, incl. *flatfileEmpty.* In both cases we must manually edit the Map and fix the referenced components. This takes time and it is error prone. Especially when the copy process refers to more complex situations than a simple Map.

### Smart Copy

If we chose *Smart Copy* we name the two components we want to copy: *MyMap* and *j.Profile\_B*, leaving out *flatfile.Empty SHARED.*

```
bc COMP SmartCopy /c bf83e604-..,3ba38b6a-..
```

What we get is a new *MyMap 3* which references the new *j.Profile\_B 5* but it kept the reference to the shared *flatfile* profile. This is smart!

<figure><img src="/files/hpiZhXKa1tqeppu8T2q2" alt=""><figcaption></figcaption></figure>


# Smart Copy Example

Imagine you created an API endpoint listener `GET /Contact` and you want to copy this functionality to use it in another endpoint.

The API Endpoint looks pretty simple. But when you look at the explorer pane you'll see the referenced components which include one *shared* component (the REST Client operation) and a *global* component, which is not even visible in this view: the REST Connector Component `REST # MSPro.Services`.

With Boomi's copy feature, and no matter what you decide, copy with or without dependent components, you will end up in a little "mess" that requires a lot of clean-up in the created process.

<figure><img src="/files/lpUfIz3u5zDJFw7aYSOB" alt=""><figcaption></figcaption></figure>

If you chose *Smart Copy* ...

1. you start to collect the Ids of those components, you want to copy.\ <sup>In the sample above: the four green components.</sup>
2. Run the `COMP SmartCopy` command with the four ids - your template components:\
   `bc comp SmartCopy /c d27f-..,8d82-..,aaeb..,d3e9..`

As the result, you get a smart copy of the template components. You see the result in the picture:

<figure><img src="/files/Yw2ungPLriOtvgxPsoXc" alt=""><figcaption></figcaption></figure>

* Only the four green source components have been copied.
* *API Contract 3* references the copied *getContract 2*
  * because it was part of the source components
* If you opened the *getContract 2* operation you will see that\
  it references the new profiles *j.GetContact.REQ 2* and *j.GetContact.RES 2*.
* API Contract 3 still references the REST connector and operation\
  as it was used in the original (source) component
  * because these components did not participate in the Smart Copy.


# CODE - SQL and Scripts

Manage your SQL-Statements and Script locally

`Code Push` and `Code Pull` allow you to synchronize all your *Scripts* and *Database v1 SQL* statements with a folder on your local hard drive. This not only allows you to edit Scripts and SQL Statements with your preferred editor, you can also put your code under version control and your can directly test and develop your scripts using ScriptEase.

<figure><img src="/files/ynjHVgsuEOZ2aboq86gj" alt=""><figcaption><p>A Groovy Script in Visual Studio code, all Script on the local drive, respecting the folder structure in Boomi</p></figcaption></figure>


# CODE PULL

```bash
bc CODE PULL
```

Pulls all Scripts and SQL Statements from your current account into your workspace `Code` directory, while maintaining the folder structure.

<div align="left"><figure><img src="/files/ym0g0rnRB4w0AGSeRkRG" alt="" width="264"><figcaption></figcaption></figure></div>

### Optional Parameters

<details>

<summary>/ComponentId, /c</summary>

Pull one or more specified component only.

</details>

<details>

<summary>/CodeDirectory, /wd /cd /d /out</summary>

Default: `Code`

Specify the folder where to put the code. The directory is relative to the current Workspace, or absolute.

</details>

<details>

<summary>/Folders, /f /base</summary>

Specify one or more Boomi folder names - semicolon separated list, from where to pull the code. The folder comparison is: full folder path starts with "specified folder". If you specify `/f Com` a ***Com**mon* folder is considered as well as a **Com**pany folder. Subfolders are always included.

The Full Folder Path is compared! If you have a folder, like: `script\98 - Sandbox` you should specify the path from the beginning `/f "script\98 - Sandbox"` - incl. quotes because of whitespaces.   &#x20;

</details>


# CODE PUSH

<figure><img src="/files/xEqXeWmGegnMnaBeZKa1" alt=""><figcaption></figcaption></figure>

There is no need to specify a file or directory because `Push` will automatically recognize changes, and push only changed files.

```bash
V:\Boomi.Spaces\MSPro\dev\BC>bc code push
*** BoomiCommands v5.9.0.0 Isx64=True Build=RELEASE Start ***
Starting App...
--- CODE.PUSH ---
Recognized 1 local changes.
Recognized 1 component(s) for pushing...
Pushing 22d40bc9-a8e9-465c-975c-1d99c~6 'psg.PGP_Encrypt' to repository ..
Saving 22d40bc9-a8e9-465c-975c-1d99c~7 to script\98 - Sandbox\
--- DONE! ---

*** App Stop (total time 00:02.185) ***
```


# Conflicts

A conflict occurs when a file has been change remotely (in the Boomi repository) and / or locally in the file system.

`Pull` and `Push` command will recognize conflicts and behave as follows.

```bash
--- CODE.PUSH ---
Recognized 1 local changes.
Recognized 1 component(s) for pushing...

Conflict for 22d40bc9-a8e9-465c-975c-1d9430729b9c 'psg.PGP_Encrypt': 
  Local edited version is based on v7 and cannot be pushed 
  because remote (current) version has also been changed to v8
  
Saving 22d40bc9-a8e9-465c-975c-1d9430729b9c~7 to script\98 - Sandbox
Saving 22d40bc9-a8e9-465c-975c-1d9430729b9c~8 to script\98 - Sandbox
```

As the result you will have three local files:

<figure><img src="/files/T8OsmQQLEnIdZWpH3yc1" alt=""><figcaption></figcaption></figure>

1. `fileXY.groovy` is the file your edited locally and that you want to push to Boomi.
2. `fileXY~7.groovy` (the one with the lower version) is the origin of script that was edited locally.&#x20;
3. `fileXY-8.groovy` (the one with the high version number) is the just pulled and current script as it exists in Boomi.

#### Resolution

To **discard your local changes**  delete the local `fileXY.groocy` and run a `code pull` to pull the latest version into your local Workspace. Optionally, you can specify  `/c <componentId>` to pull only this particular component.

To **overwrite the remote changes**, run a `code push /force /c <componentId>`. Specifying the component Id is very much recommended. Otherwise all your local changes are forced into Boomi.&#x20;


# PACK - Packaged Components

Work with Packaged Components

PACK Commands work with [Packaged Components or Package Versions](/boomi-console/help-text/component-package-vs-packaged-component).

The COMP Commands start with a *ComponentId* and traverse up and down a [Component Hierarchy](/boomi-console/help-text/component-hierarchy). Children references do not include a version so that always the current version of a child component will be resolved.

In contrast, Packaged Components contain a manifest that exactly describes which (child) components are part of the package including their referenced version.


# PACK GET

Get Packaged Components Metadata

This commands retrieves a packaged component's content: all components contained in the package, and writes all components metadata to the Workspace.

```batch
bc PACK GET /p 1f897a03-21a7-4107-8b17-...
```

{% content-ref url="/pages/Gm7KHfb2HZuGHDgp5dh4" %}
[PACK Arguments](/boomi-console/commands/arguments/pack-arguments)
{% endcontent-ref %}

<figure><img src="/files/75mRRjbGhIMeDr2kt7ph" alt=""><figcaption><p>A Packaged Component's manifest as JSON</p></figcaption></figure>


# PACK DOC

Document Packaged Components

This commands retrieves a packaged component's content: all components contained in the package, and creates a Markdown documentation for that package.

```batch
bc PACK DOC /v 2024-10-14-msc.09
```

{% content-ref url="/pages/Gm7KHfb2HZuGHDgp5dh4" %}
[PACK Arguments](/boomi-console/commands/arguments/pack-arguments)
{% endcontent-ref %}

The documentation is stored in the `Doc` folder, organized by Package Version and Package Id:

<figure><img src="/files/bnxkRaSLYl2fk9JNovmr" alt=""><figcaption><p>Packaged Component Documentation for package version 2024-10-14-msc.09<br>containing three packaged components</p></figcaption></figure>

There is a manifest Markdown for each Packaged Component:

<figure><img src="/files/0tObAfFN968exRI07te6" alt=""><figcaption></figcaption></figure>


# DEPLOY - Deployments

Manage your environments and execute deployments

Deployment Commands refer to deployed (packaged) components.

<figure><img src="/files/P04vfGk0MKhyXdTfefgR" alt="" width="563"><figcaption><p>Deployments on Runtime</p></figcaption></figure>

### Packaged Components and Package Versions

Before you deploy a component you must package that component. Only packaged components can be deployed.

* Component Id + Version <- Package Id
  * Package Id + Environment <- Deployment Id
* Package Version <- \[ Package Id 1, Package Id 2, ... ]

#### Component Types

The following component types can be packaged and deployed:

* process
* webservice
* webservice.external
* flowservice
* processroute
* tpgroup
* certificate
* certificate.pgp
* customlibrary


# GET - Deployments and Packages

Get component deployment information

```batch
bc DEPLOY GET /env=Cloud;Local /t=deployedPackages.csv
```

This commands queries all deployed packages for the given component(s) from the provided environments.

{% content-ref url="/pages/nnub0RQehGzfu57DULUf" %}
[DEPLOY GET Arguments](/boomi-console/commands/arguments/deploy-arguments/deploy-get-arguments)
{% endcontent-ref %}

If no environment is specified, all environments are considered which are configured in your[Workspace configuration file](/boomi-console/library/configuration-files/atomsphere.config-json).

If you specify a template - I recommend using `deployOverview.CSV` - the list of deployed components is rendered using a [Deployed Packages DataSet](/boomi-console/library/the-report-engine/the-render-dataset/deploy-dataset).

<figure><img src="/files/PjUkiSpswDL3h4Q6h8my" alt=""><figcaption><p>Deployment Overview for example: BC <code>DEPLOY GET /c 54222e4e-e9c1 -t deployOverview.csv</code></p></figcaption></figure>


# EXEC - Deploy components

Deploy or promote your components

```batch
bc DEPLOY EXEC/c <ComponentID> /dstEnv=01-DEV
```

Deploy or promote your components to an [environment](https://github.com/SchmidteServices/Boomi.Commands/blob/dev/doc/commands/deploy/deploy-info/broken-reference/README.md).

{% content-ref url="/pages/s3PPaHS4lClCDXA2jNBL" %}
[DEPLOY EXEC Arguments](/boomi-console/commands/arguments/deploy-arguments/deploy-exec-arguments)
{% endcontent-ref %}

{% hint style="info" %}
**Deploy or Promote**

A **Deployment** takes place\
when a component is **packaged and deployed**

* from Repository to an environment (usually to DEV).

We call it a **Promotion** when

* a packaged component is 'deployed'\
  from one Environment to another.

Typically, you deploy from Repository to `DEV` environment\
and you promote your packaged components from `DEV` to `TEST`.
{% endhint %}

To perform a deployment, you need to specify one or more component(s) which will be packaged first, before it is deployed to the destination environment.

Optionally, you can specify a `/DeploymentNote` and or a `/PackagedComponentNote`.

You cannot yet specify a version because this is set automatically to `{Date}-{User}.{seqNo:2}`.

### Deployment

Each component that is [resolved using the command-line arguments](/boomi-console/commands/arguments/common-arguments#componentsources) a new packaged component is created. All packaged components in a single deployment get the same version number.

<figure><img src="https://github.com/MarkusSchmidtPro/MSPro.Boomi.Console/blob/main/doc/commands/deploy/deploy-info/broken-reference" alt=""><figcaption><p>Three (packaged) components in one deployment - with the same version number</p></figcaption></figure>

### Promotion

A promotion copies deployed (packaged) component(s) from one environment `/SrcEnv` to another `/DstEnv`. To execute a promotion you refer to the component Ids (not the packaged component ids). *Boomi Console* automatically gets the required packaged component ids from the source environment to copy them to the target.

### Using Sets

The real power of this command comes with the [`/set`](/boomi-console/library/packages) option. This allows you deploy / promote many components (a Component Package) in a single run! This will save you a lot of time and it makes your deployments reproducible!

1. [Deploy a Component](/boomi-console/commands/deploy/deploy-info/deployment-from-repos) from Repository to an Environment
2. [Promote a component ](/boomi-console/commands/deploy/deploy-info/promotion-to-env)from one Environment to the next

Please not,ice, the `DEPLOY EXEC` command refers to the [Environments ](https://github.com/SchmidteServices/Boomi.Commands/blob/dev/doc/commands/deploy/deploy-info/broken-reference/README.md)you have specified in your [project configuration](https://github.com/MarkusSchmidtPro/MSPro.Boomi.Console/blob/main/doc/commands/deploy/deploy-info/broken-reference/README.md). All deployments or promotions are logged in the `Logs` directory on a daily basis for later reference.

![](/files/JDoJbrKBaRhB5kQ8jqjn)

After each deployment or promotion you may use `DEPLOY INFO` to document your deployment state for later evidence.

```
bc deploy info --componentid <YourCompId> 
```

![](/files/gB0O6MoLQz7gCwXUDVVO)


# Deployment from Repos

Deploy a component (or Component Package)

To package and **deploy** a component from repository to any environment specify the target (`/DstEnv`) environment, only, and **omit the `/SrcEnv` option** - source is always the repository.

{% hint style="success" %}
The `DEPLOY EXEC` command will automatically and always create a version for your deployed component:

`yyyy-MM-dd-<UserIdent>.<YourSeqNo:00>`

`SeqNo` will be calculated based on your number of deployments from today.\
The `UserIdent`comes from your [user configuration](https://github.com/MarkusSchmidtPro/MSPro.Boomi.Console/blob/main/doc/commands/deploy/deploy-info/broken-reference/README.md).
{% endhint %}

```
bc deploy exec -DstEnv 01-DEV 
  {/c <ComponentID> | /p <ComponentPackageFileName>} 
  -DeploymentNote "This is my deplyoment" 
  -PackagedComponentNote "This is a package note"
```

<figure><img src="/files/1H1uJ2CVj0y47he1iFfk" alt=""><figcaption><p>Deployment History</p></figcaption></figure>

<figure><img src="/files/B2BrGb0KrHLqk3CNEAQ3" alt=""><figcaption><p>Packaged Components</p></figcaption></figure>

If you use [Component Set](/boomi-console/library/packages) you can pefectly see that all components within a package are packaged and deplyoed using the same (Component) Package version:

<figure><img src="/files/E6u0f27eirG4e9m732Io" alt=""><figcaption><p>Two components in a Component Package, using Component Package deployments</p></figcaption></figure>


# Promotion to Env

Promoting a Component (or Component Package) to the next environment

To **promote** a component from any source environment to any number of destination environments, using the `/SrcEnv` and `/DstEnv` options. You can specify any number of destination environments in a ';' separated list, to promote components to multiple environments in a single run.

```batch
bc deploy exec --componentid <YourCompId> 
  {/c <ComponentID> | /p <ComponentPackageFileName>} 
  /DstEnv 02-Test;03-PreProd
  /DeploymentNote "DEV Test Success"
```

Check your Deployments to see the deployment from Repos to 01-DEV and then the Promotion with the same version number but a different comment.

![](/files/pNFoaNAkizefmNLl6EzT)


# DELETE - Undeploy Components

Delete a deployment from an environment

Delete one or more deployment(s) from an environment -> **undeploy!**

{% content-ref url="/pages/6n16n9xlHu8paKEsqkug" %}
[DEPLOY DELETE Arguments](/boomi-console/commands/arguments/deploy-arguments/deploy-delete-arguments)
{% endcontent-ref %}


# WORKSPACE CONNECT

Connect your Workspace to an Runtime account

```batch
bc Workspace Connect /accountId <AccountID> /u <Username> /t <Token>
```

To **update you user credentials**, stored in your [user configuration](/boomi-console/library/configuration-files/boomiconsole.user-json), run this command from your existing workspace. This is required, because your credentials are encrypted and this is the only way of updating it.

{% content-ref url="/pages/q1Z3Fa0UwoOAnlBxyMNK" %}
[Connect Workspace](/boomi-console/installation/setup-a-workspace-and-connect/connect-your-project-1)
{% endcontent-ref %}


# ACCOUNT INFO

Print information about the Boomi Account that is used in the current project workspace.

```batch
> bc account info

Account Name: Markus.Schmidt.Boomi
Account ID  : boomi_markxxxxxxxxxxx
Date Created: 01.07.2020 13:18:15
```


# Arguments


# Common Arguments

A brief description of all arguments

Common arguments which can be used with many commands.

{% hint style="info" %}
**Get supported arguments**

If you are not sure which arguments are supported by a command, ask for help using the -? option: `bc comp get -?` lists all arguments supported by the "COMP GET" command, for example.
{% endhint %}

## Component Source Arguments

For more details how these component parameters work see [Component Resolution](/boomi-console/commands/arguments/common-arguments/command-sources).

<details>

<summary>/ComponentId, /c</summary>

The component Id(s) for the current command.

To get the current version of a component, specify the component id only `53e9908b-8c82-4b64-...`

If you want to retrieve a specific version you must add the `~<VersionNo>`, for example: `53e9908b-8c82-4b64~12` to get version 12 of that component.

[Allow Multi](/boomi-console/commands/arguments/common-arguments/allow-multi)

</details>

<details>

<summary>/Set, /s</summary>

[The Set Argument in Detail](/boomi-console/commands/arguments/common-arguments/components-set)

</details>

<details>

<summary>/QueryFilter, /q</summary>

Specify a file (relative to the current Workspace) that contains a Boomi Query Filter -> [Query Filter](/boomi-console/commands/arguments/common-arguments/query-files)

</details>

<details>

<summary>/ExcludePath, /x</summary>

Exclude one or more folder paths from querying components. If a component is located in **any folder that starts with an exlusion tag**, this component is excluded.

` bc comp get`` `` `**`/c`**` ``e4bc4a53-...`` `**`/ExcludePath`**`=Temp;Sandbox`

[Allow Multi](/boomi-console/commands/arguments/common-arguments/allow-multi)

</details>

## Directories

<details>

<summary>/outDir, o</summary>

Specify an absolute or workspace relative path where all outputs go to.

Default: `./Out` or the the name of a package, if specified. Package output is stored in the package folder.

[Target Path Resolution](/boomi-console/help-text/target-path-resolution)

</details>

<details>

<summary>/workDir, wd</summary>

Specify a workspace directory for the current execution.

This directory is used a the base for `/OutDir`, `/LogDir` and `/DocDir`, which are all relative to current workDir.

</details>

## Templates

<details>

<summary>/TemplateDir, /td</summary>

A directory relative to the current workspace where BoomiConsole will look for workspace-specific, user-defined Freemarker templates. If provided, this directory has the highest priority when resolving templates.

2. Application Templates Path \[DEFAULT]\
   `%BIN_DIR%\Templates\Freemarker`

</details>


# The Set Argument in Detail

Components Set related arguments

## /Set, /s

Specify a **Components Set Name** used to [resolve component Id](/boomi-console/commands/arguments/common-arguments/command-sources)s.

The Components Set file is resolved as follows: `{`<mark style="color:green;">`SetDir`</mark>`}{SetName}\cSet.JsonC`

The [output folder](/boomi-console/commands/arguments/common-arguments#outdir-o) is set relative to the folder where the `cSet.JsonC` is located.

### Example

`COMP DOC /s DEMO_Service`

Create a documentation (incl. readme.md) for a Components Set.

<figure><img src="/files/2Dfg8posFf9wmzUn8EPN" alt=""><figcaption><p>DEMO_Service Component Set documentation with readme.md in the out folder</p></figcaption></figure>

### More arguments

<details>

<summary>/<mark style="color:green;">SetDir</mark></summary>

Default = `Packages`

The directory where to look for package files (e.g. iPack.jsonc). Unless you specify an absolute path, the directory is relative to /ProjectDir. The directory must exist, it is not created automatically!

</details>

<details>

<summary>PackageLibDir</summary>

Default = `Lib`,`Lib\Shared,Work`

Support Multiple

Specify a list of relative search folders (relative to /PackageDir) where to look for packages. Use this to keep your packages in pre-defined folders.

If you store, for example, you packages in the `Work`folder in the /PackageDir packages are resolved by their name: `/p FWK` (the folder name is enough because the package file has the default name: `iPack.jsonc`).

![](https://github.com/MarkusSchmidtPro/MSPro.Boomi.Console/blob/main/doc/commands/arguments/common-arguments/broken-reference)

</details>


# Query Filter

Just another option to specify ComponentIds

The `/QueryFilter` is just antoher option to [specify component IDs](/boomi-console/commands/arguments/common-arguments/command-sources) for your commands. You can specify [Runtime API Query Filters](https://help.boomi.com/bundle/developer_apis/page/r-atm-Query_filters.html) as the source for any command.

See also [Component Metadata Filter properties](https://help.boomi.com/bundle/developer_apis/page/int-Component_metadata_object.html).

```
bc COMP GET -QueryFilter Query\qDBProfiles.json
```

```json
{
  "QueryFilter": {
    "expression": {
      "operator": "and",
      "nestedExpression": [
        {
          "operator": "or",
          "nestedExpression": [
            { "property": "type",   "operator": "EQUALS",   "argument": [ "profile.db"   ] }
          ]
        },
        { "operator": "GREATER_THAN", "property": "modifiedDate",   "argument": ["{StartDateUtc}"]},
        { "operator": "EQUALS",       "property": "currentVersion", "argument": ["true" ]},
        { "operator": "EQUALS",       "property": "deleted",        "argument": ["false" ]}
      ]
    }}
}
```

*Boomi Console* will run the query against the [Component Metadata API](https://help.boomi.com/bundle/developer_apis/page/int-Component_Metadata_API_example_requests.html) using `ComponentMetadata/query`. The returned components will be used as the input for your command. If you run `COMP GET -QueryFilter <yourFilter>`, for example, the query is executed and the returned list of components will then be retrieved from API.

{% hint style="info" %}
Please notice, the `QueryFilter` functionality automatically handles the `QueryToken` so that the number of returned components is *not* limited to one page.
{% endhint %}

### Query Filter File

Query Filters are specified as a JSON file. I recommend using the `Query` folder to store the queries there. I decided to use JSON over XML because it is much more readable. There is no option to provide XML queries.

## Example

`bc comp get /q query\qDBProfiles.json /outdir=query\DBProfiles`

Specify `/OutDir` to redirect the output to the specified directory instead of writing it to the default `Workspace\Out` directory.

Once you have got the Metadata XML for profiles specified in the QueryFilter, you may want to see their natice specification:

`bc create profile /outdir=query\DBProfiles`

<figure><img src="/files/PF1sHrTeLlMqvYkeelTg" alt=""><figcaption><p>query\DBProfiles - MetadatXML and the native DB profile: SQL Scripts</p></figcaption></figure>


# Start date or time span

Predefined Parameters

There are two predefined parameters which you can \[optionally] specify in the command-line. Both parameters are used as a **placeholder in QueryFilter** files:

<details>

<summary>/TimeSpanDays</summary>

Boomi Command resolves the `TimeSpanDays` into a `StartDateUtc` by subtracting the number of day from today. If today was 31st of October, TimeSpanDays=7 will lead to /StartDateUtc=24th of October (minus seven days).

Default=30

</details>

<details>

<summary>/StartDateUtc</summary>

Specify a date or datetime (UTC).

See also [https://github.com/MarkusSchmidtPro/MSPro.Boomi.Console/blob/main/doc/commands/arguments/common-arguments/query-files/broken-reference/README.md](https://github.com/MarkusSchmidtPro/MSPro.Boomi.Console/blob/main/doc/commands/arguments/common-arguments/query-files/broken-reference/README.md "mention")

</details>

<figure><img src="https://github.com/MarkusSchmidtPro/MSPro.Boomi.Console/blob/main/doc/commands/arguments/common-arguments/query-files/broken-reference" alt=""><figcaption></figcaption></figure>

```
> .\bc COMP GET /q .\Query\qSince.json /TimeSpanDays=7
```

The result is an empty `Components` directory because there was no component modified in the past 7 days!


# Arguments in a file

Collect often used parameters in a file.

You can save parameters in a file and use the filename in your command-line. Even if this is not retricted to `/excludePath -` you can specify any parameter in a file - excluding folder paths is a nice and useful example how to make use of parameter files.

For example, imagine you have a file called `exludeFolders.txt` in your workspace.

```
/excludePath="Boomi_MarkusSchmidt/#FlowServices"
/excludePath="Boomi_MarkusSchmidt/05-Error Handling/Test"
/excludePath="Boomi_MarkusSchmidt/API"
```

<figure><img src="/files/JUD1M35RxNKOMbr396vu" alt=""><figcaption></figcaption></figure>

You can then specify this file as a parameter using the **@** tag:

` bc comp get`` `` `**`/c`**` ``e4bc4a53-e338...`` `**`@excludeFolders.txt`**

All information in the file will be used in the command-lien as it was specified directly.




---

[Next Page](/llms-full.txt/1)

