[JBoss Web Services] - ManagedEndpointMBean not stopping WebService
by anemerov
anemerov [https://community.jboss.org/people/anemerov] created the discussion
"ManagedEndpointMBean not stopping WebService"
To view the discussion, visit: https://community.jboss.org/message/779690#779690
--------------------------------------------------------------
I am running a webservice managed by a ManagedEndpointMBean and it seems like all of the functions are working properly besides stop(). All of the web service statistics are showing up properly, and the stop time is being set but when I set a service to be stopped the web service can still be accessed. Below is the code I am using for creating an MBean:
MBeanServer server = MBeanServerLocator.locate();
try {
return (ManagedEndpointMBean) MBeanProxyExt.create(ManagedEndpointMBean.class, path, server);
} catch (MalformedObjectNameException e) {
log.error("Error in findWSMBean", e);
}
return null;
I am simply running ManagedEndpointMBean.stop() on the services when it is manually configured to do so. If anyone has any idea what might be causing this it would be greatly appreciated.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/779690#779690]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years
[jBPM] - getVariable and setVariable
by minslay minslay
minslay minslay [https://community.jboss.org/people/minslay] created the discussion
"getVariable and setVariable"
To view the discussion, visit: https://community.jboss.org/message/779611#779611
--------------------------------------------------------------
Hello,
I'm newbie with jBPM and I'm stuck with something I think it's easy but it doesn't work.
I'm trying define a process dynamically with Process API. I want to insert a variable into my actionNode so, I create a HashMap and I use kcontext.getVariable().
Now I get my variable into my actionNode and I can use it.
Then I want to modify (or create a new variable) my variable and its value. I don't know how to modify it and use kcontext.setVariable(); also I dont know how to recover that value in my java code.
Here my code
HashMap<String, Object> processParameters = new HashMap<String, Object>();
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
RuleFlowProcessFactory factoryP1 = RuleFlowProcessFactory.createProcess("org.jbpm.Process1");
// My variable and value
processParameters.put("result",5);
factoryP1.name("Process1").version("1.0").packageName("org.jbpm")
.imports("java.util.HashMap")
// creating a new var
.variable("resultReceived", new ObjectDataType("java.lang.Integer"))
.startNode(1).name("Start").done()
.actionNode(2).name("Action")
// I receive my variable from java Code with kcontext.getVariable
// and modify its value (now:6)
.action("java", "resultReceived = (Integer) kcontext.getVariable(\"result\")+1;" +
"System.out.println(resultReceived);" +
// I put my new variable with kcontext.setVariable
"kcontext.setVariable(\"resultReceived\", resultReceived);").done()
// another actionNode.
.actionNode(3).name("Action")
.action("java","System.out.println(\"Another Node \");").done()
.endNode(4).name("End").done()
// Connections
.connection(1, 2)
.connection(2, 3)
.connection(3, 4);
RuleFlowProcess process1 = factoryP1.validate().getProcess();
kbuilder.add(ResourceFactory.newByteArrayResource(
XmlBPMNProcessDumper.INSTANCE.dump(process1).getBytes()),
ResourceType.BPMN2);
KnowledgeBase kbase = kbuilder.newKnowledgeBase();
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
ProcessInstance processInstance = ksession.startProcess("org.jbpm.Process1",processParameters);
// and now... How can I get resultReceived from actionNode???
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/779611#779611]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years
[jBPM] - How to automatically claim a human task after process start
by Travers Snyman
Travers Snyman [https://community.jboss.org/people/tsnyman] created the discussion
"How to automatically claim a human task after process start"
To view the discussion, visit: https://community.jboss.org/message/779600#779600
--------------------------------------------------------------
We have recently upgraded to JBPM 5.4 and have come up with an interesting situation.
When we start a process, the next node is a human task and we need to claim the task automatically by the user that created the process. This used to work in version 5.3, but in version 4 it seems that we try to claim the task before the task server (in our case Mina task server) has actually created the human task. The code snippet involved is something like the following
ProcessInstance processInstance = knowledgeSession.startProcess(processName, params);
BlockingTaskSummaryResponseHandler responseHandler = new BlockingTaskSummaryResponseHandler();
taskClient.getTasksAssignedAsPotentialOwner(userId, "en-uk", responseHandler);
responseHandler.waitTillDone(2000);
List<TaskSummary> tasks = responseHandler.getResults() ;
if (!tasks.isEmpty()) {
TaskSummary taskSummary = tasks.get(0);
Long tasId = taskSummary.getId();
BlockingTaskOperationResponseHandler responseHandler = new BlockingTaskOperationResponseHandler();
taskClient.claim(taskId, userId, responseHandler);
responseHandler.waitTillDone(2000);
}
If I put in a manual delay just after the process is started, it works correctly, so it looks like I need some signal from the task server that the task is created before looking it up and claiming it with
getTasksAssignedAsPotentialOwner but thus far I have been unable to find a way to do this.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/779600#779600]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years
[jBPM] - jBPM BPMN2.0 eclipse creates xsi schema references that cannot be found
by Travers Snyman
Travers Snyman [https://community.jboss.org/people/tsnyman] created the discussion
"jBPM BPMN2.0 eclipse creates xsi schema references that cannot be found"
To view the discussion, visit: https://community.jboss.org/message/775761#775761
--------------------------------------------------------------
Hi
I am using the bpmn eclipse plugin (Indigo) to draft a business process. In the generated bpmn file, I see it generates the following xsi schema locations
<bpmn2:definitions
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
xmlns:bpmn2=" http://www.omg.org/spec/BPMN/20100524/MODEL http://www.omg.org/spec/BPMN/20100524/MODEL"
xmlns:bpmndi=" http://www.omg.org/spec/BPMN/20100524/DI http://www.omg.org/spec/BPMN/20100524/DI"
xmlns:dc=" http://www.omg.org/spec/DD/20100524/DC http://www.omg.org/spec/DD/20100524/DC"
xmlns:di=" http://www.omg.org/spec/DD/20100524/DI http://www.omg.org/spec/DD/20100524/DI"
xmlns:tns=" http://www.jboss.org/drools http://www.jboss.org/drools"
xsi:schemaLocation=" http://www.omg.org/spec/BPMN/20100524/MODEL http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd
http://www.omg.org/spec/DD/20100524/DC http://www.omg.org/spec/DD/20100524/DC
http://www.omg.org/spec/DD/20100524/DC-XMI http://www.omg.org/spec/DD/20100524/DC-XMI
http://www.omg.org/spec/DD/20100524/DI http://www.omg.org/spec/DD/20100524/DI
http://www.omg.org/spec/DD/20100524/DI-XMI http://www.omg.org/spec/DD/20100524/DI-XMI
http://www.omg.org/spec/BPMN/20100524/DI http://www.omg.org/spec/BPMN/20100524/DI
http://www.omg.org/spec/BPMN/20100524/DI-XMI http://www.omg.org/spec/BPMN/20100524/DI-XMI" id="Definitions_1" targetNamespace=" http://www.jboss.org/drools http://www.jboss.org/drools">
The issue is that when we deploy and run (on tomcat), except for the " http://www.omg.org/spec/BPMN/20100524/MODEL http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd schema documents could not be read - Errors as below:
(null: 439, 65): schema_reference.4: Failed to read schema document ' http://www.omg.org/spec/BPMN/20100524/DI-XMI http://www.omg.org/spec/BPMN/20100524/DI-XMI', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
(null: 440, 69): schema_reference.4: Failed to read schema document ' http://www.omg.org/spec/BPMN/20100524/DI-XMI http://www.omg.org/spec/BPMN/20100524/DI-XMI', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
(null: 441, 66): schema_reference.4: Failed to read schema document ' http://www.omg.org/spec/DD/20100524/DC-XMI http://www.omg.org/spec/DD/20100524/DC-XMI', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
(null: 443, 67): schema_reference.4: Failed to read schema document ' http://www.omg.org/spec/BPMN/20100524/DI-XMI http://www.omg.org/spec/BPMN/20100524/DI-XMI', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
(null: 444, 69): schema_reference.4: Failed to read schema document ' http://www.omg.org/spec/DD/20100524/DC-XMI http://www.omg.org/spec/DD/20100524/DC-XMI', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
If I remove the xsi:schema locations for the ones that cannot be found above manually in the bpmn file, it starts up fine. The problem is however everytime something is changed and saved on the diagram editor, the schema locations are put back into the file.
Does anyone know a way around this issue ?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/775761#775761]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years
[jBPM] - Create Custom Implementation for Human Task WorkItemHandler, Which class I should extend?
by Thomas Setiabudi
Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion
"Create Custom Implementation for Human Task WorkItemHandler, Which class I should extend?"
To view the discussion, visit: https://community.jboss.org/message/779508#779508
--------------------------------------------------------------
Hi,
I use JBPM5.4 Full installer, my Human Task Server that comes with the installer is using HornetQ.
I have a requirement where I need to get data from other application just before a human task is created. This data will be saved inside the newly created human task.
Currently, my idea is to make a custom implementation for Human Task WorkItemHandler and register it to the console's CustomWorkItemHandlers.conf like this:
[
Log: new org.jbpm.process.instance.impl.demo.SystemOutWorkItemHandler(),
Human Task: new my.custom.human.task.CustomHTWorkItemHandler(),
]
My questions are:
1. By doing it this way, will the console use my custom implementation whenever a human task needs to be created?
2. Because I just want to get data before task is created and add that data on the task, that means all the implementation of default Human Task Work Item Handler should be the same, I think I can just extend the existing class, but which one? I got confused to choose which class that I should extend: GenericHTWorkItemHandler? AsyncGenericHTWorkItemHandler? AbstractHTWorkItemHandler? HornetQHTWorkItemHandler? AsyncHornetQHTWorkItemHandler? or maybe some other class?
Any help is appreciated.
Regards,
Thomas Setiabudi
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/779508#779508]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years