process stopped after a service task (MongoDB connector)

1
0
-1

hello,

my process is composed of 3 steps:
1- human task: add data in a form
2- a service task with a MongoDB Connector to add data in the mongoBase
3- another human task
data are added successfully but the third step does not appear, the process is blocked in the service task.
i don't understand what is the source of the problem.
can anybody suggest me a solution?

i will be very grateful.

Asma

Comments

Submitted by Sean McP on Mon, 04/10/2017 - 00:37

You have a problem.

What does the log say?

Submitted by asmahassani on Mon, 04/10/2017 - 01:06

after the service task this text appear : No task available for this case .
i don't knew why !!

Submitted by asmahassani on Mon, 04/10/2017 - 01:06

after the service task this text appear : No task available for this case .
i don't knew why !!

Submitted by asmahassani on Mon, 04/10/2017 - 01:15
at org.bonitasoft.connector.MongoDBConnectorImpl.executeBusinessLogic(MongoDBConnectorImpl.java:133)
at org.bonitasoft.engine.connector.AbstractConnector.execute(AbstractConnector.java:77)
at org.bonitasoft.engine.core.connector.impl.SConnectorAdapter.execute(SConnectorAdapter.java:73)
at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl$ExecuteConnectorCallable.call(ConnectorExecutorImpl.java:205)
at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl$ExecuteConnectorCallable.call(ConnectorExecutorImpl.java:176)
at java.util.concurrent.FutureTask.run(Unknown Source)
... 3 more
Submitted by Sean McP on Mon, 04/10/2017 - 04:45

that's it? nothing more?

Can you share the process and I'll have a look?

Submitted by asmahassani on Mon, 04/10/2017 - 12:24
Submitted by asmahassani on Wed, 04/12/2017 - 11:41

please, I need help
can anyone have an idea?
thanks in advance.

Submitted by Sean McP on Wed, 04/26/2017 - 04:46

When exporting please ONLY export the ONE process you are having issues with - you've exported everything, I haven't got time to go through everything...

regards

1 answer

1
0
-1

Hi,

It seems that you have an issue during the execution of the MongoDB Connector. Most likely during the connection to the MongoDB.

Looking at the connector code:

Map<String, Object> result = MongoDBConnectorExt.mongoWork(getMongoGeneration(), getIpAddress(), getPort(), getDbName(), getDoAuth(), getUsername(), getPassword(), getCollection(), getCrud(), getData(), getSearch(), getLimit());
                        if(result != null) {
                                MongoDBResult finalResult = new MongoDBResult();
                                finalResult.setStatus(-1);
                                finalResult.setDocumentsList(null);
                                finalResult.setError(null);
                                if(result.containsKey(MongoDBConnectorExt.STATUS_STR)) {
                                        finalResult.setStatus(Integer.parseInt(result.get(MongoDBConnectorExt.STATUS_STR).toString()));
                                }
                                if(result.containsKey(MongoDBConnectorExt.RESULT_STR)) {
                                        finalResult.setDocumentsList((List<String>)result.get(MongoDBConnectorExt.RESULT_STR));
                                }
                                if(result.containsKey(MongoDBConnectorExt.ERROR_STR)) {
                                        finalResult.setError(result.get(MongoDBConnectorExt.ERROR_STR).toString());
                                }
                                setResult(finalResult);
                        }

The line 133 that fails in the connector is the line 14 in this above snippet. You can access the source code by the menu Development -> Connectors -> Edit implementation.

Did you follow the tutorial described here: http://community.bonitasoft.com/mongo-db-connector ?

Cheers

Comments

Submitted by asmahassani on Wed, 04/26/2017 - 14:33

Thanks Lionel ,

i have the same code!! what should i change in the source code of the mongodb connector implementation?

Submitted by asmahassani on Wed, 09/06/2017 - 10:33

hello,
the problem still persist !!
im blocked

Submitted by antoine.mottier on Thu, 09/07/2017 - 09:23

Maybe you can share the full log file (using Google Drive, Dropbox...). It might contains useful information to debug.

Also please avoid to post a new answer to the question and rather add a comment to the question or to an answer.

Submitted by asmahassani on Thu, 09/07/2017 - 14:25

hello,
I don't know if the problem is because of my false implementation of bonita or because of the configuartion's mongoDB connector which blocks everything!!

2017-09-07 12:02:20.323 +0100 INFOS: org.bonitasoft.engine.scheduler.impl.BonitaJobStoreCMT Handling 1 trigger(s) that missed their scheduled fire-time.
2017-09-07 13:03:46.628 +0100 INFOS: org.bonitasoft.engine.api.impl.transaction.process.DisableProcess THREAD_ID=677 | HOSTNAME=asus | TENANT_ID=1 | The user <walter.bates> has disabled process in version <1.0> with id <5539728479835653697>
2017-09-07 13:03:51.637 +0100 INFOS: org.bonitasoft.engine.api.impl.ProcessManagementAPIImplDelegate THREAD_ID=74 | HOSTNAME=asus | TENANT_ID=1 | The user <walter.bates> has deleted process with id = <5539728479835653697>
2017-09-07 13:03:57.777 +0100 INFOS: org.bonitasoft.engine.bar.BusinessArchiveServiceImpl THREAD_ID=65 | HOSTNAME=asus | TENANT_ID=1 | The user <walter.bates> has installed process in version <1.0> with id <9146625383281833620>
2017-09-07 13:03:58.421 +0100 INFOS: org.bonitasoft.engine.api.impl.transaction.process.EnableProcess THREAD_ID=65 | HOSTNAME=asus | TENANT_ID=1 | The user <walter.bates> has enabled process in version <1.0> with id <9146625383281833620>
2017-09-07 13:04:12.045 +0100 INFOS: org.bonitasoft.engine.api.impl.ProcessStarter THREAD_ID=63 | HOSTNAME=asus | TENANT_ID=1 | The user <walter.bates> has started the process instance <56022> of process in version <1.0> and id <9146625383281833620>
2017-09-07 13:04:12.501 +0100 INFOS: org.bonitasoft.connector.MongoDBConnectorImpl super validateInputParameters done.
2017-09-07 13:04:28.662 +0100 INFOS: org.bonitasoft.engine.external.web.forms.ExecuteActionsAndTerminateTask THREAD_ID=63 | HOSTNAME=asus | TENANT_ID=1 | The user <walter.bates> has executed the task [name = , display name = , id = <1140105>, parent process instance = <56022>, root process instance = <56022>, process definition = <9146625383281833620>]
2017-09-07 13:04:38.838 +0100 INFOS: org.bonitasoft.engine.external.web.forms.ExecuteActionsAndTerminateTask THREAD_ID=679 | HOSTNAME=asus | TENANT_ID=1 | The user <walter.bates> has executed the task [name = , display name = , id = <1140106>, parent process instance = <56022>, root process instance = <56022>, process definition = <9146625383281833620>]
2017-09-07 13:07:36.189 +0100 INFOS: org.bonitasoft.engine.api.impl.transaction.process.DisableProcess THREAD_ID=73 | HOSTNAME=asus | TENANT_ID=1 | The user <walter.bates> has disabled process in version <1.0> with id <9146625383281833620>
2017-09-07 13:07:37.423 +0100 INFOS: org.bonitasoft.engine.api.impl.ProcessManagementAPIImplDelegate THREAD_ID=677 | HOSTNAME=asus | TENANT_ID=1 | The user <walter.bates> has deleted process with id = <9146625383281833620>
2017-09-07 13:07:40.524 +0100 INFOS: org.bonitasoft.engine.bar.BusinessArchiveServiceImpl THREAD_ID=73 | HOSTNAME=asus | TENANT_ID=1 | The user <walter.bates> has installed process in version <1.0> with id <4912826801597741374>
2017-09-07 13:07:43.470 +0100 INFOS: org.bonitasoft.engine.api.impl.transaction.process.EnableProcess THREAD_ID=73 | HOSTNAME=asus | TENANT_ID=1 | The user <walter.bates> has enabled process in version <1.0> with id <4912826801597741374>
2017-09-07 13:07:49.543 +0100 INFOS: org.bonitasoft.engine.api.impl.ProcessStarter THREAD_ID=678 | HOSTNAME=asus | TENANT_ID=1 | The user <walter.bates> has started the process instance <56023> of process in version <1.0> and id <4912826801597741374>
2017-09-07 13:07:49.837 +0100 INFOS: org.bonitasoft.connector.MongoDBConnectorImpl super validateInputParameters done.
2017-09-07 13:10:44.907 +0100 INFOS: org.bonitasoft.engine.api.impl.transaction.process.DisableProcess THREAD_ID=677 | HOSTNAME=asus | TENANT_ID=1 | The user <walter.bates> has disabled process in version <1.0> with id <8605237128723087617>
2017-09-07 13:10:47.072 +0100 INFOS: org.bonitasoft.engine.api.impl.ProcessManagementAPIImplDelegate THREAD_ID=679 | HOSTNAME=asus | TENANT_ID=1 | The user <walter.bates> has deleted process with id = <8605237128723087617>
2017-09-07 13:10:50.388 +0100 INFOS: org.bonitasoft.engine.bar.BusinessArchiveServiceImpl THREAD_ID=677 | HOSTNAME=asus | TENANT_ID=1 | The user <walter.bates> has installed process in version <1.0> with id <8642730227556238203>
2017-09-07 13:10:51.039 +0100 INFOS: org.bonitasoft.engine.api.impl.transaction.process.EnableProcess THREAD_ID=62 | HOSTNAME=asus | TENANT_ID=1 | The user <walter.bates> has enabled process in version <1.0> with id <8642730227556238203>
2017-09-07 13:10:56.014 +0100 INFOS: org.bonitasoft.engine.api.impl.ProcessStarter THREAD_ID=1836 | HOSTNAME=asus | TENANT_ID=1 | The user <walter.bates> has started the process instance <56024> of process in version <1.0> and id <8642730227556238203>
2017-09-07 13:11:30.079 +0100 INFOS: org.bonitasoft.engine.external.web.forms.ExecuteActionsAndTerminateTask THREAD_ID=64 | HOSTNAME=asus | TENANT_ID=1 | The user <walter.bates> has executed the task [name = < add new mooc>, display name = < add new mooc>, id = <1140112>, parent process instance = <56024>, root process instance = <56024>, process definition = <8642730227556238203>]
2017-09-07 13:11:30.272 +0100 INFOS: org.bonitasoft.connector.MongoDBConnectorImpl super validateInputParameters done.
2017-09-07 13:11:31.369 +0100 GRAVE: org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork THREAD_ID=110 | HOSTNAME=asus | TENANT_ID=1 | The work [ExecuteConnectorOfActivity: flowNodeInstanceId = 1140113, connectorDefinitionName = create] failed. The failure will be handled.
2017-09-07 13:11:31.422 +0100 GRAVE: org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork THREAD_ID=110 | HOSTNAME=asus | TENANT_ID=1 | org.bonitasoft.engine.core.connector.exception.SConnectorException : "PROCESS_DEFINITION_ID=8642730227556238203 | PROCESS_NAME=Add Course | PROCESS_VERSION=1.0 | PROCESS_INSTANCE_ID=56024 | ROOT_PROCESS_INSTANCE_ID=56024 | FLOW_NODE_DEFINITION_ID=7900714779485438549 | FLOW_NODE_INSTANCE_ID=1140113 | FLOW_NODE_NAME=store in NoSQL database | CONNECTOR_IMPLEMENTATION_CLASS_NAME=create | CONNECTOR_INSTANCE_ID=880023 | org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: java.lang.NullPointerException"
org.bonitasoft.engine.core.connector.exception.SConnectorException: PROCESS_DEFINITION_ID=8642730227556238203 | PROCESS_NAME=Add Course | PROCESS_VERSION=1.0 | PROCESS_INSTANCE_ID=56024 | ROOT_PROCESS_INSTANCE_ID=56024 | FLOW_NODE_DEFINITION_ID=7900714779485438549 | FLOW_NODE_INSTANCE_ID=1140113 | FLOW_NODE_NAME=store in NoSQL database | CONNECTOR_IMPLEMENTATION_CLASS_NAME=create | CONNECTOR_INSTANCE_ID=880023 | org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: java.lang.NullPointerException
at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnectorInClassloader(ConnectorServiceImpl.java:275)
at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnector(ConnectorServiceImpl.java:148)
at org.bonitasoft.engine.connector.ConnectorServiceDecorator.executeConnector(ConnectorServiceDecorator.java:114)
at org.bonitasoft.engine.execution.work.ExecuteConnectorWork.work(ExecuteConnectorWork.java:138)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
at org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork.work(FailureHandlingBonitaWork.java:66)
at org.bonitasoft.engine.work.BonitaWork.run(BonitaWork.java:56)
at org.bonitasoft.engine.work.SequenceRunnableExecutor.innerRun(SequenceRunnableExecutor.java:47)
at org.bonitasoft.engine.work.BonitaRunnable.run(BonitaRunnable.java:35)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: java.lang.NullPointerException
at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl.execute(ConnectorExecutorImpl.java:125)
at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnectorInClassloader(ConnectorServiceImpl.java:269)
... 14 more
Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl.getValue(ConnectorExecutorImpl.java:149)
at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl.execute(ConnectorExecutorImpl.java:122)
... 15 more
Caused by: java.lang.NullPointerException
at org.bonitasoft.connector.MongoDBConnectorImpl.executeBusinessLogic(MongoDBConnectorImpl.java:133)
at org.bonitasoft.engine.connector.AbstractConnector.execute(AbstractConnector.java:77)
at org.bonitasoft.engine.core.connector.impl.SConnectorAdapter.execute(SConnectorAdapter.java:73)
at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl$ExecuteConnectorCallable.call(ConnectorExecutorImpl.java:205)
at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl$ExecuteConnectorCallable.call(ConnectorExecutorImpl.java:176)
at java.util.concurrent.FutureTask.run(Unknown Source)
... 3 more

Submitted by asmahassani on Sat, 09/09/2017 - 13:45

I'm sorry for putting the logs directly here
you will find the log file here
https://drive.google.com/open?id=0B0WoaR3VmniNaDhjU0M5eVh2VTQ

Submitted by asmahassani on Fri, 09/15/2017 - 19:02

Any suggestion?

Notifications