TeamSite65SP1/Solaris9OpenDeploy 602 -> Deployments to Oracle9i tablesHi all, I wondered if someone developed a workflow cgi task or external task that probes OpenDeploy for success or failure to return that in a cgi to the user as part of the workflow?My customer Fortis has something implemented, but that goes from the File menu in CCPro, after starting a standalone file deployment from the CCPro interface and not from a workflow.Any help would be appreciated. I included the script that Fortis use to provide feedback from the CC Pro Action menu.
my $transition_message;my $result = qx($od_command);my $rc = ($? >> 8);if ($rc == 0) { $transition_message = "Successfully Deployed";}else { $transition_message = "Deployment Failed, Return Code = $rc"; # Log out $result to see details}
In the CGI or External Task you may want to use OD Command return Code to catch Success/FailureSomething Like the followingmy $transition_message;my $result = qx($od_command);my $rc = ($? >> 8);if ($rc == 0) { $transition_message = "Successfully Deployed";}else { $transition_message = "Deployment Failed, Return Code = $rc"; # Log out $result to see details}
If you're checking the exit value - you need to use system() not qx() - as the latter will return to you the contents of STDOUT from the command which is run - which you could then parse to find the results.In this case - I think system() is generally a better choice since OD (at least on Unix) does a good job of returning status results in its exit code (if memory serves - 0, 1, 2, 3, 9 - or something like that - it's documented though)
In Windows, both qx and backticks set proper $? variable. Right now I do not have an environment to check on UNIX although I'm sure it works there as wellIn the sample I used $result for STDOUT and $rc to retain Return code