Difference between revisions of "GetWorkflowActionList"

From LongJump Support Wiki
imported>Aeric
imported>Aeric
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:getWorkflowActionList}}  
{{DISPLAYTITLE:getWorkflowActionList}}  


Retrieves a list of [[Workflows#About States, Actions, and Decision Boxes|Actions]] available for record, depending on it's [[Workflows#Workflow States|Workflow State]]<noinclude>, via the [[Java API]]</noinclude>.
Retrieves a list of [[Workflows#Workflow Actions|Workflow Actions]] available for a record, depending on it's [[Workflows#Workflow States|Workflow State]]<noinclude>, via the [[Java API]]</noinclude>.


;Syntax:
;Syntax:

Latest revision as of 21:05, 23 November 2011


Retrieves a list of Workflow Actions available for a record, depending on it's Workflow State, via the Java API.

Syntax
Functions.getWorkflowActionList(String objectName,String recordId)
where:
  • objectName is the name or id of the object
  • recordId is the id of the record
Return
Map
Example
This example returns workflow action list for object "Invoice". A map of actions for a record in the Invoice object is returned.
Functions.debug("Retrieve workflow action list");
String recordId = requestParams.get("record_id");
Map<String,WorkflowActionBean>  wfCollection = Functions.getWorkflowActionList("Invoice", recordId); 
for(Map.Entry<String,WorkflowActionBean> e : wfCollection.entrySet())
{
    WorkflowActionBean wf = e.getValue();
    Functions.debug("Action name : "+ wf.getName());
}