getWFOwners

From LongJump Support Wiki
Revision as of 22:29, 20 December 2010 by imported>Aeric (Text replace - 'getWFOwners(' to 'Functions.getWFOwners(')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Identify current owners of a record in a workflow.

Syntax
Functions.getWFOwners(String objectName, String recordId)
where:
Return
RecordBean containing a list of IDs and names of record owners.
Example
This example lists current owner IDs and names for an EXPENSES record, depending on where it is in the workflow path.
Functions.debug("List workflow owners");
RecordBean rb = Functions.getWFOwners("EXPENSES", (String)requestParams.get("record_id"));
List<RecordBean.WorkflowOwners.WFOwner> owners = rb.getAvailableWFOwners().getOwners();
if (owners != null) 
{
    for (int indx=0; indx<owners.size(); indx++)
    {
        RecordBean.WorkflowOwners.WFOwner owner = owners.get(indx);
        debug ("id: " + owner.getId() + "; name:" + owner.getFullName() );
    }
}