[jBPM] - Proposed temporary and limited approach to supporting excluded owners
by jemmerling
jemmerling [https://community.jboss.org/people/jemmerling] created the discussion
"Proposed temporary and limited approach to supporting excluded owners"
To view the discussion, visit: https://community.jboss.org/message/646719#646719
--------------------------------------------------------------
I have been looking at way to do the following within jBPM:
Have a node in a process definition be associated with a particular group (or groups), however due to the history of a given process, to exclude some actor(s) who might be members of that group.
Now the WS-HumanTask specification supports something called excluded owners. Here is a snippet from one version of this specification (not certain if it is the latest one):
+"Potential owners of a task are persons who receive the task so that they can claim and complete it. A potential owner becomes the actual owner of a task by explicitly claiming it. Before the task has been claimed, potential owners can influence the progress of the task, for example by changing the priority of the task, adding ad-hoc attachments or comments. All excluded owners are implicitly removed from the set of potential owners. A WS-HumanTask Definition MAY define assignment for this generic human role.+
+Excluded owners are are people who cannot become an actual or potential owner and thus they cannot reserve or start the task. A WS-HumanTask Definition MAY define assignment for this generic human role. "+
Although the jBPM5 schema supports the existence of excluded owners, I have seen no explicit mechanism to support this when developing an application. If there is something I am missing, please point this out.
In the meantime, I can see a way that a developer could add this functionality without the need to directly modify jBPM5, using the following approach. I would like to know whether it is believed this would work. I am not completely comfortable with this for reasons I will give (although these reasons should be more or less obvious):
1.) First, define a new work item parameter (or analogous mechanism) that represents users who will be excluded from the next node. Let's assume we can correctly identify the next node.
2.) Create a class that extends WSHumanTaskHandler. This class will override the executeWorkItem method. This method will populate excluded owners in the people assignments from having inspected the new parameter. It will otherwise be the same as the method it overrides except for this one additional logic step.
3.) Replace the existing Taskorm.xml with a modified version in which the TasksAssignedAsPotentialOwnerByGroup named query (and possibly some similar named queries) is modified so that excluded owners are not able to claim the task.
I believe all the above is feasible because a.) there is nothing to stop the developer from extending WSHumanTaskHandler in the described manner, and using it in the application code and b.) the ORM file is specified in persistence.xml which is a developer-configurable file, so the developer should be at liberty to specify a different file. So all this could be done without "hacking" jBPM directly.
However I am uncomfortable with this approach because the overridden executeWorkItem method as well as the replacement ORM file would be created using a copy-and-paste methodology so that when progressing to a later version of jBPM it would be necessary to modify these to reflect the original logic.
Nevertheless, if there is some intention to support this type of functionality in a future release of jBPM (and assuming I am right to conclude it is not currently supported) this might be a justifiable short-term solution.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/646719#646719]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 5 months
[EJB3] - Re: EJB 2.1 BMP with CMT and RequiresNew in JBoss AS 7.1.0 Final
by Daniel Zhelyazkov
Daniel Zhelyazkov [https://community.jboss.org/people/dzhelyazkov] created the discussion
"Re: EJB 2.1 BMP with CMT and RequiresNew in JBoss AS 7.1.0 Final"
To view the discussion, visit: https://community.jboss.org/message/728546#728546
--------------------------------------------------------------
Fixed my problem, after debug session of JBoss code it turned out that the code that parses TX attributes produces wrong info.
we had the folowing in ejb-jar.xml
<method>
<ejb-name>SomeEjb</ejb-name>
<method-name>*</method-name>
</method>
...
<trans-attribute>RequiresNew</trans-attribute>
Specified like that JBoss set default TX attribute Required to all LOCAL_HOME methods (ejbCreate/Find/Select/Home)
and RequiresNew to all Bean methods such as toString(), hashCode()...
by adding <method-intf>LocalHome</method-intf>
<method>
<ejb-name>SomeEjb</ejb-name>
<method-intf>LocalHome</method-intf>
<method-name>*</method-name>
</method>
all went to normal, my ejbCreate() started new transaction, and getProperties() method did not use TX interceptor.
So it looks like different or wrong loginc in JBoss, the code itself states it has some problems, and it looks targeted at EJB 3.x, it is not a separate code for 2.x
daniel
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/728546#728546]
Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 5 months
[JBoss AOP] - Re: ConcurrentModificationException during JBoss 5.0.1.GA st
by Andrew Boyd
Andrew Boyd [https://community.jboss.org/people/AndrewBoyd] created the discussion
"Re: ConcurrentModificationException during JBoss 5.0.1.GA st"
To view the discussion, visit: https://community.jboss.org/message/759599#759599
--------------------------------------------------------------
Hi All,
It is now 2013 and I'm running jboss-5.1.0.GA and I am getting the same exception with the same line numbers:
2012-09-13 16:53:24,379 ERROR [STDERR] (AOPListner) Exception in thread "AOPListner"
2012-09-13 16:53:24,409 ERROR [STDERR] (AOPListner) java.util.ConcurrentModificationException
2012-09-13 16:53:24,409 ERROR [STDERR] (AOPListner) at java.util.WeakHashMap$HashIterator.nextEntry(WeakHashMap.java:762)
2012-09-13 16:53:24,409 ERROR [STDERR] (AOPListner) at java.util.WeakHashMap$KeyIterator.next(WeakHashMap.java:795)
2012-09-13 16:53:24,409 ERROR [STDERR] (AOPListner) at org.jboss.aop.AspectManager.getAdvisors(AspectManager.java:537)
2012-09-13 16:53:24,409 ERROR [STDERR] (AOPListner) at org.jboss.console.plugins.AOPLister$RefreshPoller.run(AOPLister.java:891)
If anyone knows a work around that would be helpful.
Thanks,
Andrew
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/759599#759599]
Start a new discussion in JBoss AOP at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 5 months
[JBoss Web Services] - Is it possible to configure JAX-WS services with an external descriptor?
by Carlo Bonamico
Carlo Bonamico [https://community.jboss.org/people/carlo.bonamico] created the discussion
"Is it possible to configure JAX-WS services with an external descriptor?"
To view the discussion, visit: https://community.jboss.org/message/762155#762155
--------------------------------------------------------------
Hi,
I had to manage a situation similar to https://community.jboss.org/thread/146575 https://community.jboss.org/thread/146575 where a JBoss instance publishes a JaxWs service (annotated with @WebService) on plain http:// http:// on an internal network, and an external Apache httpd server with mod_proxy or mod_jk re-publishes the service over https:// https:// on the outside. The environment is JBoss-WS on JBoss AS 5.1.0.
In order to be able to rewrite the soap:address field in the WSDL I successfully followed @asoldano advice:
>Something else you might want to try is setting your soap:address to something like " https://replace-me/ https://REPLACE-ME", that should force the https protocol to be use in the soap:address when rewriting it. I think this probably has the side effect of overwriting the webServicePort you might want to >specify though.
Then enabled rewriting of the address in
jbossws.deployer/META-INF/jboss-beans.xml
<bean name="ServiceEndpointManager" class="org.jboss.ws.server.ServiceEndpointManager">
<!--
The WSDL, that is a required deployment artifact for an endpoint, has a <soap:address>
element which points to the location of the endpoint. JBoss supports rewriting of that SOAP address.
If the content of <soap:address> is a valid URL, JBossWS will not rewrite it unless AlwaysModifySOAPAddress is true.
If the content of <soap:address> is not a valid URL, JBossWS will rewrite it using the attribute values given below.
-->
<property name="webServiceHost">www.external.domain.com</property>
<property name="webServiceSecurePort">443</property>
<property name="alwaysModifySOAPAddress">true</property>
...
</bean>
In this way the resulting url exposed in the wsdl is https://www.external.domain.com/path/ https://www.external.domain.com/path/... which is what I needed to achieve.
However, apparently this only works for services which have an associated wsdl file provided by the developer (@WebService(wsdlLocation = "WEB-INF/...")) in the deployment. I would like to enable a similar behavior on services which have only the defining implementation class.
Is it possible to associate to an @WebService class an external deployment descriptor which only specifies soap:address and/or other specific jaxws parameters, without having to explcitely create (and obviously maintain over time) the wsdlby hand?
In general, I think that this scenario is not so uncommin, and it would be useful to have a parameter as suggested by @asoldano to simply enable rewriting of http:// into https://
>If nothing of this helps, please create a feature request jira. We might think about adding another configuration option (webServiceProtocol) and achieve what you want throught that.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/762155#762155]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 5 months