I am working with Camudna Rest API to evaluate some decision which is integrated with a BPMN and its working with following API
I am using following APIs to start BPMN and analysing its result
http://localhost:8080/engine-rest/process-definition/key/myprocess/start
http://localhost:8080/engine-rest/variable-instance?executionIdIn=183a1df6-42f6-11e8-af85-a41f7279f6d8
Now i need to start and evaluated bulk of records (available in CSV) and i am doing the same by reading csv data using java and itearting over a loop and calling same the above APIs to process all recorsd in the CSV>
Is there any Camunda API available to process bulk operations for the above both cases or please suggest me a best practice for the same.
Thanks in advance
@jamsheer-thottathil can you have your Primary process load the CSV file and generate sub-process instances for each record in the CSV? Each Sub-process instance would process the record.
1 Like
How to load CSV to camunda, Is there any option to load csv to one process?
Thank You
@jamsheer-thottathil I am guessing you will have to code the “CSV loading” part yourself. If the CSV files concerned are accessible to the Camunda process engine then this should be a straight foreward matter.
In SephenOTT’s sample BMPN above, you could define the [Process row] step as a service task which executes the code (script/Java) to load the CSV file(s) and process it(them).
Take a look at:
The Camunda BPM examples
For an example using Java:
https://github.com/camunda/camunda-bpm-examples/tree/master/servicetask/service-invocation-synchronous
@jamsheer-thottathil take a look at:
CSV File writer: https://github.com/DigitalState/camunda-variations/tree/master/csv-file-writer
It has a example pof using Javascript to append a csv file. You can use the same API to read a CSV file and process your rows.