[...]I've verified that the wfDef has the proper xml header and is being passed correctly. I've also tried to run this as root & still no luck. I'm 100% sure the xml is fine since i can generate it using the commandline tool iwwft_compile (and the same xml def has been in production for years). [...].
<?xml version="1.0"?><iwwft_compile_params><param name="iw_template_file"><value>custom/workflow.wft</value></param><param name="iw_template_name"><value>custom workflow name</value></param><param name="iw_debug_mode"><value>false</value></param><param name="iw_areaowner"><value>admin1</value></param><param name="iw_branch"><value>/store/main/branch</value></param><param name="iw_home"><value>/opt/iw-home</value></param><param name="iw_role"><value>editor</value></param><param name="iw_session"><value>seesionstringomitted</value></param><param name="iw_use_default"><value></value></param><param name="iw_user"><value>admin1</value></param><param name="iw_workarea"><value>/store/main/branch/WORKAREA/content</value></param><param name="javagen"><value>YES</value><param><param name="iw_file"><value>templatedata/form_type_1/data/test.dcr</value></param></iwwft_compile_params>
Thanks for taking a look, ghoti. Here's the xml i was referring to:<?xml version="1.0"?><iwwft_compile_params><param name="iw_template_file"><value>custom/workflow.wft</value></param><param name="iw_template_name"><value>custom workflow name</value></param><param name="iw_debug_mode"><value>false</value></param><param name="iw_areaowner"><value>admin1</value></param><param name="iw_branch"><value>/store/main/branch</value></param><param name="iw_home"><value>/opt/iw-home</value></param><param name="iw_role"><value>editor</value></param><param name="iw_session"><value>seesionstringomitted</value></param><param name="iw_use_default"><value></value></param><param name="iw_user"><value>admin1</value></param><param name="iw_workarea"><value>/store/main/branch/WORKAREA/content</value></param><param name="javagen"><value>YES</value><param><param name="iw_file"><value>templatedata/form_type_1/data/test.dcr</value></param></iwwft_compile_params>
heres the file, ghoti
CSWorkflow myWF = myWFE.createWorkflow (wfDef.toString());
So, if I understand this correctly - to use createWorkflow(), the workflow would have to be instantiated through the UI first (whether it's WFT or WFM)? Or is there a way to actually instantiate the workflow and force the "compilation" phase of instantiation through the CSSDK?Thanks,LC
Thanks nipper.I've attached the job spec that I saved and am using for my createWorkflow. But, I'm getting an Unknown Hopi Error. It's basically not able to create the workflow object.Any help appreciated.Thanks,LC
Yea but it is easier to build it yourself. Instantiate it first with WFM/WFT and get a JobSpec XML and then reverse engineer it from there. Put the WF in debug mode to get the initial JobSpec.
We embed the job spec into the Java code as a very long string. Allows us to do lots of variable substitution and keeps everything in one place. If you're already starting out with a WFT, it makes some sense to embed it in the code. If you're starting out with a WFM that you think might change often, you might consider using a WFT instead, if you embed it into the code. Just another suggestion.
Maybe I'm confused, but I don't see the difference in using WFM or WFT when it comes to this.
Right - didn't mean to confuse you. My terminology was wrong. I was using WFT and JobSpec as equivalent and they are clearly not. The JobSpec is the only thing that matters, as long as you don't need any instantiation form, you can embed a job spec in the code and substitute as you wish. If you need an instantiation form, my solution clearly wouldn't work, unless you used some sort of CGI Task to gather the info you needed first. We don't need an instantiation form to gather any info.