Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
CreateWorkflow invalid
jimE
I currently have a perl program which is attempting to create a workflow and receive !$wf->IsValid
here's the code
my $newWF = $wf_system->CreateWorkflow($jobSpec,$wf_tmp);
debug("newWF: $newWF");
if (!defined $newWF)
{
debug("newWF NOT defined ($!)");
}
elsif (!$newWF->IsValid())
{
my $errmsg = $newWF->GetError();
debug("newWF NOT Valid ($errmsg)");
}
geterror doesn't return anything, how do I find out what is not valid?
Help
Find more posts tagged with
Comments
Adam Stoller
Care to show us (attachments please) what the contents of $jobSpec and $wf_tmp are?
--fish
(Interwoven Senior Technical Consultant)
logs.zip
jimE
Here's the spec:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE workflow SYSTEM "iwwf.dtd">
<!-- ============================================================ -->
<!-- ======================= Workflow ======================== -->
<workflow name="bldPageCycleTemplate"
owner="beckmanweb1\jeeastham"
creator="beckmanweb1\jeeastham"
description="bldPageCycleTemplate Submit Workflow">
<!-- ========================== 1 ====================== -->
<!-- ========= Email Corporate Web Team Request ======== -->
<externaltask name="Dummy Task"
owner="beckmanweb1\jeeastham"
description="Dummy task to attch files"
start="t"
immediate="t">
<areavpath v='\default\main\Odyssey\WORKAREA\IT-Dev'/>
<successors>
<successorset description="check page cycle info">
<succ v = "Email_WebTeam_Request0"/>
<succ v = "Email_WebTeam_Request1"/>
<succ v = "Email_WebTeam_Request2"/>
<succ v = "Email_WebTeam_Request3"/>
</successorset>
</successors>
<command v='e:/iw-home/iw-perl/bin/iwperl.exe e:/iw-home/local/config/wft/beckmancoulter/scripts/dummy.ipl'/>
<files>
<file path='\Htdocs\BeckmanU\AddClasses.asp' comment=''/>
</files>
<variables>
<variable key='callback_comment' value="Dummy task completed"/>
</variables>
</externaltask>
<!-- ========================== 2(0) ============================== -->
<!-- ============= Email Corporate Web Team Request ================ -->
<externaltask name="Email_WebTeam_Request0"
owner="beckmanweb1\jeeastham"
description="Email Corporate Web Team Request"
start="f"
immediate="t">
<areavpath v='\default\main\Odyssey\WORKAREA\IT-Dev'/>
<successors>
<successorset description="check page cycle info">
<succ v="PageCycle0"/>
</successorset>
</successors>
<command v="e:/iw-home/iw-perl/bin/iwperl.exe e:/iw-home/local/config/wft/beckmancoulter/scripts/servlet_mail_custom.ipl PageCycle beckmanweb1\kpdelvalle;"/>
<variables>
<variable key='recipients' value="beckmanweb1\kpdelvalle"/>
<variable key='subject' value='Page cycle to be set'/>
<variable key='message' value="Request page cycle review info for the following files"/>
<variable key='callback_comment' value="emailed Webteam Create/Modify page cycles"/>
</variables>
<!-- ========================== 3(0) ============================== -->
<!-- =============CGI Page Cycle0 Request ========================= -->
<cgitask name="PageCycle0"
owner="beckmanweb1\kpdelvalle"
description="check page cycle info"
immediate="t">
<areavpath v='\default\main\Odyssey\WORKAREA\IT-Dev'/>
<successors>
<successorset description="End">
<succ v="END"/>
</successorset>
</successors>
<command v="ckPageCycle.cgi"/>
<variables>
<variable key='callback_comment' value="Page cycle count done 0"/>
</variables>
</cgitask>
<!-- ========================== 2(1) ============================== -->
<!-- ============= Email Corporate Web Team Request ================ -->
<externaltask name="Email_WebTeam_Request1"
owner="beckmanweb1\jeeastham"
description="Email Corporate Web Team Request"
start="f"
immediate="t">
<areavpath v='\default\main\Odyssey\WORKAREA\IT-Dev'/>
<successors>
<successorset description="check page cycle info">
<succ v="PageCycle1"/>
</successorset>
</successors>
<command v="e:/iw-home/iw-perl/bin/iwperl.exe e:/iw-home/local/config/wft/beckmancoulter/scripts/servlet_mail_custom.ipl PageCycle beckmanweb1\dmaster;"/>
<variables>
<variable key='recipients' value="beckmanweb1\dmaster"/>
<variable key='subject' value='Page cycle to be set'/>
<variable key='message' value="Request page cycle review info for the following files"/>
<variable key='callback_comment' value="emailed Webteam Create/Modify page cycles"/>
</variables>
<!-- ========================== 3(1) ============================== -->
<!-- =============CGI Page Cycle1 Request ========================= -->
<cgitask name="PageCycle1"
owner="beckmanweb1\dmaster"
description="check page cycle info"
immediate="t">
<areavpath v='\default\main\Odyssey\WORKAREA\IT-Dev'/>
<successors>
<successorset description="End">
<succ v="END"/>
</successorset>
</successors>
<command v="ckPageCycle.cgi"/>
<variables>
<variable key='callback_comment' value="Page cycle count done 1"/>
</variables>
</cgitask>
<!-- ========================== 2(2) ============================== -->
<!-- ============= Email Corporate Web Team Request ================ -->
<externaltask name="Email_WebTeam_Request2"
owner="beckmanweb1\jeeastham"
description="Email Corporate Web Team Request"
start="f"
immediate="t">
<areavpath v='\default\main\Odyssey\WORKAREA\IT-Dev'/>
<successors>
<successorset description="check page cycle info">
<succ v="PageCycle2"/>
</successorset>
</successors>
<command v="e:/iw-home/iw-perl/bin/iwperl.exe e:/iw-home/local/config/wft/beckmancoulter/scripts/servlet_mail_custom.ipl PageCycle beckmanweb1\cbehrlich;"/>
<variables>
<variable key='recipients' value="beckmanweb1\cbehrlich"/>
<variable key='subject' value='Page cycle to be set'/>
<variable key='message' value="Request page cycle review info for the following files"/>
<variable key='callback_comment' value="emailed Webteam Create/Modify page cycles"/>
</variables>
<!-- ========================== 3(2) ============================== -->
<!-- =============CGI Page Cycle2 Request ========================= -->
<cgitask name="PageCycle2"
owner="beckmanweb1\cbehrlich"
description="check page cycle info"
immediate="t">
<areavpath v='\default\main\Odyssey\WORKAREA\IT-Dev'/>
<successors>
<successorset description="End">
<succ v="END"/>
</successorset>
</successors>
<command v="ckPageCycle.cgi"/>
<variables>
<variable key='callback_comment' value="Page cycle count done 2"/>
</variables>
</cgitask>
<!-- ========================== 2(3) ============================== -->
<!-- ============= Email Corporate Web Team Request ================ -->
<externaltask name="Email_WebTeam_Request3"
owner="beckmanweb1\jeeastham"
description="Email Corporate Web Team Request"
start="f"
immediate="t">
<areavpath v='\default\main\Odyssey\WORKAREA\IT-Dev'/>
<successors>
<successorset description="check page cycle info">
<succ v="PageCycle3"/>
</successorset>
</successors>
<command v="e:/iw-home/iw-perl/bin/iwperl.exe e:/iw-home/local/config/wft/beckmancoulter/scripts/servlet_mail_custom.ipl PageCycle beckmanweb1\jeeastham;"/>
<variables>
<variable key='recipients' value="beckmanweb1\jeeastham"/>
<variable key='subject' value='Page cycle to be set'/>
<variable key='message' value="Request page cycle review info for the following files"/>
<variable key='callback_comment' value="emailed Webteam Create/Modify page cycles"/>
</variables>
<!-- ========================== 3(3) ============================== -->
<!-- =============CGI Page Cycle3 Request ========================= -->
<cgitask name="PageCycle3"
owner="beckmanweb1\jeeastham"
description="check page cycle info"
immediate="t">
<areavpath v='\default\main\Odyssey\WORKAREA\IT-Dev'/>
<successors>
<successorset description="End">
<succ v="END"/>
</successorset>
</successors>
<command v="ckPageCycle.cgi"/>
<variables>
<variable key='callback_comment' value="Page cycle count done 3"/>
</variables>
</cgitask>
<!-- ========================= 4 =============================== -->
<!-- ==================== End Workflow Job ====================== -->
<endtask name="End">
<activation>
<or>
<pred v = "PageCycle0"/>
<pred v = "PageCycle1"/>
<pred v = "PageCycle2"/>
<pred v = "PageCycle3"/>
</or>
</activation>
</endtask>
</workflow>
Here's the tmp:
<?xml version="1.0" standalone="no" ?>
<!DOCTYPE workflow SYSTEM "iwwf.dtd">
<workflow name = "IT_QA_c" owner = "beckmanweb1\baseddelmeyer" creator = "beckmanweb1\baseddelmeyer" description = "QA Submitted Files">
<updatetask lock = "t" name = "CopyToProdBranch" owner = "beckmanweb1\tsmaster" start = "t" delete = "t" description = "Copy the files from QA STAGING to the Production branch workarea" overwritemod = "t">
<areavpath v = "/default/main/bci-production/WORKAREA/Sync"/>
<successorset description = "Go to SubmitProdBranch">
<succ v = "SubmitProdBranch"/>
</successorset>
<srcareavpath v = "\default\main\beckmancoulter\WORKAREA\QA-WF-Test"/>
<files>
<file path='Htdocs\brentest.asp' comment="Fri Jul 19 08:34:54 2002:beckmanweb1\baseddelmeyer: 'test :'Fri Jul 19 08:34:54 2002:beckmanweb1\baseddelmeyer: 'Submitted'"/>
</files>
</updatetask>
<submittask name = "SubmitProdBranch" owner = "beckmanweb1\tsmaster" start = "f" unlock = "t" override = "t" skiplocked = "f" description = "Submit from production workarea" savecomments = "t" skipconflicts = "f">
<areavpath v = "/default/main/bci-production/WORKAREA/Sync"/>
<successorset description = "Go to DeployToProduction">
<succ v = "DeployToProduction"/>
</successorset>
<activation>
<or>
<pred v = "CopyToProdBranch"/>
</or>
</activation>
</submittask>
<externaltask lock = "f" name = "DeployToProduction" owner = "beckmanweb1\tsmaster" retry = "t" start = "f" description = "Deploy from production ">
<areavpath v = "/default/main/bci-production/WORKAREA/Sync"/>
<successors>
<successorset description = "Go to EmailTsAdminProductionDeployFailure">
<succ v = "EmailTsAdminProductionDeployFailure"/>
</successorset>
<successorset description = "Go to EmailDeveloperLiveStatus">
<succ v = "EmailDeveloperLiveStatus"/>
</successorset>
</successors>
<command v = "e:/iw-home/iw-perl/bin/iwperl.exe e:/iw-home/local/config/wft/beckmancoulter/it_qa2/itProd_deploy.ipl"/>
<activation>
<or>
<pred v = "SubmitProdBranch"/>
<pred v = "CorrectProductionDeploymentIssues"/>
</or>
</activation>
</externaltask>
<externaltask lock = "f" name = "EmailTsAdminProductionDeployFailure" owner = "beckmanweb1\tsmaster" retry = "t" start = "f" description = "Notifying TS Admin of Deployment Failure to Production">
<areavpath v = "/default/main/bci-production/WORKAREA/Sync"/>
<successors>
<successorset description = "Go to CorrectProductionDeploymentIssues">
<succ v = "CorrectProductionDeploymentIssues"/>
</successorset>
</successors>
<command v='e:/iw-home/iw-perl/bin/iwperl.exe e:/iw-home/bin/iwsend_mail.ipl
baseddelmeyer@beckman.com
'/>
<activation>
<or>
<pred v = "DeployToProduction"/>
</or>
</activation>
</externaltask>
<grouptask lock = "f" name = "CorrectProductionDeploymentIssues" start = "f" readonly = "f" description = "Correct deployment issues and either retry the automated deployment, or deploy manually and notify the Developer of Live Status" retainowner = "t">
<areavpath v = "/default/main/bci-production/WORKAREA/Sync"/>
<successors>
<successorset description = "RetryAutomatedDeployment">
<succ v = "DeployToProduction"/>
</successorset>
<successorset description = "NotifyDeveloperofLiveStatus">
<succ v = "EmailDeveloperLiveStatus"/>
</successorset>
</successors>
<sharedby>
<user v = "beckmanweb1/baseddelmeyer"/>
<user v = "beckmanweb1/epfaulk"/>
<user v = "beckmanweb1/jjyin"/>
<user v = "beckmanweb1/jdwise"/>
<user v = "beckmanweb1/jeeastham"/>
</sharedby>
<activation>
<or>
<pred v = "EmailTsAdminProductionDeployFailure"/>
</or>
</activation>
</grouptask>
<externaltask lock = "f" name = "EmailDeveloperLiveStatus" owner = "beckmanweb1\baseddelmeyer" retry = "t" start = "f" description = "Requested changes have been deployed to the Production Environment">
<areavpath v = "/default/main/bci-production/WORKAREA/Sync"/>
<successors>
<successorset description = "Go to EndTask">
<succ v = "EndTask"/>
</successorset>
</successors>
<command v="e:/iw-home/iw-perl/bin/iwperl.exe e:/iw-home/local/config/wft/beckmancoulter/it_qa2/qa_servlet_mail.ipl -t beckmanweb1\baseddelmeyer,beckmanweb1\baseddelmeyer"/>
<activation>
<or>
<pred v = "DeployToProduction"/>
<pred v = "CorrectProductionDeploymentIssues"/>
</or>
</activation>
<variables>
<variable key='tasktype' value="endnotify"/>
<variable key='subject' value="Notice of Live Status"/>
</variables>
</externaltask>
<endtask name = "EndTask">
<activation>
<or>
<pred v = "EmailDeveloperLiveStatus"/>
</or>
</activation>
</endtask>
</workflow>
Migrateduser
Now that someone brought this up, according to the brilliant documentation for the IsValid method in WFworkflow.pm, here's what that method is for:
IsValid()
Is this a valid workflow object.
What exactly does being
a valid workflow object
mean? When would this method return true and when would it return false?
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Adam Stoller
I did ask for an attachment - but such is life, let's see - somewhere around line 99 (+/-) you have an externaltask named "
Email_WebTeam_Request1
" which is syntactically incorrect because it contains no
</externaltask>
tag.
The same thing holds true for
Email_WebTeam_Request2
(around line 139), and
Email_WebTeam_Request3
(around line 178)
Try fixing the job spec and then see if the problem goes away
--fish
(Interwoven Senior Technical Consultant)
Adam Stoller
A valid workflow object means that the information contained within the object refers to a valid, real, existing, workflow.
When you create a workflow object, you can pass in any number you want to represent the jobid (or taskid in the case of a task object) - if that id represents a real workflow (or task) on the system, you'll get back a valid object. If the id does not representa a real job (or task) on the system then you will get back an invalid object - but it will still be an object.
Does that help?
--fish
(Interwoven Senior Technical Consultant)
Migrateduser
So in other words, as long as I create a valid WFworkflow instance using the constructor and a valid workflow ID, when I call IsValid it should return a 1? Otherwise it should return a 0?
Dave Smith
Sr. Software Engineer
Nike, Inc.
(503) 671-4238
DavidH.Smith@nike.com
Adam Stoller
I believe that to be the case, yes.
--fish
(Interwoven Senior Technical Consultant)
jimE
added the close externaltask in the 3 steps but still have the problem?
Adam Stoller
Is it the exact same problem? or has it changed?
Can you post (as an attachment please) the various files / contents of variables, scripts, etc. - so that we might take a look?
--fish
(Interwoven Senior Technical Consultant)
jimE
Same thing
Adam Stoller
I took your XML file and changed some of the hard-coded elements to fit my environment:
beckmanweb1\jeeastham
beckmanweb1\kpdelvalle
beckmanweb1\dmaster
beckmanweb1\cbehrlich
\default\main\Odyssey\WORKAREA\IT-Dev
\Htdocs\BeckmanU\AddClasses.asp
I then wrote a small perl script based on what you had posted - and it had no problems creating a job from that XML.
Can you provide the full script you used to do this?
--fish
(Interwoven Senior Technical Consultant)
jimE
the problem was a permissions issue the id didn't have permission to even view the data, when I changed to read only every thing works.
Thanks For all your help
Jim