while in workflow

i Want to send jabber notif to all Assignees

while (Assignee[i] != null || i < 5) {
  Assignee[i].sendJabber("Issue" + getId() + "closed");
  i = i + 1;
}

Why a have an error Can't call method [sendJabber] on null object?

How to get count Assignee?
5 comments
Comment actions Permalink
Please try this:
var i = 0; 
for each assignee in Assignees { 
  if (i < 5) { 
    assignee.sendJabber(""); 
  } 
  i = i + 1; 
}
prettyPrint();

Unfortunately you cannot iterate collection as arrays, but only by for-each.
0
Comment actions Permalink
if (i < 0)

Why if i < 0?

And can i get a username, who is updated issue?
0
Comment actions Permalink
for each works) Thanks!

And can i get a username, who is updated issue?
0
Comment actions Permalink
And can i get a username, who is updated issue?

loggedInUser.login
0

Please sign in to leave a comment.