What is this code for?

I see this code throughout methods in our instance of Aras, can someone tell me what this is for, and why an item needs to be re-activated?

Item q = this.newItem();
q.loadAML(" " + this.getAttribute("id") + " ");
q = q.apply();
//if (q.getItemCount()>0) return this;//The activity is reactivated.

  • Hi David,

    is this code part really contained in a standard Method of Aras? I cannot find a Method where this snipped is used.

    But I know that the Method PE_DynamicWorkflowAssignments (used in the Simple Change workflow) does something similar. This Method checks if there are Activity Assignments available already. It just adds the new Assignments if there are no one available yet. This is typically the case when you activate an Activity the first time.

    The Activity is reactivated when you do a reject of the Workflow. In this case Innovator shall not add the same Assignments again. So I assume this code part is used in the context of a rollback of the Activity.