Issue 20066 - Jobs: List of supported events
Summary: Jobs: List of supported events
Status: CLOSED IRREPRODUCIBLE
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Linux, all
: P3 Trivial
Target Milestone: ---
Assignee: em2
QA Contact: issues@api
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2003-09-25 15:04 UTC by em2
Modified: 2013-02-24 21:06 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description em2 2003-09-25 15:04:25 UTC
(Reopened with additional information.)

Chapter 4.7.2 (Jobs) of the Developer's Guide contains a "List of
supported Events".  The only event I found to work in OOo 1.1rc4
is onFirstVisibleTask.

Either the documentation is wrong or the implementation is incomplete.

Note that I am not talking about Basic, I'm talking about jobs (C++
and Java).

To verify my claim, I added all the events listed in the "List of
supported Events" to Jobs.xcu in

  OpenOffice.org1.1_SDK/examples/DevelopersGuide/Components/Addons/JobsAddon

by copying the onFirstVisibleTask entry, removed OOo, reinstalled OOo
(to make sure that no jobs are disabled), built the example (make clean;
make), and run OOo.

Result: Only one dialog box, for the onFirstVisibleTask event.

Same result with C++ code.

Here's the new Jobs.xcu I used (no other files changed in that
example program):

<?xml version='1.0' encoding='UTF-8'?>
<oor:component-data oor:name="Jobs" oor:package="org.openoffice.Office"
xmlns:oor="http://openoffice.org/2001/registry"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<node oor:name="Jobs">
        <node oor:name="AsyncJob" oor:op="replace">
            <prop oor:name="Service" oor:type="xs:string">
                <value>com.sun.star.comp.framework.java.services.AsyncJob</value>
			</prop>
            <node oor:name="Arguments">
                <prop oor:name="arg_1" oor:type="xs:string">
					<value>val_1</value>
				</prop>
			</node>
		</node>
	</node>
    <node oor:name="Events">
        <node oor:name="onFirstRunInitialization" oor:op="modify">
            <node oor:name="JobList">
                <node oor:name="AsyncJob" oor:op="replace"/>
            </node>
        </node>

        <node oor:name="onFirstVisibleTask" oor:op="modify">
            <node oor:name="JobList">
                <node oor:name="AsyncJob" oor:op="replace"/>
            </node>
        </node>
        <node oor:name="onDocumentOpened" oor:op="modify">
            <node oor:name="JobList">
                <node oor:name="AsyncJob" oor:op="replace"/>
            </node>
        </node>
        <node oor:name="OnStartApp" oor:op="modify">
            <node oor:name="JobList">
                <node oor:name="AsyncJob" oor:op="replace"/>
            </node>
        </node>
        <node oor:name="OnCloseApp" oor:op="modify">
            <node oor:name="JobList">
                <node oor:name="AsyncJob" oor:op="replace"/>
            </node>
        </node>
        <node oor:name="OnNew" oor:op="modify">
            <node oor:name="JobList">
                <node oor:name="AsyncJob" oor:op="replace"/>
            </node>
        </node>
        <node oor:name="OnLoad" oor:op="modify">
            <node oor:name="JobList">
                <node oor:name="AsyncJob" oor:op="replace"/>
            </node>
        </node>
        <node oor:name="OnSaveAs" oor:op="modify">
            <node oor:name="JobList">
                <node oor:name="AsyncJob" oor:op="replace"/>
            </node>
        </node>
        <node oor:name="OnSaveAsDone" oor:op="modify">
            <node oor:name="JobList">
                <node oor:name="AsyncJob" oor:op="replace"/>
            </node>
        </node>
        <node oor:name="OnSave" oor:op="modify">
            <node oor:name="JobList">
                <node oor:name="AsyncJob" oor:op="replace"/>
            </node>
        </node>
        <node oor:name="OnSaveDone" oor:op="modify">
            <node oor:name="JobList">
                <node oor:name="AsyncJob" oor:op="replace"/>
            </node>
        </node>
        <node oor:name="OnPrepareUnload" oor:op="modify">
            <node oor:name="JobList">
                <node oor:name="AsyncJob" oor:op="replace"/>
            </node>
        </node>
        <node oor:name="OnUnload" oor:op="modify">
            <node oor:name="JobList">
                <node oor:name="AsyncJob" oor:op="replace"/>
            </node>
        </node>
        <node oor:name="OnFocus" oor:op="modify">
            <node oor:name="JobList">
                <node oor:name="AsyncJob" oor:op="replace"/>
            </node>
        </node>
        <node oor:name="OnUnfocus" oor:op="modify">
            <node oor:name="JobList">
                <node oor:name="AsyncJob" oor:op="replace"/>
            </node>
        </node>
        <node oor:name="OnPrint" oor:op="modify">
            <node oor:name="JobList">
                <node oor:name="AsyncJob" oor:op="replace"/>
            </node>
        </node>
        <node oor:name="OnModifyChange" oor:op="modify">
            <node oor:name="JobList">
                <node oor:name="AsyncJob" oor:op="replace"/>
            </node>
        </node>

        <node oor:name="onMyOwnJobEvent" oor:op="replace">
            <node oor:name="JobList">
                <node oor:name="AsyncJob" oor:op="replace"/>
            </node>
        </node>
    </node>
</oor:component-data>
Comment 1 ooo 2003-09-25 17:07:29 UTC
sounds like a framework issue
Comment 2 andreas.schluens 2003-09-30 12:57:51 UTC
Sorry - but you are wrong a second time. Please have a look into the
user layer of your configuration files. If the first event
"onFirstVisibleTask" is triggered by the JobExecutor (because its
hardly called from the code) the AsyncJob force a deactivation for
further events. see code line 215-218 inside AsyncJob.java. In case
the next event is triggered by a document event (e.g. "OnNew") the
same AsyncJob is already marked as "DEACTIVATED". So it wont be excuted!

You should search for a file
"user/registry/data/org/openoffice/Office/Jobs.xcu" inside your office
installation. There should be two time stamps for one of the events,
where the AsyncJob is registered for (e.g. "onFirstVisibleTask"). If
you remove this file or these time stamps, the job will be started
next time (requires new start of the office!). But of course it will
be started for the first event only again. So you should try to reduce
your example XCU to the real needed ones. Or you have to adapt the
code to your own requirements.
Comment 3 andreas.schluens 2003-09-30 12:59:22 UTC
.
Comment 4 lohmaier 2004-02-25 21:36:54 UTC
clearing resolution
Comment 5 lohmaier 2004-02-25 21:37:30 UTC
closing