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:

  1. Map<String, Object> result = MongoDBConnectorExt.mongoWork(getMongoGeneration(), getIpAddress(), getPort(), getDbName(), getDoAuth(), getUsername(), getPassword(), getCollection(), getCrud(), getData(), getSearch(), getLimit());
  2. if(result != null) {
  3. MongoDBResult finalResult = new MongoDBResult();
  4. finalResult.setStatus(-1);
  5. finalResult.setDocumentsList(null);
  6. finalResult.setError(null);
  7. if(result.containsKey(MongoDBConnectorExt.STATUS_STR)) {
  8. finalResult.setStatus(Integer.parseInt(result.get(MongoDBConnectorExt.STATUS_STR).toString()));
  9. }
  10. if(result.containsKey(MongoDBConnectorExt.RESULT_STR)) {
  11. finalResult.setDocumentsList((List<String>)result.get(MongoDBConnectorExt.RESULT_STR));
  12. }
  13. if(result.containsKey(MongoDBConnectorExt.ERROR_STR)) {
  14. finalResult.setError(result.get(MongoDBConnectorExt.ERROR_STR).toString());
  15. }
  16. setResult(finalResult);
  17. }

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?

Testing
Notifications