Hello,I tried with this script :
“import org.bonitasoft.engine.bpm.flownode.ActivityInstance;
ActivityInstance activityInstance=apiAccessor.getProcessAPI().getActivityInstance(activityInstanceId);
return activityInstance.getId();”
But it doesn’t word and also I have another problem in the return of the script “Incompatible types between
demandeConge”<=this is the BDM Object"" and expression result" in the output opertions.
regards
Yassine
The BDM variable should be of type Long. And you don’t need to write all that code in the ‘Connector In’ groovy script. activityInstanceId is a provided variable. You just have to select it from the dropdown that says ‘Select a provided variable’. The script is just two words “return activityInstanceId” and return type should be Long.
Thank you so much we did it .
In my application i have 2 level of validation exactly in the second level I have a problem. it works in Bonita portal but in the application page I have this “{ “exception”: “class org.bonitasoft.engine.bpm.flownode.FlowNodeExecutionException”, “message”: “USERNAME=mickael.leno | org.bonitasoft.engine.core.process.instance.api.exceptions.SActivityStateExecutionException: The activity is not yet assigned, unable to execute it” }” in the failed response value.
regards
Yassine
Nice to know that its working for you. Your answer to the error is at the below link. The portal automatically assigns the tasks when the user click DO It. In case of your application, you need to assign it specifically to the user.
http://documentation.bonitasoft.com/accessing-bonita-bpm-portal-and-forms-url-0
Hello,to assign a task I should use this URL:http://localhost:8080/bonita/API/bpm/humanTask/$data.selectedRow.idTache
in the put request but it dosn’t work I want just to know how to put the value of this "$data.selectedRow.idTache " in the url.
regards
Yassine
Try creating the full URL in a javascript variable and then use that $variable in the button URL property
I can’t in this case because when we use the put action we can’t put a
$variable in the button URL property
exactly in “URL to call
Send data to this URL when the button is clicked” Property
hmm… I am not too sure here and I don’t have access to my bonita setup at this point. I think I used a link in my case with the display type set to primary so that it looked like a button.
I’m using the Bonita BPM 7.2.0 Community version and in my case i should to use the put action to update the humanTask json object and my only solution here is the button with the url property and the put action .
Thank you so much for your help.
regards
Yassine