Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderators: ArturoRobles, ArturoRobles

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
I want to pass user input(text field) to a trigger to check with database and see if the user input is in database or not and return the related user input values.
But I can't find any related topic about it.
I also tried to set a case variable for trigger to use, but setting variables need PM_CASES permission which i can't have it for operator users.
Please help me.

Thanks in advance
Last edited by ehsanv on Thu Jul 25, 2019 5:05 am, edited 1 time in total.
The PROCESSMAKER_OPERATOR role has the PM_CASES permission. An Operator can't see any cases without the PM_CASES permission. Are you thinking of another permission?

How are you executing your trigger? If you are using REST or the executeTrigger() web service, ProcessMaker will check whether the logged-in user is assigned to the task (indicated by the delegation index) in the case.

ProcessMaker doesn't provide a way to pass arguments to a trigger. What you have to do is set variables in the case and then have your trigger code use those case variables. Then you can unset those variables in the case if you don't want them to remain.

If you install the extraRest plugin, there is a REST endpoint that allows you to set variables, execute the trigger and then unset the variables in one operation.
PUT http://{domain-or-ip}/api/1.0/{workspace}/extrarest/case/{app_uid}/execute-trigger/{tri_uid}

That endpoint also allows you to get around the security restrictions that are probably causing your problem.
I'm using javascript and REST API. I used Value Based Assigment for tasks and the value is @@USER_LOGGED because i wanted the user who started the case do the whole case.
About PM_CASES you are right! But i don't know why I can't set variables, this is my code:
Code: Select all
$.ajax({url:host+'/api/1.0/'+ws+'/cases/'+caseID+'/variable', data:{'strBuffer':this.value}, type:'PUT'});
My case variable name is strBuffer and i wanted to set it my value and used it in trigger.

finally about extraRest, I used it and worked! Thanks!
Unable to create workspace

I have the same issue. Any solution? Thanks alex[…]

Install in ubuntu

Dear All, In our dev environment we did an upgrad[…]

Get data from oracle database.

How to display all data in a table from oracle DB […]

Hello everyone, I have the same route case issue, […]