[rules-users] 5.1M2 release notes? Feature-complete?
Are release notes available for 5.1M2? Is 5.1M2 feature-complete - that is, does everything that's intended to be in 5.1 work in 5.1M2, with the exception of a list of issues that's available somewhere (Jira?)? (Sorry if these are answered elsewhere - I did look!) Thanks, -Ed Staub -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/5-1M2-release-notes-Feature-complete-tp848323p848323.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Flow - handling multiple events of the same kind
salaboy wrote: > > Can you give us a use case for that situation? > Sure! The case is one where an asynchronous workitem - that is, one which doesn't call completeWorkItem from within executeWorkItem - creates messages which need to invoke additional business-process behavior. These could be made to invoke secondary processes, but there's a lot of economy in keeping their behavior within the same process - error-handling, external aborting, and monitoring are all a lot simpler. -Ed -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Flow-handling-multiple-events-of-the-same-kind-tp767773p773510.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Flow - handling multiple events of the same kind
salaboy wrote: > > Can you give us a use case for that situation? > Sure! The case is one where an asynchronous workitem - that is, one which doesn't call completeWorkItem from within executeWorkItem - creates messages which need to invoke additional business-process behavior. These could be made to invoke secondary processes, but there's a lot of economy in keeping their behavior within the same process - error-handling, external aborting, and monitoring are all a lot simpler. -Ed -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Flow-handling-multiple-events-of-the-same-kind-tp767773p773509.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Flow - handling multiple events of the same kind
If the same event-node is triggered twice with different data, the same variable will be recycled for the different data payloads. How does one ensure that data is not lost? My best guess is to follow the event node with a composite node, and copy the top-level variables into the composite's variable scope in the first sub-node of the composite. But I'm not sure whether I can guarantee that the composite will be able to do that before the engine handles the second event. Suggestions? -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Flow-handling-multiple-events-of-the-same-kind-tp767773p767773.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Access to globals from WorkItemHandlers?
tolitius wrote: > > I don't really understand why would not out of the Drools Flow box mapping > ( e.g. to="databaseCredetials" /> ) work for you. > Anatoly, It would, technically. It's actually a marketing problem that I'm trying to avoid! We are by no means settled on Drools. There are a lot of horror stories about rule-engine performance, and Drools in particular. I'm sure that most of them are based on bad design choices... but I'd like to avoid any smell of unnecessary rule-engine overhead. You probably can see where I'm going... in a forward-chaining engine like Drools, every introduction or mutation of a variable requires matching against the active rules. In the context of a normal workflow, I believe that this overhead is ridiculously trivial in the kind of use-case I've been talking about. But I'd prefer to avoid the discussion altogether! -Ed -- View this message in context: http://n3.nabble.com/Access-to-globals-from-WorkItemHandlers-tp732460p733062.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Access to globals from WorkItemHandlers?
tolitius wrote: > > If credentials come in to your flow in a "DatabaseCredetials" object, > I don't really see the problem to map this object into / out from workitem > handler using "Parameter in/out mapping": > Anatoly, Forget about flow, for the moment, and just consider rules. If you could roll back time, and didn't have to consider backward-compatibility, would you eliminate the ability to use globals in rule right-hand-side code? If not: Why not? And does the same logic not apply to the WorkItemHandler context? Is your message that "use of globals in any user code (rule right-hand-side or WorkItemHandler) is strongly deprecated, regardless of whether any alterations are made?" That's my interpretation. -Ed -- View this message in context: http://n3.nabble.com/Access-to-globals-from-WorkItemHandlers-tp732460p732999.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Access to globals from WorkItemHandlers?
@Anatoly, tolitius wrote: > >If WorkitemHandler has a reference to "getGlobal(String name)", that > means that there is a chance for workitem to change those globals, and > just by looking at the process definition ( since these variables are not > mapped visually [ XML ] ), there is no way to track that change. > That's true - but exactly the same, I believe, as in code under the right-hand-side of rules. The engine doesn't know if a rule mucks with the internals of a global either. "Don't run with scissors in your hand" shouldn't lead to the abolition of scissors on alternate Saturdays. tolitius wrote: > >And in your case, depending on what design you adhere to (DDD or > Service -> DAO), I would create a service that would be able ( through > specific DAO(s) ) to access DB, and _inject_ that service into workitem > handler [ or in case of DDD, if that is a behavior of the entity, workitem > handler will have a reference to that entity ]. > Sorry, but I'm not sure what you're getting at... in the case I described, the credentials are supplied by the initiator of the process. Where exactly are you envisioning them being stored? In my case, the data is analogous to database credentials - not actually them - so specific design idioms that are specific to them aren't relevant. The credentials are for access to a thick access library that has its own data-access architecture. Touma wrote: > > One method of reading external data and outputting data would be to use > the 'Parameter Mapping' and 'Result Mapping' feature of handlers. > This only provides mapping to and from variables. What you're suggesting is, I think, exactly what I was asking for! -Ed -- View this message in context: http://n3.nabble.com/Access-to-globals-from-WorkItemHandlers-tp732460p732875.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Access to globals from WorkItemHandlers?
@Anatoly, Thanks for the feedback. >> If they have access to globals, they would become always stateful, which >>is not _always_ the desired behavior. I don't see this, any more than with any other data. If the WorkItem or WorkItemManager interface supplied a getGlobal(String name), and the WorkItemHandler doesn't stuff it away in a field or otherwise retain it as state, then it's not stateful - unless I'm missing something. >> But you can map all the variables into the handler, can't you? Yes, if I must. But some resources used by workitems need to be configured by either the process initiator or a process participant, yet don't make sense in the variable domain. Consider, e.g., a process where multiple workitems need to access a database - but the selection of database is up to the process initiator. The connection credentials don't really belong in a variable, at least as I understand the intended uses for globals and variables. -Ed -- View this message in context: http://n3.nabble.com/Access-to-globals-from-WorkItemHandlers-tp732460p732724.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Access to globals from WorkItemHandlers?
Do WorkItemHandlers not have access to globals by intent? In Flow, at least from my perspective, most of the usefulness of globals would be in WorkItemHandlers. They'd probably need their own map - or a way of flagging names in the "variable" map as globals - e.g., "*foo" means "the global foo". If there's no counter-argument, I'll put a request in Jira. BTW... thanks to the folks who contribute regularly here! -- View this message in context: http://n3.nabble.com/Access-to-globals-from-WorkItemHandlers-tp732460p732460.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to do Exception Handling???
salaboy wrote: > > Ed, feel free to contribute with documentation about how you implement > your > own mechanisms to handle exceptions. > I'm a newbie, I've never written a WorkItemHandler, I've just read the doc and tried to understand. I came away from the "Exceptions" section of the doc with no idea of whether or how it related to Java Exceptions, and they're not covered elsewhere. All I'm looking for (for now) is to simply throw into the docs (maybe in "8.2.4. Executing work items") what Kris said here, which I think boils down to: "WorkItemHandlers should not throw exceptions of any kind. If an exception is to be handled at the business process level, convert it into a Fault. The WorkItemHandler should also provide whatever other handling (logging, etc.) is desired." I'd also suggest renaming section 3.8 from "Exceptions" to "Faults", and talk about "Fault Handlers", not "Exception Handlers". It might make sense to provide an AbstractWorkItemHandler which wraps executeWorkItem() with sensible default behavior of some kind. But this is less important, IMHO. I agree that the mapping from Java exception to business-process semantics is fundamentally the responsibility of the WorkItemHandler. The framework can help, and can make clear that the responsibility exists -that's all. -Ed -- View this message in context: http://n3.nabble.com/How-to-do-Exception-Handling-tp689387p708851.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How to do Exception Handling???
tolitius wrote: > > would be cool to address real "Java" Exceptions (no matter what the > approach is) in Exception Handling section of the documentation > +1 -- View this message in context: http://n3.nabble.com/How-to-do-Exception-Handling-tp689387p708627.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Resuming the Flow: SESSION_ID, PROCESS_INSTANCE_ID, WORKITEM_ID
Salatino, Thanks for your responses. I don't see what's relevant in WSHT - but I wasn't very clear about the problem I'm trying to solve. We expect to be using Flow to glue together a lot of existing systems, with existing async API's, largely transported over JMS. They don't have a place to hold onto a Drools-provided correlation ID - they have ad hoc correlation ids constructable from common data in the request and response. We will need to map from these ad hoc ids to the workitem. >> Cool, are you planning to implement your own work Item? I haven't worked out where/how to wire this in yet. I was hoping someone might point me to this being "on the shelf" somewhere! -Ed -- View this message in context: http://n3.nabble.com/Resuming-the-Flow-SESSION-ID-PROCESS-INSTANCE-ID-WORKITEM-ID-tp607507p693778.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Resuming the Flow: SESSION_ID, PROCESS_INSTANCE_ID, WORKITEM_ID
I'm facing similar requirements, I think. In many cases the other systems that I'll be working with have no place to stuff a WorkItem Id, etc. I'm planning to implement a " http://www.eaipatterns.com/SmartProxy.html Smart Proxy ", which stores in a database a mapping from: - a unique set of data in the request and the response to - the session-id/process-id/workitem-id necessary to resume. When a response comes in, the table will be used for correlation. An event monitor will clean out the table entries when a given process terminates. The mapping may be stored as rules - I'm not sure yet. Thoughts? Experience? I'm a total drools-noob - this may make no sense. Thanks, -Ed Staub -- View this message in context: http://n3.nabble.com/Resuming-the-Flow-SESSION-ID-PROCESS-INSTANCE-ID-WORKITEM-ID-tp607507p693680.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Drools version(s) commercially supported by JBoss
Is the latest version of Drools commercially supported by JBoss 4.0.7? Can you guess when they/you will support 5.0? 5.1? (Please don't make me call them - that's the only sales contact mode they offer from the website!) Thanks very much, -Ed Staub -- View this message in context: http://n3.nabble.com/Drools-version-s-commercially-supported-by-JBoss-tp691677p691677.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users