Drools Flow 5.1.0.M1 - Human Task - How to get the WorkItem change state after restart of MinaTaskServer
by Vijay K Pandey
Hi,
I have the following simple process having the WSHT 'HumanTask' (Drools Flow 5.1.0.M1)
Start Node--> Human Task --> End Node
Under the following scenario:
a) MinaTaskServer service is started
b) Drools Flow Process is started - as it reaches the Human Task ( having 'Wait for completion' as true) - following 4 commands are executed on the mina service
i. AddTaskRequest ---> This basically creates the task in the WSHT task tables
ii. RegisterForEventRequest --> This is called 3 times to register for following task events (TaskCompletedEvent, TaskFailedEvent, TaskSkippedEvent)
c) I guess the above 3 events (b ii) are registered for a callback to the Drools process so that the 'work item' (related to Human Task) state can be properly changed when the above 3 task event occurs - and the drools process can move forward.
Now my question is what if the Mina service has to be stopped in between (task has been created but not yet reached the completed status) - then we lose all the registered events (as these are not persistent events) - now when we restart the Mina service we query the task - and let's say we changed the state through "Reserved--> InProgress-->Completed". Now since the registered events are lost, how does the work item will be marked as "completed" (as the associated WSHT task has completed) so that the drools process can move forward - basically end in this case?
Any insight will be highly appreciated.
Thanks
Vijay
15 years
Starting New Procss instance from outside of the GWT console
by ramram8
Hi all
I have the following question and I was wondering if someone can help me?
can we initiate a new process instance in the GWT console without using the
start button?
can we start this process from a call from outside of the application by
using a specific API and passing to it parameters?
I have the following process : START -> USER TASK -> MAIL -> END
i need to start this process from outside the application so that the used
when logging into the gwt console can see that he have a task to validate?
--
View this message in context: http://old.nabble.com/Starting-New-Procss-instance-from-outside-of-the-GW...
Sent from the drools - user mailing list archive at Nabble.com.
15 years
Using DateFormat and getting today's date in drools5.0
by ABRA2
I need to compare date from java bean to system date for a rule. I referred
to previous posts, drools expert documentation and tried to come up with a
rule which is not yet working. Please help me for the same.
1. Which package should i import to use DateFactory? It is not in
org.drools.base.evaluators.DateFactory anymore i guess. Is there a better
way to get CurrentSystemDate other than using DateFactory?
2. In my JavaBean the date has format dd/MM/YYYY. So where do i set this
format to drools.dateformat? In my .drl file or in the java pgm where i load
the .drl file and do insertion of fact objects and fire the rules.
rule SetTktIssueDate
when
DateFactory($sysdate : today )
$br:BillingRecord(tktIssueDate==null || tktIssueDate > sysdate)
then
modify($br){setTktIssueDate(sysdate);}
thanks
ABRA2
--
View this message in context: http://old.nabble.com/Using-DateFormat-and-getting-today%27s-date-in-droo...
Sent from the drools - user mailing list archive at Nabble.com.
15 years
test scenario in Guvnor
by Qian, Tony
All,
I followed an example and created test scenario in Guvnor. However, I always got 'no rule was fired ' even then I specified rule(s) in the test scenario. Am I missing something?
Btw, how to set java as default dialect in rules?
Appreciate your help.
Tony
<HR>
<font size="1" face="Arial"><B>CONFIDENTIALITY NOTICE: </B>The information in this electronic transmission and
any documents accompanying it may contain confidential and privileged
information intended for use by the individual or entity that is the intended
recipient. If you have received this message in error or due to an unauthorized
transmission or interception, please delete all copies from your system without
disclosing, copying, or transmitting this message and notify us by telephone
877TELLUS9 or by electronic mail <a href = "servicecomments(a)progressive-medical.com">servicecomments(a)progressive-medical.com</a>.</font>
15 years
How do I resume a paused process?
by Scott Stevenson
I have a process that pauses after a few nodes are executed because it
reaches a Human Task node. I retrieve the persisted session with the
following code:
JPAKnowledgeService.loadStatefulKnowledgeSession(sessionId, kbase, null,
getEnvironment());
Once I have this session object I'm not sure how to resume the paused
process? I want to signal the Human Task work item as complete and have
the process resume at that point. I've tried this code:
WorkItemManager wm = session.getWorkItemManager();
wm.registerWorkItemHandler("Approve", new WSHumanTaskHandler());
WorkflowProcessInstance pi = (WorkflowProcessInstance)
session.startProcess("processName");
Object[] nodes = pi.getNodeInstances().toArray();
WorkItem wi = ((HumanTaskNodeInstance) nodes[0]).getWorkItem();
wm.completeWorkItem(wi.getId(), null);
session.dispose();
The result of this is that the workflow restarts from the first node and
completes to the end. I expected that the workflow would start at the
persisted location. What am I missing here?
Scott Stevenson
15 years
from clause in decision table.
by Swindells, Thomas
I've got a fact which contains a collection (a set of strings to be
precise). I want to write a rule which fires if there are any invalid
values (where the valid values are defined as a list).
What I'm trying to do is express this within a decision table.
Expressed as a drl rule the following works:
rule "ValidateList"
when
Fact(col : collection != null)
String(this not in ($param)) from col
Then
#generate error
End
Where $param = '"1", "3", "valid"'
The decision tables seem to assume that the fact type is the last
element in the line and then appends "( conditions... )" this means
there is no way to then insert a "from ..." after it.
Does anybody know either a different way to structure the rule so that I
don't need a from or a way to get the decision table to use it?
(unfortunately adding the collection directly as a fact isn't an
option).
Thanks,
Thomas
**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster(a)nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************
15 years
Multiple Excel decisiontables - a bug
by satjo
I think following is a bug and I would like to how different users think
Issue: If there are multiple Excel decisiontables files, i.e, NOT multiple
decision tables in a single spreadsheet, then the 'fireall' does not
necessarily give right results as the rule names get repeated in the
resolved drl file.
How to produce?:
One can produce this issue adding multiple Excel files in Knowledbuilder and
also one can see the same problem in Guvnor when one uploads multiple Excel
decision tables.
Reason for the behavior:
The rule name (with row number post fix) gets repeated if all the
spreadsheets for the given model.
Let us say if I have a model 'com.sample.Test' and two spreadsheet decision
tables use this model, then the final resolved drl file would have two rules
with the same name, e.g. Test_11 etc.
I looked into the code 'org.drools.template.model' and name is not unique
between different spreadsheets.
If this name is unique, e.g. name of the spreadsheet (presuming each
spreadsheet is having unique name), then I do get correct results.
I want to know if any one has similar experience or comments.
--
View this message in context: http://old.nabble.com/Multiple-Excel-decisiontables---a-bug-tp26408909p26...
Sent from the drools - user mailing list archive at Nabble.com.
15 years
Need Syntax help for a string match
by Lindy hagan
Need to do some tasks if customers age is in 18,21,33,28,40,41. Can't use
contains as age is a string value.Could any one help me out. Below rule does
not work.
rule "Age Factor"
when
m : Customer( age matches "18,21,33,28,40,41")
then
System.out.println("Customer falls in age group ");
doAgeTasks();
end
Thanks,
Lindy.
15 years