Perl PostProcessor Script Failing - did not return the correct value

Options
David Smith
edited April 17, 2019 in TeamSite #1

Created the simplest perl script to be used as a PostProcesser script in a WFM on Linux. All I have in the script is a list of possible input paramas the WFM sends the script so I know what I'm getting, if anything. Ultimately all I want to do is use a value from the instantiation form to be set as an extended attribute on all the initially attached files of the job. But first I need to figure out what values the processor sends me, so this is my script:

!/foo/bar/TShome/TeamSite/iw-perl/bin/iwperl

use TeamSite::WFtask;
use TeamSite::WFworkflow;

my ($a,$b,$c,$d,$e,$f) = @ARGV;

open LOG,">/opt/applog/Custom/wcm_development_post_instantiation.log";

print LOG "a: $a\n";
print LOG "b: $b\n";
print LOG "c: $c\n";
print LOG "d: $d\n";
print LOG "e: $e\n";
print LOG "f: $f\n";

close LOG;

return 1;

I am calling the script like this in the PostProcessor section of the WFM:

/foo/bar/TShome/TeamSite/iw-perl/bin/iwperl /foo/bar/TShome/TeamSite/httpd/iw-bin/wcm_development_post_instantiation.ipl

After I try to start the job after filling out the instantiation form, it throws this error. What the heck does it want as a return value from the script? The docs are useless. I know what it is if it was a Java class, but I don't want to write Java for this.

com.interwoven.modeler.transformer.ModelTransformer () - transformModel error:
com.interwoven.modeler.common.exceptions.ModelerException: Workflow Command [Pre/Post] did not return correct value. Correct the error.
at com.interwoven.modeler.transformer.PrePostCommandTransformer.executePostprocessorCommands(PrePostCommandTransformer.java:187)
at com.interwoven.modeler.transformer.ModelTransformer.transformModel(ModelTransformer.java:165)
at com.interwoven.modeler.transformer.ModelTransformer.transformModel(ModelTransformer.java:4818)

Comments

  • Does it matter ? Your log should have been created with the correct data.

    I haven't played with post processors in WFM for a few years, so I do not know the answer off hand.

  • It does write to my log file and it's sending me nothing, so maybe it's just stupid to use perl for a PostProcessor script. I can just use an externalTask as the first task in the workflow to do what I need to do. It just seemed simpler to do it with the PostProcessor - this is how we learn.

TeamSite Developer Resources

  • Docker Automation

  • LiveSite Content Services (LSCS) REST API

  • Single Page Application (SPA) Modules

  • TeamSite Add-ons

If you are interested in gaining full access to the content, you can register for a My Support account here.
image
OpenText CE Products
TeamSite
APIs