function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ben.SchauerhamerBen.Schauerhamer 

How to embed a Flow into a Publisher Action

I have gotten a decent understanding of VisualForce and Apex, but with JavaScript I am struggling. The issue that I am coming up against is I have a headless flow that is triggered from an Apex class upon data entry. The basic premis of the flow is to add a contact to an opportunity along with some other items in the background.

I would like this VisualForce page that you enter the data on to be a Publisher Action, however I cannot figure out how to refresh the feed and reset the VisualForce page upon finishing the Flow. 

The VF button is simple: 
<apex:commandButton action="{!runFlow}" value="Save" id="theButton" />

And the Apex for running the Flow:
public void runFlow(){
        flowParams.put('firstName', firstName);
        flowParams.put('lastName', lastName);
        Flow.Interview.FlowRun newFlowRun = new Flow.Interview.FlowRun(flowParams);
        newContractSigner.start();
        flowReturnValue = (String) FlowRun.getVariableValue('contactId');
    }

Thanks
ShashankShashank (Salesforce Developers) 
You may have to setup the flow finish location: http://www.salesforce.com/docs/developer/pages/Content/pages_flows_finishlocation.htm#pages_flows_finishlocation