Workflow Task Ownership Class
From ISV Support Wiki
Workflow Task Ownership Class
A class that implements the WorkflowTaskOwner interface can programatically specify a Task Owner for a record in a Workflow state. That interface defines a method that takes the record as an argument, and returns an array of user IDs.
- Learn more: Assigning Task Owners in a Workflow state
Sample Program
- package com.platform.test.workflow;
import com.platform.api.*;
import com.platform.api.workflow.*;
public class OrderTaskOwner implements com.platform.api.workflow.WorkflowTaskOwner
{
/**
* Return a list of task owners.
*
* @param params Record details, including workflow_state and other fields.
* @return an array of User IDs.
*/
public String[] getTaskOwners(Parameters params)
{
if(params.get("source").equals("web"))
{
// Give it to the person who handles orders that come in over the web.
String[] arr = {"eex040fxf3384ff49366f7378dx5c6dx"};
return arr;
}
return null;
}
}