Unified Change Management

Rule Method Requirements

Workflow Assignment Rule methods must follow specific requirements to receive context information and create assignments correctly.

Input

Rules run against:

  • A Workflow Process ( Target = “Workflow”) or
  • An Activity ( Target = “Activity”)

Context is provided via:

// Context attributes passed by the rule execution engine
string contextTypeId = this.getAttribute(“context_type_id”); // ItemType ID of CPD-controlled item
string contextItemId = this.getAttribute(“context_item_id”); // Item ID of CPD-controlled item

This allows rules to inspect the source Change Item (e.g., CO, CR, CT) and its data.

Expected Behavior

Rule methods must:

  1. Load context item (if needed)
  2. Check existing assignments
  3. Determine correct assignees based on business logic
  4. Add, update, or remove Activity Assignments
  5. Return success or error

Return Values

Rule methods must return either a success result or an error:

Success:

return this; // Return the original item
// Or
return inn.newResult(“Created 3 assignments successfully”);

Error:

return inn.newError(“No manager found for user”); // SOAP Fault - recommended
// Or
throw new Exception(“Database connection failed”); // Exception - critical errors only

See Section 7.4.2 for detailed error handling strategy and best practices.