#Groovy

How to obtain the user or possible users in charge of performing a task?

How can I obtain the user or possible users in charge of performing the task called Step2 through a Groovy script? (See attached image)

Mi-Diagrama1-0.png

How to fix this error "Groovy: unexpected token:"?

How to fix this error "Groovy: unexpected token:"? Please let me know how to fix this error. I can't deploy my tutorial claim management tutorial due to this error.

How can I dynamically extract variables into an external Groovy script?

I have a quite large project, where almost all tasks have the same connector applied to them. I've been trying to find a way to move the core functionality of these connector (which is a Groovy script) into a separate Groovy Script file so if I had to change something, I would only have to change the external script file instead of updating each connector one by one for hundreds of tasks. But there is just one problem: I can't for the love of God extract the variables in a dynamic way.

Number of pending tasks of a user

Hi,

I'm trying to create a process where a user can specify a number of pending task and days so he receives a notification after that number of days while he has X number of tasks.

For that I'm trying to get the number of pending tasks of the user with getNumberOfPendingHumanTaskInstances(userID) where userID is the ID of the user. I'm trying to save the resulting long in a Process Variable but it's throwing this error and I'm not sure what's up:

Using variables to make a dynamic “connectors out” script

I'd like some help to solve what is most definitely a basic problem (being a beginner, I couldn't find the solution myself or by browsing the internet).

My goal is to make an API call (to an external API) using variables defined in earlier steps of a process (meaning that each form should lead to a different API call). I know for sure the API is working as intended. I thought of something looking like that in my "connectors out":

Live update of Groovy scripts created globally

Hello,

It's possible via the Studio to create global groovy scripts and use them in the processes.

Each time you create a bar from the process that uses one of these scripts, a jar "groovyscripts.jar" is generated in the bar classpath, and when you deploy the bar, this jar is then stored in the dependency table and mapped to the process through the dependencymapping table.

The question is, how to live update these scripts?

Updating the database directly is a bad practice, are there any other cleaner options?

Thanks in advance,

Groovy source in an external file

Hi,

is it possible to store the source of Groovy Script ( used in Operations or Connector ) in an external file and the simply including with a reference , so that I can mantain a single file for function called in different task/process ?

Thanks

Alberto

Get user assigned to a task

hi all,

how can I get user assigned to a task with script groovy,

I want to get user to send an email to him, that his is assigned to a task,

i use email connector.

How can I do that with script groovy,

Thanks in advance

How do you get a java runtime environment variable

In my process I have a task with a groovy script that needs a condition based on the Java runtime environment variables.

ie. -Denvironment=production vs. -Denvironment=development

How can I access this in my Groovy script?

issue with rest-get connector when status is 204 or 404 or... (empty body)

Hi,

We have a process where we are calling a web service with a GET method.

When the response is 204, or 404 and the body is empty, it breaks with an exception in the script. It seems to be in any cases when we are importing the bodyAsObject connector output in a script.

we get this stacktrace:

Notifications