Skip to content

Commit

Permalink
feat(Workflow) support returning full web service call response with …
Browse files Browse the repository at this point in the history
…the dot (.) field name
  • Loading branch information
joebordes committed Mar 18, 2022
1 parent 5db6981 commit 7ed9b32
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -136,6 +136,10 @@ class RunWebserviceWorkflowTask extends VTTask {
$conds = array();
if ($outputtype == 'JSON') {
foreach ($target_fields['Response'] as $fld => $v) {
if ($fld == '.') { // they are asking for the full result
$entity->WorkflowContext[$v['context']] = $conds[$v['field']] = $respp;
continue;
}
$r2 = '';
if (is_array($response2)) {
if (strpos($fld, '.')) {
Expand Down Expand Up @@ -168,6 +172,10 @@ class RunWebserviceWorkflowTask extends VTTask {
$json = json_encode($xml);
$response2 = json_decode($json, true);
foreach ($target_fields['Response'] as $fld => $v) {
if ($fld == '.') { // they are asking for the full result
$entity->WorkflowContext[$v['context']] = $conds[$v['field']] = $respp;
continue;
}
if (strpos($fld, '.')) {
list ($elemresponse, $elemfield) = explode('.', $fld);
if (is_array($response2[$elemresponse])) {
Expand Down

0 comments on commit 7ed9b32

Please sign in to comment.