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

Moderator: amosbatto

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.
By manalidhuri
#827349
Hii
Im trying to send variable from one process to another using soap service(send variable) where im able to send variable in text field but not in grid text fields.
How can i send variable in grid?
By manalidhuri
#827399
I'm sending variables through $var to another process but it only send variable which are in text field and i want to send in grid also, please check below trigger and provide possible solution.



[email protected]@APPLICATION;
$pare[email protected]@APP_NUMBER;
@@parent_case_id=$parent_case_id;
@@parent_application_id=$parent_application_id;
[email protected]@outdocvar;
[email protected]@BICCODE;
[email protected]@decision;


if(@@BICCODE=='condition1' || @@BICCODE=='condition2')
{

$client=new SoapClient('wsdl');
$params = array((array('userid'=>'username', 'password'=>'pswrd')));
$result1 = $client->__SoapCall('login', $params);
@@result1=$result1;

if ($result1->status_code == 0){

$sessionId = $result1->message;
@@msg=$sessionId;

}

else{

echo("Unable to connect to ProcessMaker.\nError Numbern");
}

class variableStruct {

public $name;
public $value;
}

$query = executeQuery("select GRP_UID from GROUPWF where GRP_TITLE in(select GROUPNAME from PMT_M_BICCODE_GROUP_MAP where BICCODE='$BICCODE')");
@@query=$query;
@@groupUID = $query[1]['GRP_UID'];
[email protected]@groupUID;

$query2 = executeQuery("SELECT DISTINCT APP_TITLE FROM APP_CACHE_VIEW WHERE APP_UID='$parent_application_id'");
@@query2=$query2;
@@appTitle = $query2[1]['APP_TITLE'];
[email protected]@appTitle;



$name = new variableStruct();
$vars = array('CASEID'=>$caseId, 'BICCODE'=>$BICCODE, 'decision'=>$decision, 'Comment'=>$cmnt,'parent_case_id'=>$parent_case_id,'parent_application_id'=>$parent_application_id,'groupUID'=>$groupUID,'sendersrefno'=>$appTitle,'outdocvar'=>$outdocvar);


@@vars=$vars;

$aVars = array();
foreach ($vars as $key => $val)
{
$obj = new variableStruct();
$obj->name = $key;
$obj->value = $val;
$aVars[] = $obj;
}
# process and its first task.

if(@@BICCODE=='condition1')
{
$params = array(array('sessionId'=>$sessionId, 'processId'=>'PRO_UID',
'taskId'=>'TASK_UID', 'variables'=>$aVars));
$result = $client->__SoapCall('newCase', $params);
if ($result->status_code == 0)
print "New case ID: $result->caseId, Case No: $result->caseNumber \n";

else
print "Error creating case: $result->message \n";


$query1 = executeQuery("select APP_UID from APP_CACHE_VIEW where DEL_INDEX='1' and TAS_UID='TASK_UID' and APP_STATUS='DRAFT'");
@@query1=$query1;
@@appUid = $query1[1]['APP_UID'];
[email protected]@appUid;
}

if(@@BICCODE=='condition2')
{
$params = array(array('sessionId'=>$sessionId, 'processId'=>'PRO_UID',
'taskId'=>'TASK_UID', 'variables'=>$aVars));
$result = $client->__SoapCall('newCase', $params);
if ($result->status_code == 0)
print "New case ID: $result->caseId, Case No: $result->caseNumber \n";

else
print "Error creating case: $result->message \n";


$query1 = executeQuery("select APP_UID from APP_CACHE_VIEW where DEL_INDEX='1' and TAS_UID='TASK_UID' and APP_STATUS='DRAFT'");
@@query1=$query1;
@@appUid = $query1[1]['APP_UID'];
[email protected]@appUid;
}

$params = array(array('sessionId'=>$sessionId, 'caseId'=>$appUid,'delIndex'=>'1'));
$result = $client->__SoapCall('routeCase', $params);
if ($result->status_code == 0)
print "New case ID: $result->caseId, Case No: $result->caseNumber \n";

else
print "Error creating case: $result->message \n";


}

else if(@@BICCODE=='condition4' || @@BICCODE=='condition5' || @@BICCODE=='condition6')
{


$query = executeQuery("select GRP_UID from GROUPWF where GRP_TITLE in(select GROUPNAME from PMT_M_BICCODE_GROUP_MAP where BICCODE='$BICCODE')");
@@query=$query;
@@groupUID = $query[1]['GRP_UID'];
}
else
{

print "Error creating case: $result->message \n";

}
Value Based Assignment to group

Thanks for reply. How to use if condition in your […]

extract ip of server

Thank you

A guide to install PM 4

Hi, You can check this link: https://github.com/P[…]

Getting finish all the coursework within tight dea[…]