Connector ReleaseTask not working. Please help!!

1
0
-1

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();

if(tsk1_backPortal==true){
processApi(userTaskId)
}
else if(tsk2_confBoolean==false){
processApi(userTaskId)
processApi(usertaskCad)
}
//
Error:
groovy.lang.MissingMethodException: No signature of method: org.bonitasoft.engine.api.impl.APIAccessorImpl.releaseUserTask() is applicable for argument types:

Thank you, im a newbie in bonita and programming. But im trying hard to fix the problem.... thanks before hand

Regrats, Peter Grant.

1 answer

1
+1
-1
This one is the BEST answer!

you use releaseUserTask this way:

releaseUserTask(long userTaskId)

you don't have the userTaskId

regards
Seán

PS: If this reply answers your question, please mark as resolved.

Comments

Submitted by phenant on Mon, 05/30/2016 - 19:41

I thought that userTaskId was "taskAssigneeId" from "Provided Variables".... well, the userTaskId its a Library variable or comes from a method? Its only acessible in task boundary? i need to instance him for a Service Task use him? I searched the Process Instance and ProcessRuntimeAPI and how to get userTaskId and i can't find....
Regards
Pedro Grant.
PS: Thanks for remember me this Reply System from this forum.

Submitted by phenant on Mon, 05/30/2016 - 20:00

what i need is a simple "Task Shelve" of a Library, when a user, after seeing what about inside, decides if wanna do it or not in two distincts momments, when he look the task content and the registration data input.

Submitted by phenant on Mon, 05/30/2016 - 20:18

I found it... LightTaskInstance.getTaskUser. but returns a user, not some ID
.

Notifications