Hi,
<create-timer/> and <cancel-timer/> are usually placed as part of <node-enter> and respectively <node-leave> event tags of a node.
<timer> tag is a short notation of both of them and can be placed as a child of node.
All above are parts of jpdl process definition language.
You can take a look for quick reference on jpdl here:

http://docs.jboss.org/jbpm/v3/userguide/jpdl.html

and for more details here:

http://docs.jboss.org/jbpm/v3/userguide/

About timers(they are part of scheduler service) details are here:
http://docs.jboss.org/jbpm/v3/userguide/scheduler.html

I'm placing a short example of usage:

<?xml version="1.0"?>
<process-definition name="process-timer-state">
    <start-state name="start state">
        <event type="node-leave">
            <script>
                <variable name="participants" access="write" />
                <_expression_><![CDATA[participants=new ArrayList();
                           participants.add("participant1");
                           participants.add("participant2");
                           System.out.println("Finish _expression_....");
               ]]></_expression_>
            </script>
        </event>
        <transition to="timerNode"></transition>
    </start-state>
    <state name="timerNode">
        <timer name="scheduler" duedate='2 seconds' repeat='true'>
            <action class="some.package.MyAction" />
        </timer>
        <transition name="toEnd" to="end"></transition>
    </state>
    <end-state name="end" />
</process-definition>

As I mention before - timers are part of scheduler service and you have to configure jbpm to work with scheduler.
In my nuxeo distribution the default configuration of jbpm  skips scheduler service. So I had to add this. More information you can find here:

http://docs.jboss.org/jbpm/v3/userguide/configuration.html

Regards,
Stefan



Federica Boffa wrote:
Hi everybody,
I want to add a timer in my nuxeo's workflow.
A user say: create a timer with <create timer>
But I don't know how create this timer, where? which file, which code? in process workflow?
I will that a timer starts when workflow starts for the first user and when a user don't  partecipate for 3 hours the timer finish and the workflow starts for the next user in the list.
For me is the first time..I have read the guide of jboss but if you have an example is very appreciated :-)
 
thank you so much


Windows Live Today: Resta aggiornato sulle attività dei tuoi amici su Flickr, Dada e MySpace

_______________________________________________ ECM mailing list [email protected] http://lists.nuxeo.com/mailman/listinfo/ecm To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm


--
Setelis Ltd

Stefan Dimov
tel/fax : +359 2 987 08 15
mobile: +359 888 52 54 88
web : http://www.setelis.com






_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm

Reply via email to