Hi!
I amended the email parsing script in a way that it extracts all the email recipients from the email and adds them as "Email Recipient" artifact.
Now I want to do a workflow condition based on the number of recipients. But how can I run through the artifacts?
I tried something like this but it didn't work:
counter = 0
for elem in list(artifact):
if artifact.type == "Email Recipient":
counter += 1
log.info(counter)
As with content type "incident" the object artifact is not recognized I tried it with content type "artifact". But then I have to manually choose one of the artifacts which is not the result I want (and by the way counter then gives a value of 19 althought there is only one artifact type with that type and value)
I also tried to solve this by a rule. Whenever an artifact of the type Email Recipient is created a field "number of recipients" should be incremented. But unfortunately the rule only let me set the field with an explicit number. There is no option to say... "take the field value and add 1"
Any ideas?
------------------------------
Achim Quehenberger
------------------------------