[jBPM] - I want use variable in my process, but it not work
by kklg
kklg [https://community.jboss.org/people/kklg] created the discussion
"I want use variable in my process,but it not work"
To view the discussion, visit: https://community.jboss.org/message/803953#803953
--------------------------------------------------------------
hi !
*when i put variable in map(data), my variableinstancelog table is nothing,*
public void completeTask(long taskId, Map<?, ?> data, String userId, Map<String, Object> results )
throws InterruptedException {
connect();
BlockingTaskOperationResponseHandler responseHandler = new BlockingTaskOperationResponseHandler();
client.start(taskId, userId, responseHandler);
responseHandler.waitTillDone(2000);
responseHandler = new BlockingTaskOperationResponseHandler();
ContentData contentData = null;
if (data != null) {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream out;
try {
out = new ObjectOutputStream(bos);
out.writeObject(*data*);
out.close();
contentData = new ContentData();
contentData.setContent(bos.toByteArray());
contentData.setAccessType(AccessType.Inline);
} catch (IOException e) {
e.printStackTrace();
}
}
client.complete(taskId, userId, contentData, responseHandler);
}
*but i add this code ,*
*when i put variable in map(+results+) ,it work,*
+ BlockingGetTaskResponseHandler responseHandlerGetTask = new BlockingGetTaskResponseHandler();+
+ client.getTask(taskId, responseHandlerGetTask);+
+ responseHandlerGetTask.waitTillDone(1000);+
+ Task task = responseHandlerGetTask.getTask();+
+ ksession.getWorkItemManager().completeWorkItem(+
+ task.getTaskData().getWorkItemId(), *results*);+
*I I do not understand, I see other people are like first code. I used jBPM5.4. Thanks For any help in adcance.*
*
*
*
*
*
*
h4.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/803953#803953]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
[jBPM] - No current status match exception.
by Dsire krish
Dsire krish [https://community.jboss.org/people/arselv] created the discussion
"No current status match exception."
To view the discussion, visit: https://community.jboss.org/message/755934#755934
--------------------------------------------------------------
I need to get the tasks by status and then start them.
But at some times while retrieveing the tasks im getting the started process id as well and thats in where im getting this exception.
org.jbpm.task.service.PermissionDeniedException: Server-side Exception: User '[User:'admin']' was unable to execution operation 'Start' on task id 287271 due to a no 'current status' match
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
My mina task handler is running in jboss and the application uses its client to the task operations.
Retrieveing tasks by status:
BlockingTaskSummaryResponseHandler resHandler = new BlockingTaskSummaryResponseHandler();
List<Status>statusls=new ArrayList<Status>();
statusls.add(Status.Reserved);
client.getTasksAssignedAsPotentialOwnerByStatus("admin",statusls, "en-UK", resHandler);
Starting the task:
BlockingTaskOperationResponseHandler responseHandler = new BlockingTaskOperationResponseHandler();
client.start(taskId, userId, responseHandler);
*Is there any thing to do with hibernate or what should i take care to eliminate this replication.?*
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/755934#755934]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
[Beginner's Corner] - Error initializing endpoint
by Govind Raju
Govind Raju [https://community.jboss.org/people/govindtis] created the discussion
"Error initializing endpoint"
To view the discussion, visit: https://community.jboss.org/message/754158#754158
--------------------------------------------------------------
Hi ,
This error on ubuntu 12.04 while starting JBOSS AS .
I stoped apache service on my mechine.
ERROR [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-4) Error initializing endpoint: java.net.BindException: Address already in use /127.0.0.1:8080
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:983) [jbossweb-7.0.13.Final.jar:]
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:190) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.connector.Connector.init(Connector.java:983) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:267) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_24]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_24]
at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_24]
11:00:09,862 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.web.connector.http: org.jboss.msc.service.StartException in service jboss.web.connector.http: JBAS018007: Error starting web connector
at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:271)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_24]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_24]
at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_24]
Caused by: LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use /127.0.0.1:8080
at org.apache.catalina.connector.Connector.init(Connector.java:985)
at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:267)
... 5 more
11:00:10,065 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-2) JBAS015012: Started FileSystemDeploymentService for directory /opt/jboss-as-7.1.1.Final/standalone/deployments
11:00:10,078 INFO [org.jboss.as.remoting] (MSC service thread 1-6) JBAS017100: Listening on /127.0.0.1:9999
11:00:10,078 INFO [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on /127.0.0.1:4447
11:00:10,248 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.web.connector.http: org.jboss.msc.service.StartException in service jboss.web.connector.http: JBAS018007: Error starting web connector
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/754158#754158]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years
[jBPM] - Custom WorkItemHandler - variables being converted to String
by Victor Tatai
Victor Tatai [https://community.jboss.org/people/vtatai] created the discussion
"Custom WorkItemHandler - variables being converted to String"
To view the discussion, visit: https://community.jboss.org/message/803788#803788
--------------------------------------------------------------
Hello,
I am in the process of implementing a custom WorkItemHandler which allows calling Spring bean methods. It is all working so far, except when I use an expression for setting a parameter such as:
<dataInputAssociation>
<targetRef>_3_Param3Input</targetRef>
<assignment>
<from xsi:type="tFormalExpression">#{processData}</from>
<to xsi:type="tFormalExpression">_3_Param3Input</to>
</assignment>
</dataInputAssociation>
(#{processData} is actually a java.util.Map)
then in my custom WorkItemHandler, when I do WorkItem#getParameters() for that parameter, it is there, but it is converted as a String - i.e., it is not a Map anymore.
I was actually able to debug and found this bit of code inside jBPM's WorkItemNodeInstance#createWorkItem():
Object variableValue = variableScopeInstance.getVariable(paramName);
String variableValueString = variableValue == null ? "" : variableValue.toString();
replacements.put(paramName, variableValueString);
I was actually able to see that variableValue is the map I am expecting, so the variable exists and is being located correctly. What seems odd to me is the conversion from variableValue to variableValueString by calling 'variableValue.toString()'.
Perhaps I'm doing something wrong in my WorkItemHandler, but I can't really see what. Please help!
For reference, my wid file is:
import org.drools.process.core.datatype.impl.type.StringDataType;
import org.drools.process.core.datatype.impl.type.ObjectDataType;
[
[
"name" : "Spring",
"parameters" : [
"Bean" : new StringDataType(),
"Method" : new StringDataType(),
"Param1" : new ObjectDataType(),
"Param2" : new ObjectDataType(),
"Param3" : new ObjectDataType(),
"Param4" : new ObjectDataType(),
"Param5" : new ObjectDataType(),
"Param6" : new ObjectDataType(),
"Param7" : new ObjectDataType(),
"Param8" : new ObjectDataType(),
"Param9" : new ObjectDataType()
],
"displayName" : "Spring",
"icon" : "icons/spring.png"
]
]
Thanks for the help,
Victor
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/803788#803788]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years