bil4l - Tuesday, August 7, 2012 2:50 PM:
Normal 0 false false false EN-US X-NONE X-NONE
reviewers = contItem.getItemsByXPath("Relationships/Item[@type='"+relName+"']");
for (int i=0; i<reviewers.getItemCount(); i++)
{
string identId = reviewers.getItemByIndex(i).getProperty("related_id","");
Item assignment = this.newItem("Activity Assignment","add");
assignment.setProperty("source_id", actId);
assignment.setProperty("related_id", identId);
assignment.setProperty("voting_weight", "100");
assignment.setProperty("is_required", "1");
assignment = assignment.apply();
if (assignment.getItemCount() != 1) return inn.newError("Error creating assignment: "+assignment.getErrorDetail());
}
newcomer - Thursday, August 9, 2012 9:14 AM:
two ways came to my mind when i read your post:
1: an onActivate method thats promotes the workflow to the next step if the assignee is the "workflow creator".
2: you have to change the workflow: before each workflow-approval-activity you can add a auto activity connected with the approval activity and the activity after the approval activity. the auto activity checks if an assignee is set for the approval activity or not and decides which road the item will take in the workflow.