I am new to visual flow and i need some help on the Apex code from a flow and Process.Plugin .Actaully i have scenario where i need to create survey question and answer in visual flow using the Apex code and visual force page .

I am getting out of issues in the Apex class getting query from answer object .

Could you please help on this or provide me any guide or blogs which already been implemented in the projects

Thanks in Advance,

1 Answer 1


I don't know if you specifically need to use the Process.Plugin interface, but if you annotate your method with the @InvocableMethod annotation, you can call your Apex via Flow and via Process Builder (an added bonus).

There are some examples in the documentation:

public class AccountQueryAction {
  @InvocableMethod(label='Get Account Names' description='Returns the list of account names corresponding to the specified account IDs.')
  public static List<String> getAccountNames(List<ID> ids) {
    List<String> accountNames = new List<String>();
    List<Account> accounts = [SELECT Name FROM Account WHERE Id in :ids];
    for (Account account : accounts) {
    return accountNames;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .