-
1. Re: Sanity Check 0.7.0 Final - Visual Editor BPM Implementation
dward Jan 4, 2013 1:55 PM (in response to jeffdelong)I can address some of this:
- Yeah, I waffled on including the sessionId in the config. No matter what, though, is that precedence is given if sessionId is specified as a context property (most likely due to coming in as a soap header), just like processInstanceId is. Both processInstanceId and sessionId get returned as response headers when interacting with bpm processes. If you want to re-correlate back to it, you have to send those back in with subsequent requests. (Aside, in 0.8 we will support an application-specific business key / correlation id, as jbpm has added support for this, per my request.)
- MVEL expressions can be anything. Variables available within the expression itself is exchange, context, message. For <input> <mapping>s, the result of the expression will be available as a process instance variable using the name of the variable you specify in the <mapping> variable attribute.
- For SIGNAL_EVENT, specify the id attribute of the <action> tag. This is the signal id for the process.
- Properties are used for configuring the knowledge session, and are free form because I didn't want to support every single drools or jbpm property out there. So, this is how you would change from the default clock type, event processing type, etc. You're right, this is a bit advanced. So I figured if you're doing that kind of thing, you will know the drools options/properties you want to set.
- In 0.6 and prior, I tried abstracting the rules and bpm components, which led me to inventing the whole TaskHandler interface mess. Since I don't forsee us ever changing to implementations other than drools and jbpm, the abstractions are gone. So, in 0.7 and forward, you use the REAL jbpm WorkItemHandler classes instead. So, org.jbpm.process.workitem.wsht.MinaHTWorkItemHandler, for example.
- Yes, BAM is configured using a <listener class=""/> For example, org.jbpm.process.audit.JPAWorkingMemoryDbLogger is a jbpm event listener.
- I made sure that everything that can be configured in each of the rules and bpm components made sense to be there. In the end, only WorkItemHandlers and action types stood out as being component-specific. Per your specific example of Channels on a BPM component, this is actually possible. The use case is where rules gets executed as part of the process, and the rules inside the process need (a) registered channel(s).
Hope this helps,
David
-
2. Re: Sanity Check 0.7.0 Final - Visual Editor BPM Implementation
jeffdelong Jan 4, 2013 2:28 PM (in response to dward)David,
Thanks it does help and I will test some of these things out. I do request that for some of these meaningful defaults be available, i.e., the WorkItemHandler. Still not clear what should be specified here; the human task workitem handler or the switchyard workitem handler (I realize this is due to the funky way jBPM requires you to add workitem handlers to your session, but hey I am just a dumb user trying to configure my service, why do I care about this stuff?)
-
3. Re: Sanity Check 0.7.0 Final - Visual Editor BPM Implementation
dward Jan 4, 2013 3:14 PM (in response to jeffdelong)If you have SwitchYard Service nodes in your process, you need the SwitchYardServiceWorkItemHandler. If you have Human Task nodes in your process, you need one of jBPM's Human Task WorkItemHandlers.
FYI, there's also a SwitchYardServiceChannel, which does the same thing as the SwitchYardServiceWorkItemHandler. Both will invoke a SwitchYard service. The only difference, of course, is that one's a WorkItemHandler, and the other is a Channel.
-
4. Re: Sanity Check 0.7.0 Final - Visual Editor BPM Implementation
jeffdelong Jan 4, 2013 3:27 PM (in response to dward)Then I would like to see those two as listed options (better yet would be to default having both there, I don't think there is necessarily a harm in having them). It's great that there is flexibility in the jBPM API, but as a process / service designer I would rather not have to specify this except in some rare case I want to override the default behavior. Could we just list those two as there by default, and let the user change / remove them if they are smart enough? (I know I have argued to do away with the SY Service Task however when and if this happens we can remove it from the default list).
-
5. Re: Sanity Check 0.7.0 Final - Visual Editor BPM Implementation
rcernich Feb 19, 2013 9:13 PM (in response to jeffdelong)Sorry to resurrect this, but....as I look into how we might better integrate with the BPMN2 editor, I think I've come to a similar conclusion that Gary came to in this thread last summer: https://community.jboss.org/thread/200453?tstart=0
To summarize, if we're using ServiceTask, we should:
- Resolve the service using the name of the service associated with the interface (interface ref)
- Resolve the operation using the operation name (operation ref)
- Resolve I/O data types using the same convention as the default service implementation (i.e. Parameter, Result, Fault, as used by the default jBPM ServiceTaskHandler).
- Add our special sauce, as necessary (e.g. fault behavior, etc.)
In my opinion, this would provide an interaction model similar to generic service tasks.
Here's how I envision the basic workflow:
- User adds an interface to the process (name = SwitchYard service name)
- User adds SwitchYard service task to process (implementation = ##SwitchYard, operation = operation)
- User specifies "Parameter" DataInput
- User specifies "Result" DataOutput
- User specifies "Fault" DataOutput
The above assumes there is a component reference declared for every interface used by ServiceTasks. This aligns nicely with other implementation types (e.g. CDI @Reference, BPEL partner link, etc.).
At the risk of being permanently disfigured at the upcoming F2F, I ask, what do you think?
-
6. Re: Sanity Check 0.7.0 Final - Visual Editor BPM Implementation
dward Feb 20, 2013 11:41 AM (in response to rcernich)1-5 will just need to align with the "SwitchYard Service Task Properties" documented in the panel at the bottom of this page: BPM Services.
-
7. Re: Sanity Check 0.7.0 Final - Visual Editor BPM Implementation
rcernich Feb 20, 2013 12:27 PM (in response to dward)Hey David,
I think the issue is that dilutes any benefit you might get from using ServiceTask. The way we're doing things, ServiceTask is nothing more than a custom task that extends ServiceTask instead of Task. It makes no use of the built-in support for specifying service operations that is provided by ServiceTask (the main being interface and operation). It also changes the idea of ServiceTask when it applies to a SwitchYard service. From your doc, here's how I see a better alignment:
- ServiceName - interface name (workItem.getParameter("interfaceImplementationRef"))
- ServiceOperationName - operation name (workItem.getParameter("operationImplementationRef"))
- ContentInputName - use "Parameter" same as default ServiceTask (workItem.getParameter("Parameter"))
- ContentOutputName - use "Result" same as default ServiceTask (output.put("Result", result))
Modifying our integration will allow users to use the existing ServiceTask tooling. The benefit is that this is the same workflow they would use for defining any other ServiceTask.
We would continue to provide extra properties for fault handling (but I suspect there is probably a more appropriate default for passing the fault message back to the process).
Best,
Rob
-
8. Re: Sanity Check 0.7.0 Final - Visual Editor BPM Implementation
rcernich Feb 20, 2013 3:27 PM (in response to rcernich)One thing that using ServiceTask natively does not address is dynamic invocation of services based on routing information from other parts of the process. To support this, I recommend continuing to use the custom Task, but change the name to something like "SwitchYard Dynamic Service Task." So...
- SwitchYard Service Task - based on ServiceTask and provides semantics similar to the generic ServiceTask.
- SwitchYard Dynamic Service Task - based on Task and allows users to fully customize/configure a service invocation.
-
9. Re: Sanity Check 0.7.0 Final - Visual Editor BPM Implementation
jeffdelong Feb 20, 2013 10:57 PM (in response to rcernich)+1
-
10. Re: Sanity Check 0.7.0 Final - Visual Editor BPM Implementation
dward Mar 4, 2013 9:59 AM (in response to rcernich)I've created SWITCHYARD-1332 to make this change in the runtime. SWITCHYARD-827 depends on it.
-
11. Re: Sanity Check 0.7.0 Final - Visual Editor BPM Implementation
dward Mar 6, 2013 4:46 PM (in response to dward)Pull request submitted for SWITCHYARD-1332.
-
12. Re: Sanity Check 0.7.0 Final - Visual Editor BPM Implementation
rcernich Mar 20, 2013 2:38 PM (in response to dward)Attached are a couple screen shots showing the custom property pages for a SwitchYard ServiceTask. The first is how it is displayed by default (result and fault sections collapsed); the second shows all the controls. I still have a bit of work left to do and it does require some updates to the core bpmn editor, but we're getting there.
Let me know what you think.
Rob
-
13. Re: Sanity Check 0.7.0 Final - Visual Editor BPM Implementation
rcernich Mar 20, 2013 9:09 PM (in response to rcernich)Here's a screen shot of the custom tab for the dynamic service task (based on Task[@taskName=SwitchYard Service]). By default, ContentInputName is initialized to ContentInput and ContentOutputName is initialized to ContentOutput. It is the user's responsibility to create a DataInput and DataOutput objects for these two fields. The user will also have to initialize ServiceName and ServiceOperationName fields appropriately. The user can do this by either mapping to a process variable or specifying an expression.
-
14. Re: Sanity Check 0.7.0 Final - Visual Editor BPM Implementation
dward Mar 20, 2013 9:16 PM (in response to rcernich)The property names start with an uppercase "C", the default property values should start with a lowercase "c".
Sorry, I know this is yucky. For 1.0, I'd like to rename them to ParameterName=(default is "Parameter") and ResultName=(default is "Result") to be more like the standard serviceTask.