Groovy

Connector ReleaseTask not working. Please help!!

I need to release a task after the user decline for doing in two tasks (Task preview and Task register) what converges into a Service Task with this connector.
The "if" only is a filter who decline one of those tasks
userTaskId and userTaskId is the taskAssigneeId from "ProvidedVariables" each operation each Human task from diagram.

//Connector code
import org.bonitasoft.engine.api.ProcessAPI;

ProcessAPI processApi = apiAccessor.releaseUserTask();

Handle document list (delete / add) with 7.2

Hello

I have a process with a document list. The document list is created on the instantiaction form.

In one of the human tasks a user should be able to view / add / delete his documents. I first changed formInput to a Javascript expression to get the documents from the context (and other REST API variables):

return {
    "marchePublicRequestInput": $data.marchePublicRequest,
    "newStatus": "resend",
    "piecesJointesInput": $data.context.piecesJointes_ref
}

I also have an empty JSON object newDocuments

How can i retrieve the user id using Groovy Script?

Hi,
how i can to retrieve the user id using mysql query with groovy script into connector ,and save the result in a java.lang.long data type variable , because then i want to put this variable in a actor filter from Human Task, and assign this user to this Human Task.

Regards

Groovy script that count the number of lines in a files in my process

Hi everyone ,

im trying to count the number of lines in a document in my process . My script is :
//////////////////////////////////////////////////////////////////////////////////
def lines = 0
doc_Integrateur_Enseignes_CSV.eachLine {
lines++
}

////////////////////////////////////////////////////////////////////////////////

frederic.krebs
Category: 

Created on Bonita BPM version : 6.3.3

Objectives: Execute an external groovy script

You can edit the script without recompiling neither redeploying the process on the server * Use as a form widget connector, it allows you to edit the script and refresh the screen to see the result * Use as a Form transiant data connector, it allows you to edit the script and refresh the screen to see the result * Use as an activity connector, it allows you to edit the script, restart a new process instance and see the changes

Groovy - Error while communicating with the engine.

Hi there,

I have a java program that works perfectly with postgres driver 9.2, and it also works in my groovy scripts except one.

Here is my code:

Basically I am trying to upload the document d1 to postgres as a byte[]. This works in java but I cannot get it to work in groovy, which it should.

Any ideas? Thanks in advance. Seán

Convert Double to String Groovy

Please i need your help, on a Groovy script i need to concat a Double value to an string as you can see on the next line of code:

Can someone explain the rational for New Groovy 1.8? ASync vs Sync

Hi there,

just looking at Bonita 6.4.0 and need to understand something.

1) Why are we still on Groovy 1.8 as Groovy 2.3 has been on General Release since May 2014?

2) What is Groovy 1.8 Depreciated in relation to Groovy 1.8? If no-one has seen this have a look at Connectors, Add A Connector->Script, there are two 1.8s.

3) How does the use of Groovy 1.8 affect transactions? It states:

groovy : org.bonitasoft.engine not found ?

hi,

i get error when i try to import org.bonitasoft.engine..... in groovy

do you no why ?

thank you

QRCode

I'm trying to generate a QRCode (in email , png file , any method is accepted), but I'm not able to get it working. I'm using Bonita Community 6.3.9.

importing QRCode connector fails. then I'm trying with the following groovy script

Notifications