Why does Bonita 7.0.2 stop generating the groovyscripts.jar?

I have a following problem. I have about 200 processes and some 100 groovy scripts. Because the GroovyScript editor in BonitaStudio sucks, I am editing them in a different tool. From time to time (when changing a library for example) I just find/replace in the groovy scripts and proc files. But from some unknown reason, after these changes, when I build a BAR file of a process, the classpath directory does not contain the groovyscripts.jar anymore and thus the processes fail to run.

How can I browse a JSON with Groovy ? How to use bodyAsObject ?


I have JSON data like :
"StartDate": "2018-08-30T00:00:00",
"EndDate": "2018-09-07T00:00:00"
"StartDate": "2018-06-30T00:00:00",
"EndDate": "2018-10-07T00:00:00"

I used a connector REST GET but I only got the full API so I use bodyAsString.split() to get the StartDate in a variable or the Title in an other variable.
But how can I use bodyAsObject to get the list of all StartDates and the list of all Titles ?

Thank You

Get java.io.File from attached document


How can I convert an attached document to a standard Java File type in a Groovy Script Connector?

Thanks in advance.

Setting BDM in script connector


How would one normally update the value of a BDM Business Variable within a groovy script connector?

I've tried:
myBusinessVariable.value = "";


but neither seem to work.
Unfortunately I need to update 50+ variables like this, so using Operations is going to take a while to do, especially since each variable is going to need some processing done before being set. Ideally I want to be able to do this in a single script connector.

Task List Bonita Studio

Is there any way to get a list of the active tasks for a specific case in the bonita studio, through groovy?. I know there are api at the forms, but this form would not help me for what I need.
I've been searching among the groovy methods but I do not see any of what I need, I only see mostly to get user information.

Any idea about this? Thanks in advance.



Getting the latest user task happened in a process

Hi all,
In a process with multiple lanes/ users, we have throw/ catch links that end to a service task that sends a mail message to admins that something went wrong.
In this message, at 5.9x, we added the username of the latest Task that had been executed from the list:

At 7.5 how can we do that?

Functions like
apiAccessor.getProcessAPI().getLastStateHumanTaskInstance() require the taskName, which in our case, it is not know.

thanks in advance.

Get contract contents in a groovy script connector

Is it possible to get the contents of a contract in a groovy script? I created in my pool a contract that in UI Designer is an input field, I can get the contents of this contract in a groovy script?