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)
Intercept
agoldschmidt
TeamSite 6.1
I'd like to intercept the "end job" workflow action (in the professional interface) so I can call an external logging function before ending the job. Alternatively, I'd like the workflow job itself to detect the end job signal and perform the logging function itself. Any ideas on how to do either of these?
Thanks,
Allen
Find more posts tagged with
Comments
nipper
external task just before the endtask.
That is how IW does it with WF Monitor
agoldschmidt
I probably should have been clearer. :-) I am using an external task right before the end task to log the workflow when it ends normally. What I'm looking for is the ability to log the workflow when it is ended prematurely (through the UI). For example, say the content admin comes along and decides that a particular workflow job shouldn't have been started and decides to end it. I'd like to call the logging function right before the workflow terminates.
nipper
Good luck
Two Words
Feature Request
& do not let anyone do that.
Migrateduser
I've thought about this one before and never come up with a good answer. In thinking about it again right now, it seems like maybe you could set up an event trigger on the WorkflowInactivate event. Not sure though.
Migrateduser
Hmm, looking at the list on p.156 of the CLT manual, it doesn't look like its a supported event.
I tested it anyway, and confirmed that it doesn't work.
But, I do think that's the right paradigm for IWOV to implement it. I would be supportive of such a feature request.
nipper
Just because it is not a supported event does not mean you cannot do it. We wrote a trigger for the rename and copy events. So you can do it. Does this show up in the event log ?
Andy
Migrateduser
The event does, but I didn't see anything firing as a result. Here's what I did:
1. Wrote super-complicated perl-script d:\foo.ipl... complete with quoting error - DOH! (let's try that again - ok, same result):
open OUT, '>D:\foo.txt';
print OUT "Test\n";
close OUT;
2. Registered the trigger:
iwat WorkflowInactivate ""d:\webapps\internal\interw~1\teamsite\iw-perl\bin\iwperl.exe d:\foo.ipl"
3. Started a workflow, did the metatagger step
4. Did an End Job
Here's what's in the event log:
[Wed Oct 13 17:41:13 2004] TWCCORP\V009272 master WorkflowActivate workflow Group Task Workflow 0x4587
[Wed Oct 13 17:41:13 2004] TWCCORP\V009272 master TaskGoActive Group Task Workflow 0x4587 Tag_Files 0x4588
[Wed Oct 13 17:41:18 2004] TWCCORP\V009272 master TaskCalledBack Group Task Workflow 0x4587 Tag_Files 0x4588 0 Generate Files 5
[Wed Oct 13 17:41:18 2004] TWCCORP\V009272 master ChooseTransition Group Task Workflow 0x4587 Tag_Files 0x4588 0 Generate Files 5
[Wed Oct 13 17:41:18 2004] TWCCORP\V009272 master TaskActivate Group Task Workflow 0x4587 Generate_Files 0x4589 Tag_Files 0x4588
[Wed Oct 13 17:41:18 2004] TWCCORP\V009272 master TaskInactivate Group Task Workflow 0x4587 Tag_Files 0x4588
[Wed Oct 13 17:41:18 2004] TWCCORP\V009272 master TaskGoActive Group Task Workflow 0x4587 Generate_Files 0x4589
[Wed Oct 13 17:41:18 2004] TWCCORP\V009272 master TaskInvokeExternal Group Task Workflow 0x4587 Generate_Files 0x4589
[Wed Oct 13 17:41:19 2004] SYSTEM master ModifyEntity
[Wed Oct 13 17:41:19 2004] SYSTEM master TaskCalledBack Group Task Workflow 0x4587 Generate_Files 0x4589 0 Check Business Rules 1
[Wed Oct 13 17:41:19 2004] SYSTEM master ChooseTransition Group Task Workflow 0x4587 Generate_Files 0x4589 0 Check Business Rules 1
[Wed Oct 13 17:41:19 2004] SYSTEM master TaskActivate Group Task Workflow 0x4587 Check_Business_Rules 0x458a Generate_Files 0x4589
[Wed Oct 13 17:41:19 2004] SYSTEM master TaskInactivate Group Task Workflow 0x4587 Generate_Files 0x4589
[Wed Oct 13 17:41:19 2004] SYSTEM master TaskGoActive Group Task Workflow 0x4587 Check_Business_Rules 0x458a
[Wed Oct 13 17:41:19 2004] SYSTEM master TaskInvokeExternal Group Task Workflow 0x4587 Check_Business_Rules 0x458a
[Wed Oct 13 17:41:19 2004] SYSTEM master TaskCalledBack Group Task Workflow 0x4587 Check_Business_Rules 0x458a 1 Business Rules Failure 0
[Wed Oct 13 17:41:19 2004] SYSTEM master ChooseTransition Group Task Workflow 0x4587 Check_Business_Rules 0x458a 1 Business Rules Failure 0
[Wed Oct 13 17:41:19 2004] SYSTEM master TaskActivate Group Task Workflow 0x4587 Email_Business_Rules_Failure 0x458b Check_Business_Rules 0x458a
[Wed Oct 13 17:41:19 2004] SYSTEM master TaskInactivate Group Task Workflow 0x4587 Check_Business_Rules 0x458a
[Wed Oct 13 17:41:19 2004] SYSTEM master TaskGoActive Group Task Workflow 0x4587 Email_Business_Rules_Failure 0x458b
[Wed Oct 13 17:41:19 2004] SYSTEM master TaskInvokeExternal Group Task Workflow 0x4587 Email_Business_Rules_Failure 0x458b
[Wed Oct 13 17:41:24 2004] SYSTEM master TaskCalledBack Group Task Workflow 0x4587 Email_Business_Rules_Failure 0x458b 0 Business Rules Modification 5
[Wed Oct 13 17:41:24 2004] SYSTEM master ChooseTransition Group Task Workflow 0x4587 Email_Business_Rules_Failure 0x458b 0 Business Rules Modification 5
[Wed Oct 13 17:41:24 2004] SYSTEM master TaskActivate Group Task Workflow 0x4587 Business_Rules_Modification 0x458c Email_Business_Rules_Failure 0x458b
[Wed Oct 13 17:41:24 2004] SYSTEM master TaskInactivate Group Task Workflow 0x4587 Email_Business_Rules_Failure 0x458b
[Wed Oct 13 17:41:24 2004] SYSTEM master TaskGoActive Group Task Workflow 0x4587 Business_Rules_Modification 0x458c
[Wed Oct 13 17:41:33 2004] SYSTEM master ModifyEntity
[Wed Oct 13 17:41:34 2004] SYSTEM master ModifyEntity
[Wed Oct 13 17:41:38 2004] SYSTEM master ModifyEntity
[Wed Oct 13 17:41:44 2004] TWCCORP\V009272 master WorkflowInactivate workflow Group Task Workflow 0x4587
[Wed Oct 13 17:41:46 2004] SYSTEM master ModifyEntity
5. Checked for the existence of d:\foo.txt
6. Sighed in disappointment
See anything wrong with the above?
Migrateduser
Not reading the thread completely, I thik it's more of a notification than a trigger - if you trap that "event" your code runs after the job is gone, so your data is already lost. Not sure if that's what you're running into.
Two more words, lame architecture.
nipper
This is a little different on how we did ours.
copy iwhome/bin/iwmkdir to iwhome/bin/rob_wf_inactive
in the list ifs put something like:
elsif ($MYNAME eq "rob_wf_inactive") {
$IW_EVENT1="WorkflowInactivate";
$IW_VPATHENV="IW_FILE";
$SUBJECT1=TeamSite::Uniscape::uniscape::GetNativeMessage("$iwhome", "cltipl.cat", "15", "file or directory");
chomp($SUBJECT1);
$ARTICLE1=TeamSite::Uniscape::uniscape::GetNativeMessage("$iwhome", "cltipl.cat", "7", "a");
chomp($ARTICLE1);
$ADJECTIVE1="";
$VERB1=TeamSite::Uniscape::uniscape::GetNativeMessage("$iwhome", "cltipl.cat", "3", "created");
chomp($VERB1);
$SUBJECTPHRASE = $ADJECTIVE1 . $SUBJECT1;
}
Then this in iwlocal.cfg:
rob_wf_inactive root /iw-home/custom//bin/foo.ipl
Now this is for Unix, you use DOS so your mileage may vary.
Andy
nipper
>Not reading the thread completely, I thik it's more of a notification than a trigger - if you trap that "event" your code runs after the
>job is gone, so your data is already lost. Not sure if that's what you're running into.
True, the job will be gone, but we may have some information we can use. No question we cannot stop it from
happening.
>Two more words, lame architecture.
Keeps consultants busy,
Stockmarkettype_1.zip
Migrateduser
> Keeps consultants busy,
Agreed, and highly lucrative, but often frustrating and tedious work. Anyway this should not be the primary goal of enterprise software vendors.
Adam Stoller
Perhaps the new reporting system that's coming in 6.5 (6.7?) will provide the ability to trap such events as job removal (as distinct from job ending) - but my guess is that you should file a feature request to have Remove Job (and iwrmjob) fire off a *different* event than an endtask does - *and* to be able to attach a PRE-operative trigger to such an event.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com