CAMUNDA & Email-Handling - In Search of Template or Tutorial

500 views
Skip to first unread message

Dieter Rueffler

unread,
Jun 24, 2015, 2:26:25 AM6/24/15
to camunda-...@googlegroups.com

Dear Community,


I am new to Camunda and about to do my first evaluating development.

I want to develope a mail-filter process application without user tasks.


I need to know how to poll gmail and how to send gmail.

When polling a mail account I expect to receive lists of mails and not only a single mail.

So I need a looping capability: loop over mail list in order to handover single mails for processing.

Processing can be simple: Asign string values to variable: (1) subject, (2) body

Filtering should be done by condition attached to Data-XOR:

(1) subject contains "A" or ""B"    

(2) not(subject contains "C" or ""D")

(3) body contains "A" or ""B" 

(4) not(body contains "C" or ""D")   



I would be happy to receive hints to templates or guides that contain building blocks for this process idea.


Regards,
Dieter


thorben....@camunda.com

unread,
Jun 24, 2015, 5:58:48 AM6/24/15
to camunda-...@googlegroups.com
Hi Dieter,

In general, I can recommend the BPMN implementation guide in the docs [1]. Especially the section on how to implement service tasks in Java may be of interest for your case [2]. An example project can be found under [3].

Regarding the looping, you can either implement that in code (see the docs on service task implementation) or model it using BPMN constructs like multi-instance [4]. Some general introduction on looping/parallel constructs in BPMN can be found in the BPMN reference [5].

I hope that helps getting started.

Cheers,
Thorben

[1] http://docs.camunda.org/latest/api-references/bpmn20/
[2] http://docs.camunda.org/latest/api-references/bpmn20/#tasks-service-task
[3] https://github.com/camunda/camunda-bpm-examples/tree/master/servicetask/service-invocation-synchronous
[4] http://docs.camunda.org/latest/api-references/bpmn20/#tasks-task-markers-multiple-instance
[5] http://camunda.org/bpmn/reference/#activities-task

webcyberrob

unread,
Jun 24, 2015, 7:08:03 AM6/24/15
to camunda-...@googlegroups.com
Hi,

In addition to Thorbens references, this example may be of interest...


regards

Rob

Dieter Rueffler

unread,
Jun 24, 2015, 5:44:30 PM6/24/15
to camunda-...@googlegroups.com


Hi, 

I redraw my mail-filter-process with CAMUNDA. When drawing it - it came to my mind that polling, processing and sending mails would be better performed by a script task than by a service task. Ain't it?

I tried to specify conditions: (1) default at XOR-symbol (2) condition at sequence ...there was no guidance which languages are available - I used "JavaScript" - a drop-down menue would be helpful...



I checked "Is Executable" with "Mail Filter Service" ...there is no change of color for that pool, which is executable now - so sad...

...drawing message-flow-lines and associations is pretty uneasy strange curve shapes flip over canvas

I have no clue how to set up the timed start event 


Is there a camunda for dummies covering "conditions", timed start, reusing java and the like?


Regards, Dieter

Dieter Rueffler

unread,
Jun 25, 2015, 4:43:17 AM6/25/15
to camunda-...@googlegroups.com
I took a look at camunda-swim-lane properties. I expectet properties to store credentials to be forwarded or used by user tasks or service tasks. But there is no such thing. So camunda swim lanes do not deliver infos for process execution - is that right?

thorben....@camunda.com

unread,
Jun 30, 2015, 12:02:41 PM6/30/15
to camunda-...@googlegroups.com
Hi Dieter,

I don't think swimlane properties are the right place where to put these things. In Camunda, we have the concept of process variables, see [1] for documentation. With every process instance you start, you can hand over a set of variables and use that in for example the service task implementations. The benefit of this approach is that the process model becomes reusable, meaning that it is not tied to a static set of credentials and you can have many process instances with different configurations.

Best regards,
Thorben
Reply all
Reply to author
Forward
0 new messages